sync.md (UNSPEC_FILD_ATOMIC, [...]): New.
authorUros Bizjak <ubizjak@gmail.com>
Thu, 2 Apr 2015 07:56:05 +0000 (09:56 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 2 Apr 2015 07:56:05 +0000 (09:56 +0200)
* config/i386/sync.md (UNSPEC_FILD_ATOMIC, UNSPEC_FIST_ATOMIC): New.
(loaddi_via_fpu): Use UNSPEC_FILD_ATOMIC.
(storedi_via_fpu): Use UNSPEC_FIST_ATOMIC.
* reg-stack.c (get_true_reg): Change UNSPEC_LDA to UNSPEC_FILD_ATOMIC.
(subst_stack_regs_pat): Change UNSPEC_STA to UNSPEC_FIST_ATOMIC.

From-SVN: r221830

gcc/ChangeLog
gcc/config/i386/sync.md
gcc/reg-stack.c

index e2e8b555d976a7fb6f2d2b46e7efbfb770effc29..937d5cdf2fd713ed5f14ce7578c40ea0396a0e37 100644 (file)
@@ -1,3 +1,11 @@
+2015-04-02  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/sync.md (UNSPEC_FILD_ATOMIC, UNSPEC_FIST_ATOMIC): New.
+       (loaddi_via_fpu): Use UNSPEC_FILD_ATOMIC.
+       (storedi_via_fpu): Use UNSPEC_FIST_ATOMIC.
+       * reg-stack.c (get_true_reg): Change UNSPEC_LDA to UNSPEC_FILD_ATOMIC.
+       (subst_stack_regs_pat): Change UNSPEC_STA to UNSPEC_FIST_ATOMIC.
+
 2015-04-01  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/sync.md (UNSPEC_MOVA): Remove.
index 3ef580be94dd26b0cebc9b40c000d3433b2df04f..61a2a819260aea6378e607436db64f11095ebeea 100644 (file)
@@ -22,6 +22,9 @@
   UNSPEC_SFENCE
   UNSPEC_MFENCE
 
+  UNSPEC_FILD_ATOMIC
+  UNSPEC_FIST_ATOMIC
+
   ;; __atomic support
   UNSPEC_LDA
   UNSPEC_STA
 
 (define_insn "loaddi_via_fpu"
   [(set (match_operand:DF 0 "register_operand" "=f")
-       (unspec:DF [(match_operand:DI 1 "memory_operand" "m")] UNSPEC_LDA))]
+       (unspec:DF [(match_operand:DI 1 "memory_operand" "m")]
+                  UNSPEC_FILD_ATOMIC))]
   "TARGET_80387"
   "fild%Z1\t%1"
   [(set_attr "type" "fmov")
 
 (define_insn "storedi_via_fpu"
   [(set (match_operand:DI 0 "memory_operand" "=m")
-       (unspec:DI [(match_operand:DF 1 "register_operand" "f")] UNSPEC_STA))]
+       (unspec:DI [(match_operand:DF 1 "register_operand" "f")]
+                  UNSPEC_FIST_ATOMIC))]
   "TARGET_80387"
 {
   gcc_assert (find_regno_note (insn, REG_DEAD, FIRST_STACK_REG) != NULL_RTX);
index 5796d348c077263d4502244b1b91696dc607c49d..b040c4636435f010ad1951def048d0e3a0dd4d42 100644 (file)
@@ -448,7 +448,7 @@ get_true_reg (rtx *pat)
 
       case UNSPEC:
        if (XINT (*pat, 1) == UNSPEC_TRUNC_NOOP
-           || XINT (*pat, 1) == UNSPEC_LDA)
+           || XINT (*pat, 1) == UNSPEC_FILD_ATOMIC)
          pat = & XVECEXP (*pat, 0, 0);
        return pat;
 
@@ -1670,8 +1670,8 @@ subst_stack_regs_pat (rtx_insn *insn, stack_ptr regstack, rtx pat)
          case UNSPEC:
            switch (XINT (pat_src, 1))
              {
-             case UNSPEC_STA:
              case UNSPEC_FIST:
+             case UNSPEC_FIST_ATOMIC:
 
              case UNSPEC_FIST_FLOOR:
              case UNSPEC_FIST_CEIL: