PR target/61377
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Jun 2014 10:36:55 +0000 (10:36 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 1 Jun 2014 10:36:55 +0000 (10:36 +0000)
* constrains.md (define_constrain): New 'Bs' constraint.
* i386.md (sibcall_insn_operand): Use Bs instead of m constraint.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211112 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/constraints.md
gcc/config/i386/i386.md

index 60ef5c6..29ce4be 100644 (file)
@@ -1,3 +1,9 @@
+2014-06-01  Kai Tietz  <ktietz@redhat.com>
+
+       PR target/61377
+       * constrains.md (define_constrain): New 'Bs' constraint.
+       * i386.md (sibcall_insn_operand): Use Bs instead of m constraint.
+
 2014-05-31  Andreas Schwab  <schwab@linux-m68k.org>
 
        * config/m68k/m68k.md (beq0_di, bne0_di): Make the "o" constraint
index 567e705..b142c19 100644 (file)
@@ -18,7 +18,7 @@
 ;; <http://www.gnu.org/licenses/>.
 
 ;;; Unused letters:
-;;;     B     H
+;;;           H
 ;;;           h j
 
 ;; Integer register constraints.
  "(ix86_fpmath & FPMATH_387) ? FLOAT_REGS : NO_REGS"
  "@internal Any x87 register when 80387 FP arithmetic is enabled.")
 
+;; We use the B prefix to denote any number of internal memory operands:
+;;  s  Sibling memory operand.
+
+(define_constraint "Bs"
+  "@internal Sibcall memory operand."
+  (and (not (match_test "TARGET_X32"))
+       (match_operand 0 "sibcall_memory_operand")))
+
 (define_register_constraint "v" "TARGET_SSE ? ALL_SSE_REGS : NO_REGS"
  "Any EVEX encodable SSE register (@code{%xmm0-%xmm31}).")
 
index 8d363bd..6fc69ff 100644 (file)
   [(set_attr "type" "call")])
 
 (define_insn "*sibcall"
-  [(call (mem:QI (match_operand:W 0 "sibcall_insn_operand" "Uzm"))
+  [(call (mem:QI (match_operand:W 0 "sibcall_insn_operand" "UzBs"))
         (match_operand 1))]
   "SIBLING_CALL_P (insn)"
   "* return ix86_output_call_insn (insn, operands[0]);"
   [(set_attr "type" "call")])
 
 (define_insn "*sibcall_pop"
-  [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "Uzm"))
+  [(call (mem:QI (match_operand:SI 0 "sibcall_insn_operand" "UzBs"))
         (match_operand 1))
    (set (reg:SI SP_REG)
        (plus:SI (reg:SI SP_REG)
 
 (define_insn "*sibcall_value"
   [(set (match_operand 0)
-       (call (mem:QI (match_operand:W 1 "sibcall_insn_operand" "Uzm"))
+       (call (mem:QI (match_operand:W 1 "sibcall_insn_operand" "UzBs"))
              (match_operand 2)))]
   "SIBLING_CALL_P (insn)"
   "* return ix86_output_call_insn (insn, operands[1]);"
 
 (define_insn "*sibcall_value_pop"
   [(set (match_operand 0)
-       (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "Uzm"))
+       (call (mem:QI (match_operand:SI 1 "sibcall_insn_operand" "UzBs"))
              (match_operand 2)))
    (set (reg:SI SP_REG)
        (plus:SI (reg:SI SP_REG)