diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2007-03-10 13:52:52 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-03-10 13:52:52 +0100 |
commit | 79cd820a29e05b45f5f58d9fd77917eb39b689f6 (patch) | |
tree | 2e4a027f4ef3b71468e37112f2ea5f7048100196 /gcc/reg-stack.c | |
parent | 343d66ade59f0f8b2a7e94bbdfa7240997efa8a0 (diff) | |
download | gcc-79cd820a29e05b45f5f58d9fd77917eb39b689f6.zip gcc-79cd820a29e05b45f5f58d9fd77917eb39b689f6.tar.gz gcc-79cd820a29e05b45f5f58d9fd77917eb39b689f6.tar.bz2 |
i386.md (UNSPEC_C2_FLAG): New constant.
* config/i386/i386.md (UNSPEC_C2_FLAG): New constant.
(fpremxf4_i387, fprem1xf4_i387): Use UNSPEC_C2_FLAG.
(fmodxf3, fmod<mode>3, remainderxf3, remainder<mode>3):
Add LABEL_NUSES to emmitted label.
* config/i386/i386.c (ix86_emit_fp_unordered_jump): Add
branch probability value to emmitted jump insn.
* reg-stack.c (subst_stack_regs_pat)[UNSPEC]: Handle UNSPEC_C2_FLAG.
Do not check life information and do not re-arrange input operands
for UNSPEC_FSCALE_EXP, UNSPEC_FPREM_U and UNSPEC_FPREM1_U.
From-SVN: r122793
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 8413ca3..0103a2f 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1759,7 +1759,7 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat) case UNSPEC_FSCALE_FRACT: case UNSPEC_FPREM_F: case UNSPEC_FPREM1_F: - /* These insns operate on the top two stack slots. + /* These insns operate on the top two stack slots, first part of double input, double output insn. */ src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); @@ -1791,22 +1791,12 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat) case UNSPEC_FSCALE_EXP: case UNSPEC_FPREM_U: case UNSPEC_FPREM1_U: - /* These insns operate on the top two stack slots./ + /* These insns operate on the top two stack slots, second part of double input, double output insn. */ src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); src2 = get_true_reg (&XVECEXP (pat_src, 0, 1)); - src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1)); - src2_note = find_regno_note (insn, REG_DEAD, REGNO (*src2)); - - /* Inputs should never die, they are - replaced with outputs. */ - gcc_assert (!src1_note); - gcc_assert (!src2_note); - - swap_to_top (insn, regstack, *src1, *src2); - /* Push the result back onto stack. Fill empty slot from first part of insn and fix top of stack pointer. */ if (STACK_REG_P (*dest)) @@ -1820,6 +1810,17 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat) replace_reg (src2, FIRST_STACK_REG + 1); break; + case UNSPEC_C2_FLAG: + /* This insn operates on the top two stack slots, + third part of C2 setting double input insn. */ + + src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); + src2 = get_true_reg (&XVECEXP (pat_src, 0, 1)); + + replace_reg (src1, FIRST_STACK_REG); + replace_reg (src2, FIRST_STACK_REG + 1); + break; + case UNSPEC_SAHF: /* (unspec [(unspec [(compare)] UNSPEC_FNSTSW)] UNSPEC_SAHF) The combination matches the PPRO fcomi instruction. */ |