X86_64 merger part 30 - allocate stack worker
Jan Hubicka
jh@suse.cz
Mon Mar 26 06:25:00 GMT 2001
Mon Mar 26 16:20:05 CEST 2001 Jan Hubicka <jh@suse.cz>
* i386.md (allocate_stack_worker): Turn to expander.
(allocate_stack_worker_1, allocate_stack_worker_rex64): New insns.
Index: i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.249
diff -c -3 -p -r1.249 i386.md
*** i386.md 2001/03/26 13:56:34 1.249
--- i386.md 2001/03/26 14:21:48
***************
*** 15718,15730 ****
operands[6] = gen_rtx_SUBREG (TImode, operands[0], 0);
}
}")
! (define_insn "allocate_stack_worker"
[(unspec:SI [(match_operand:SI 0 "register_operand" "a")] 3)
(set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
(clobber (match_dup 0))
(clobber (reg:CC 17))]
! "TARGET_STACK_PROBE"
"call\\t__alloca"
[(set_attr "type" "multi")
(set_attr "length" "5")])
--- 15757,15791 ----
operands[6] = gen_rtx_SUBREG (TImode, operands[0], 0);
}
}")
+
+ (define_expand "allocate_stack_worker"
+ [(const_int 0)]
+ "TARGET_STACK_PROBE"
+ "
+ {
+ if (TARGET_64BIT)
+ emit_insn (gen_allocate_stack_worker_rex64 (operands[0]));
+ else
+ emit_insn (gen_allocate_stack_worker_1 (operands[0]));
+ DONE;
+ }")
! (define_insn "allocate_stack_worker_1"
[(unspec:SI [(match_operand:SI 0 "register_operand" "a")] 3)
(set (reg:SI 7) (minus:SI (reg:SI 7) (match_dup 0)))
(clobber (match_dup 0))
(clobber (reg:CC 17))]
! "TARGET_STACK_PROBE && !TARGET_64BIT"
! "call\\t__alloca"
! [(set_attr "type" "multi")
! (set_attr "length" "5")])
!
! (define_insn "allocate_stack_worker_rex64"
! [(unspec:DI [(match_operand:DI 0 "register_operand" "a")] 3)
! (set (reg:DI 7) (minus:DI (reg:DI 7) (match_dup 0)))
! (clobber (match_dup 0))
! (clobber (reg:CC 17))]
! "TARGET_STACK_PROBE && TARGET_64BIT"
"call\\t__alloca"
[(set_attr "type" "multi")
(set_attr "length" "5")])
More information about the Gcc-patches
mailing list