diff options
author | Stan Cox <coxs@gnu.org> | 1996-07-25 18:07:48 +0000 |
---|---|---|
committer | Stan Cox <coxs@gnu.org> | 1996-07-25 18:07:48 +0000 |
commit | 5703bb66031e55b695395004578410c8e4e08f31 (patch) | |
tree | 646bdcd8ad0430b73ac14263fbd2f22b56fa78d3 | |
parent | 9ad91d711549e9c3def747befde85296702511d4 (diff) | |
download | gcc-5703bb66031e55b695395004578410c8e4e08f31.zip gcc-5703bb66031e55b695395004578410c8e4e08f31.tar.gz gcc-5703bb66031e55b695395004578410c8e4e08f31.tar.bz2 |
(output_float_compare): Added support for Pentium Pro
fcomi instruction which sets EFLAGS instead of FPU Status Word.
From-SVN: r12563
-rw-r--r-- | gcc/config/i386/i386.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c86e6d6..4499248 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3548,6 +3548,7 @@ output_float_compare (insn, operands) int stack_top_dies; rtx body = XVECEXP (PATTERN (insn), 0, 0); int unordered_compare = GET_MODE (SET_SRC (body)) == CCFPEQmode; + int target_fcomi = TARGET_CMOVE && STACK_REG_P (operands[1]); rtx tmp; if (! STACK_TOP_P (operands[0])) @@ -3585,9 +3586,9 @@ output_float_compare (insn, operands) unordered float compare. */ if (unordered_compare) - strcpy (buf, "fucom"); + strcpy (buf, target_fcomi ? "fucomi" : "fucom"); else if (GET_MODE_CLASS (GET_MODE (operands[1])) == MODE_FLOAT) - strcpy (buf, "fcom"); + strcpy (buf, target_fcomi ? "fcomi" : "fcom"); else strcpy (buf, "ficom"); @@ -3598,6 +3599,13 @@ output_float_compare (insn, operands) if (NON_STACK_REG_P (operands[1])) output_op_from_reg (operands[1], strcat (buf, AS1 (%z0,%1))); + else if (target_fcomi) + { + rtx xops[] = {operands[0], operands[1], operands[0]}; + + output_asm_insn (strcat (buf, AS2 (%z1,%y1,%2)), xops); + RET; + } else output_asm_insn (strcat (buf, AS1 (%z1,%y1)), operands); } |