Commit 35a76aac by Richard Henderson Committed by Richard Henderson

reg-stack.c (swap_rtx_condition, [...]): Use unspec names, not numbers.

        * reg-stack.c (swap_rtx_condition, subst_stack_regs_pat): Use
        unspec names, not numbers.

From-SVN: r53693
parent 32d3f634
2002-05-21 Richard Henderson <rth@redhat.com>
* reg-stack.c (swap_rtx_condition, subst_stack_regs_pat): Use
unspec names, not numbers.
2002-05-21 Joseph S. Myers <jsm28@cam.ac.uk> 2002-05-21 Joseph S. Myers <jsm28@cam.ac.uk>
* doc/sourcebuild.texi: Mention snapshot-README and * doc/sourcebuild.texi: Mention snapshot-README and
......
...@@ -1260,7 +1260,7 @@ swap_rtx_condition (insn) ...@@ -1260,7 +1260,7 @@ swap_rtx_condition (insn)
if (GET_CODE (pat) == SET if (GET_CODE (pat) == SET
&& GET_CODE (SET_SRC (pat)) == UNSPEC && GET_CODE (SET_SRC (pat)) == UNSPEC
&& XINT (SET_SRC (pat), 1) == 9) && XINT (SET_SRC (pat), 1) == UNSPEC_FNSTSW)
{ {
rtx dest = SET_DEST (pat); rtx dest = SET_DEST (pat);
...@@ -1281,7 +1281,7 @@ swap_rtx_condition (insn) ...@@ -1281,7 +1281,7 @@ swap_rtx_condition (insn)
pat = PATTERN (insn); pat = PATTERN (insn);
if (GET_CODE (pat) != SET if (GET_CODE (pat) != SET
|| GET_CODE (SET_SRC (pat)) != UNSPEC || GET_CODE (SET_SRC (pat)) != UNSPEC
|| XINT (SET_SRC (pat), 1) != 10 || XINT (SET_SRC (pat), 1) != UNSPEC_SAHF
|| ! dead_or_set_p (insn, dest)) || ! dead_or_set_p (insn, dest))
return 0; return 0;
...@@ -1705,8 +1705,8 @@ subst_stack_regs_pat (insn, regstack, pat) ...@@ -1705,8 +1705,8 @@ subst_stack_regs_pat (insn, regstack, pat)
case UNSPEC: case UNSPEC:
switch (XINT (pat_src, 1)) switch (XINT (pat_src, 1))
{ {
case 1: /* sin */ case UNSPEC_SIN:
case 2: /* cos */ case UNSPEC_COS:
/* These insns only operate on the top of the stack. */ /* These insns only operate on the top of the stack. */
src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); src1 = get_true_reg (&XVECEXP (pat_src, 0, 0));
...@@ -1728,19 +1728,17 @@ subst_stack_regs_pat (insn, regstack, pat) ...@@ -1728,19 +1728,17 @@ subst_stack_regs_pat (insn, regstack, pat)
replace_reg (src1, FIRST_STACK_REG); replace_reg (src1, FIRST_STACK_REG);
break; break;
case 10: case UNSPEC_SAHF:
/* (unspec [(unspec [(compare ..)] 9)] 10) /* (unspec [(unspec [(compare)] UNSPEC_FNSTSW)] UNSPEC_SAHF)
Unspec 9 is fnstsw; unspec 10 is sahf. The combination The combination matches the PPRO fcomi instruction. */
matches the PPRO fcomi instruction. */
pat_src = XVECEXP (pat_src, 0, 0); pat_src = XVECEXP (pat_src, 0, 0);
if (GET_CODE (pat_src) != UNSPEC if (GET_CODE (pat_src) != UNSPEC
|| XINT (pat_src, 1) != 9) || XINT (pat_src, 1) != UNSPEC_FNSTSW)
abort (); abort ();
/* FALLTHRU */ /* FALLTHRU */
case 9: case UNSPEC_FNSTSW:
/* (unspec [(compare ..)] 9) */
/* Combined fcomp+fnstsw generated for doing well with /* Combined fcomp+fnstsw generated for doing well with
CSE. When optimizing this would have been broken CSE. When optimizing this would have been broken
up before now. */ up before now. */
...@@ -1775,8 +1773,8 @@ subst_stack_regs_pat (insn, regstack, pat) ...@@ -1775,8 +1773,8 @@ subst_stack_regs_pat (insn, regstack, pat)
&& REGNO (*dest) != regstack->reg[regstack->top]) && REGNO (*dest) != regstack->reg[regstack->top])
{ {
/* In case one of operands is the top of stack and the operands /* In case one of operands is the top of stack and the operands
dies, it is safe to make it the destination operand by reversing dies, it is safe to make it the destination operand by
the direction of cmove and avoid fxch. */ reversing the direction of cmove and avoid fxch. */
if ((REGNO (*src1) == regstack->reg[regstack->top] if ((REGNO (*src1) == regstack->reg[regstack->top]
&& src1_note) && src1_note)
|| (REGNO (*src2) == regstack->reg[regstack->top] || (REGNO (*src2) == regstack->reg[regstack->top]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment