diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2015-04-02 09:56:05 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2015-04-02 09:56:05 +0200 |
commit | a8caf3514910c6d8513910e9c9d4c8e6b1b3ad0f (patch) | |
tree | 05245162db6486007dff32f20190cb633afcab28 | |
parent | ed6ef4907a2e6c0e69f0c3b3dd3a916f24236022 (diff) | |
download | gcc-a8caf3514910c6d8513910e9c9d4c8e6b1b3ad0f.zip gcc-a8caf3514910c6d8513910e9c9d4c8e6b1b3ad0f.tar.gz gcc-a8caf3514910c6d8513910e9c9d4c8e6b1b3ad0f.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/sync.md | 9 | ||||
-rw-r--r-- | gcc/reg-stack.c | 4 |
3 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e2e8b55..937d5cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index 3ef580b..61a2a81 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 5796d34..b040c46 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: |