mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 03:30:28 +00:00
1cbf3abbb8
int %bar(float %a, float %b, float %c, float %d) { entry: %tmp.1 = setlt float %a, %d %tmp.2 = setlt float %b, %d %or = or bool %tmp.1, %tmp.2 %tmp.3 = setgt float %c, %d %tmp.4 = or bool %or, %tmp.3 %tmp.5 = and bool %tmp.4, true %retval = cast bool %tmp.5 to int ret int %retval } We now emit: _bar: .LBB_bar_0: ; entry fcmpu cr0, f1, f4 fcmpu cr1, f2, f4 cror 0, 0, 4 fcmpu cr1, f3, f4 cror 28, 0, 5 mfcr r2 rlwinm r3, r2, 29, 31, 31 blr Instead of: _bar: .LBB_bar_0: ; entry fcmpu cr7, f1, f4 mfcr r2 rlwinm r2, r2, 29, 31, 31 fcmpu cr7, f2, f4 mfcr r3 rlwinm r3, r3, 29, 31, 31 or r2, r2, r3 fcmpu cr7, f3, f4 mfcr r3 rlwinm r3, r3, 30, 31, 31 or r3, r2, r3 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21321 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
.cvsignore | ||
LICENSE.TXT | ||
Makefile | ||
PowerPC.td | ||
PowerPCInstrInfo.h | ||
PowerPCTargetMachine.h | ||
PPC32.td | ||
PPC32ISelSimple.cpp | ||
PPC32JITInfo.h | ||
PPC32RegisterInfo.td | ||
PPC64.td | ||
PPC64CodeEmitter.cpp | ||
PPC64InstrInfo.cpp | ||
PPC64InstrInfo.h | ||
PPC64ISelPattern.cpp | ||
PPC64JITInfo.h | ||
PPC64RegisterInfo.cpp | ||
PPC64RegisterInfo.h | ||
PPC64RegisterInfo.td | ||
PPC64TargetMachine.h | ||
PPC.h | ||
PPCAsmPrinter.cpp | ||
PPCBranchSelector.cpp | ||
PPCCodeEmitter.cpp | ||
PPCFrameInfo.h | ||
PPCInstrBuilder.h | ||
PPCInstrFormats.td | ||
PPCInstrInfo.cpp | ||
PPCInstrInfo.h | ||
PPCInstrInfo.td | ||
PPCISelPattern.cpp | ||
PPCJITInfo.cpp | ||
PPCJITInfo.h | ||
PPCRegisterInfo.cpp | ||
PPCRegisterInfo.h | ||
PPCRegisterInfo.td | ||
PPCRelocations.h | ||
PPCTargetMachine.cpp | ||
PPCTargetMachine.h | ||
README.txt |
TODO: * condition register allocation * gpr0 allocation * implement do-loop -> bdnz transform * implement powerpc-64 for darwin * use stfiwx in float->int * should hint to the branch select pass that it doesn't need to print the second unconditional branch, so we don't end up with things like: b .LBBl42__2E_expand_function_8_674 ; loopentry.24 b .LBBl42__2E_expand_function_8_42 ; NewDefault b .LBBl42__2E_expand_function_8_42 ; NewDefault Currently failing tests that should pass: * MultiSource |- Applications | `- hbd: miscompilation