From: Uros Bizjak Date: Thu, 2 Apr 2015 07:56:05 +0000 (+0200) Subject: sync.md (UNSPEC_FILD_ATOMIC, [...]): New. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8caf3514910c6d8513910e9c9d4c8e6b1b3ad0f;p=gcc.git sync.md (UNSPEC_FILD_ATOMIC, [...]): New. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e2e8b555d97..937d5cdf2fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2015-04-02 Uros Bizjak + + * 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 * config/i386/sync.md (UNSPEC_MOVA): Remove. diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index 3ef580be94d..61a2a819260 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -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); diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 5796d348c07..b040c463643 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -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: