Hello!

Trivial patch to make insn dumps more informative.

2015-04-02  Uros Bizjak  <ubiz...@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.

Bootstrapped and regtested on x86_64-linux-gnu {,-m32} and committed
to mainline SVN.

Uros.
Index: config/i386/sync.md
===================================================================
--- config/i386/sync.md (revision 221826)
+++ config/i386/sync.md (working copy)
@@ -22,6 +22,9 @@
   UNSPEC_SFENCE
   UNSPEC_MFENCE
 
+  UNSPEC_FILD_ATOMIC
+  UNSPEC_FIST_ATOMIC
+
   ;; __atomic support
   UNSPEC_LDA
   UNSPEC_STA
@@ -302,7 +305,8 @@
 
 (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")
@@ -311,7 +315,8 @@
 
 (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: reg-stack.c
===================================================================
--- reg-stack.c (revision 221826)
+++ reg-stack.c (working copy)
@@ -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 re
          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:

Reply via email to