1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib
Chris Lattner 682a6361c7 Use the fucomi[p] instructions to perform floating point comparisons instead
of the fucom[p][p] instructions.  This allows us to code generate this function

bool %test(double %X, double %Y) {
        %C = setlt double %Y, %X
        ret bool %C
}

... into:

test:
        fld QWORD PTR [%ESP + 4]
        fld QWORD PTR [%ESP + 12]
        fucomip %ST(1)
        fstp %ST(0)
        setb %AL
        movsx %EAX, %AL
        ret

where before we generated:

test:
        fld QWORD PTR [%ESP + 4]
        fld QWORD PTR [%ESP + 12]
        fucompp
**      fnstsw
**      sahf
        setb %AL
        movsx %EAX, %AL
        ret

The two marked instructions (which are the ones eliminated) are very bad,
because they serialize execution of the processor.  These instructions are
available on the PPRO and later, but since we already use cmov's we aren't
losing any portability.

I retained the old code for the day when we decide we want to support back
to the 386.

llvm-svn: 12852
2004-04-12 01:43:36 +00:00
..
Analysis operator new & operator new[] do not kill any legal memory locations. 2004-04-11 18:16:34 +00:00
AsmParser Support getelementptr instructions which use uint's to index into structure 2004-04-05 01:30:04 +00:00
Bytecode Implement support for a new LLVM 1.3 bytecode format, which uses uint's 2004-04-05 01:27:26 +00:00
CodeGen Add definition list to each live interval. 2004-04-09 18:07:57 +00:00
Debugger
ExecutionEngine Adjust to new interface 2004-04-04 19:47:06 +00:00
Support lli no longer takes the -quiet option! 2004-04-05 20:28:41 +00:00
Target Use the fucomi[p] instructions to perform floating point comparisons instead 2004-04-12 01:43:36 +00:00
Transforms Fix a bug in my select transformation 2004-04-11 01:39:19 +00:00
VMCore Add a missing break, which caused a crash in an obscure situation 2004-04-11 01:29:30 +00:00
Makefile