From 69404d6fffd9504e62975b39ef4208f9a008443f Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 14 Oct 1999 04:59:00 -0700 Subject: [PATCH] i386.md (call value patterns): Move to the end of the file. * i386.md (call value patterns): Move to the end of the file. (prologue_set_got, prologue_get_pc): Use register_operand for op 0. From-SVN: r29978 --- gcc/ChangeLog | 5 +++ gcc/config/i386/i386.md | 110 +++++++++++++++++++++++++----------------------- 2 files changed, 62 insertions(+), 53 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1038232..e456336 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 14 04:54:54 1999 Richard Henderson + + * i386.md (call value patterns): Move to the end of the file. + (prologue_set_got, prologue_get_pc): Use register_operand for op 0. + 1999-10-14 Mark Elbrecht * configure.in (djgpp configuration): Define extra_objects.. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 1feb05d..6f714dd 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6557,33 +6557,6 @@ copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); }") -(define_insn "*call_value_pop_pic" - [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "call_insn_operand" "m") - (match_operand:SI 2 "general_operand" "g"))) - (set (reg:SI 7) (plus:SI (reg:SI 7) - (match_operand:SI 4 "immediate_operand" "i")))] - "" - "* -{ - if (constant_call_address_operand (operands[1], GET_MODE (operands[1]))) - return \"call\\t%P1\"; - - operands[1] = XEXP (operands[1], 0); - return \"call\\t%*%1\"; -}" - [(set_attr "type" "callv")]) - -(define_insn "*call_value_pop_pic2" - [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "constant_call_address_operand" "") - (match_operand:SI 2 "general_operand" "g"))) - (set (reg:SI 7) (plus:SI (reg:SI 7) - (match_operand:SI 4 "immediate_operand" "i")))] - "!HALF_PIC_P ()" - "call\\t%P1" - [(set_attr "type" "callv")]) - (define_expand "call_value" [(set (match_operand 0 "" "") (call (match_operand:QI 1 "indirect_operand" "") @@ -6608,30 +6581,6 @@ copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); }") -(define_insn "*call_value_pic" - [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "call_insn_operand" "m") - (match_operand:SI 2 "general_operand" "g")))] - ;; Operand 2 not used on the i386. - "" - "* -{ - if (constant_call_address_operand (operands[1], GET_MODE (operands[1]))) - return \"call\\t%P1\"; - - operands[1] = XEXP (operands[1], 0); - return \"call\\t%*%1\"; -}" - [(set_attr "type" "callv")]) - -(define_insn "*call_value_pic2" - [(set (match_operand 0 "" "=rf") - (call (match_operand:QI 1 "constant_call_address_operand" "") - (match_operand:SI 2 "general_operand" "g")))] - "!HALF_PIC_P ()" - "call\\t%P1" - [(set_attr "type" "callv")]) - ;; Call subroutine returning any type. (define_expand "untyped_call" @@ -6715,7 +6664,7 @@ "ix86_expand_prologue (); DONE;") (define_insn "prologue_set_got" - [(set (match_operand:SI 0 "" "") + [(set (match_operand:SI 0 "register_operand" "=r") (unspec_volatile:SI [(plus:SI (match_dup 0) (plus:SI (match_operand:SI 1 "symbolic_operand" "") @@ -6734,7 +6683,7 @@ [(set_attr "type" "alu")]) (define_insn "prologue_get_pc" - [(set (match_operand:SI 0 "" "") + [(set (match_operand:SI 0 "register_operand" "=r") (unspec_volatile:SI [(plus:SI (pc) (match_operand 1 "" ""))] 2))] "" "* @@ -8169,3 +8118,58 @@ (ior:HI (match_dup 0) (const_int -1))) (clobber (reg:CC 17))])] "") + + +;; Call-value patterns last so that the wildcard operand does not +;; disrupt insn-recog's switch tables. + +(define_insn "*call_value_pop_1" + [(set (match_operand 0 "" "") + (call (match_operand:QI 1 "call_insn_operand" "m") + (match_operand:SI 2 "general_operand" "g"))) + (set (reg:SI 7) (plus:SI (reg:SI 7) + (match_operand:SI 4 "immediate_operand" "i")))] + "" + "* +{ + if (constant_call_address_operand (operands[1], GET_MODE (operands[1]))) + return \"call\\t%P1\"; + + operands[1] = XEXP (operands[1], 0); + return \"call\\t%*%1\"; +}" + [(set_attr "type" "callv")]) + +(define_insn "*call_value_pop_2" + [(set (match_operand 0 "" "") + (call (match_operand:QI 1 "constant_call_address_operand" "") + (match_operand:SI 2 "general_operand" "g"))) + (set (reg:SI 7) (plus:SI (reg:SI 7) + (match_operand:SI 4 "immediate_operand" "i")))] + "!HALF_PIC_P ()" + "call\\t%P1" + [(set_attr "type" "callv")]) + +(define_insn "*call_value_1" + [(set (match_operand 0 "" "") + (call (match_operand:QI 1 "call_insn_operand" "m") + (match_operand:SI 2 "general_operand" "g")))] + ;; Operand 2 not used on the i386. + "" + "* +{ + if (constant_call_address_operand (operands[1], GET_MODE (operands[1]))) + return \"call\\t%P1\"; + + operands[1] = XEXP (operands[1], 0); + return \"call\\t%*%1\"; +}" + [(set_attr "type" "callv")]) + +(define_insn "*call_value_2" + [(set (match_operand 0 "" "") + (call (match_operand:QI 1 "constant_call_address_operand" "") + (match_operand:SI 2 "general_operand" "g")))] + "!HALF_PIC_P ()" + "call\\t%P1" + [(set_attr "type" "callv")]) -- 2.7.4