aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStan Cox <coxs@gnu.org>1997-05-08 18:51:51 +0000
committerStan Cox <coxs@gnu.org>1997-05-08 18:51:51 +0000
commit858a9ffcb70e7fbf3c28baee571ef2785d8b798f (patch)
tree9ef75823307491d083fa564148dcf54bb8398c14 /gcc
parent96f06cb6dda0ad26a734dea2f05dd07a246b7ef1 (diff)
downloadgcc-858a9ffcb70e7fbf3c28baee571ef2785d8b798f.zip
gcc-858a9ffcb70e7fbf3c28baee571ef2785d8b798f.tar.gz
gcc-858a9ffcb70e7fbf3c28baee571ef2785d8b798f.tar.bz2
(output_float_compare): For pentiumpro use fcomip
From-SVN: r14048
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 93480fc..4a17d80 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3737,9 +3737,25 @@ output_float_compare (insn, operands)
`fcompp' float compare */
if (unordered_compare)
- output_asm_insn ("fucompp", operands);
+ if (cc_status.flags & CC_FCOMI)
+ {
+ output_asm_insn (AS2 (fucomip,%y1,%0), operands);
+ output_asm_insn (AS1 (fstp, %y0), operands);
+ RET;
+ }
+ else
+ output_asm_insn ("fucompp", operands);
else
- output_asm_insn ("fcompp", operands);
+ {
+ if (cc_status.flags & CC_FCOMI)
+ {
+ output_asm_insn (AS2 (fcomip, %y1,%0), operands);
+ output_asm_insn (AS1 (fstp, %y0), operands);
+ RET;
+ }
+ else
+ output_asm_insn ("fcompp", operands);
+ }
}
else
{
@@ -3764,13 +3780,7 @@ output_float_compare (insn, operands)
output_op_from_reg (operands[1], strcat (buf, AS1 (%z0,%1)));
else if (cc_status.flags & CC_FCOMI)
{
- rtx xops[3];
-
- xops[0] = operands[0];
- xops[1] = operands[1];
- xops[2] = operands[0];
-
- output_asm_insn (strcat (buf, AS2 (%z1,%y1,%2)), xops);
+ output_asm_insn (strcat (buf, AS2 (%z1,%y1,%0)), operands);
RET;
}
else