llvm-mirror/lib/Target/PowerPC
Nate Begeman b74ee41754 Fix casts of float to unsigned long
Replace STDX (store 64 bit int indexed) with STFDX (store double indexed)
Fix latent bug in indexed load generation
Generate indexed loads and stores in many more cases

llvm-svn: 15626
2004-08-10 20:42:36 +00:00
..
LICENSE.TXT Added Louis Gerbarg. Louis is given credit in the CREDITS.TXT file, so I 2004-08-05 23:46:27 +00:00
Makefile Generate a code emitter for PowerPC as well, this will be used in the JIT. 2004-08-09 17:24:32 +00:00
PowerPC.h CodePrinter -> AsmPrinter 2004-08-09 22:27:45 +00:00
PowerPC.td Changes commited for Nate Begeman: 2004-08-06 06:58:50 +00:00
PowerPCAsmPrinter.cpp CodePrinter -> AsmPrinter 2004-08-09 22:27:45 +00:00
PowerPCBranchSelector.cpp Remove an extra 8 byte distance penalty. Patch by Nate Begeman. 2004-07-28 19:13:07 +00:00
PowerPCCodeEmitter.cpp Stub definition of the PowerPC CodeEmitter class; this isn't functional (yet). 2004-08-09 23:03:59 +00:00
PowerPCInstrBuilder.h * Wrap long lines (comments and code) 2004-07-07 20:01:36 +00:00
PowerPCInstrFormats.td DForm 5/6 extended mneumonics take 3 arguments. 2004-08-10 19:03:31 +00:00
PowerPCInstrInfo.cpp ADDI can take several forms, including: 2004-07-26 21:50:38 +00:00
PowerPCInstrInfo.h Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class. 2004-07-27 18:34:11 +00:00
PowerPCInstrInfo.td Fix casts of float to unsigned long 2004-08-10 20:42:36 +00:00
PowerPCISelSimple.cpp Fix casts of float to unsigned long 2004-08-10 20:42:36 +00:00
PowerPCJITInfo.h Do IMPLICIT_DEFs on incoming args' hard regs, to avoid confusing the regalloc. 2004-07-16 10:31:25 +00:00
PowerPCPEI.cpp Changes commited for Nate Begeman: 2004-08-06 06:58:50 +00:00
PowerPCRegisterInfo.cpp Fix stack size processing now that the return address isn't an implied 2004-08-09 01:24:32 +00:00
PowerPCRegisterInfo.h Remove empty unused method processFunctionBeforeFrameFinalized() 2004-07-27 18:38:40 +00:00
PowerPCRegisterInfo.td Renamed files: 2004-07-27 23:29:16 +00:00
PowerPCTargetMachine.cpp CodePrinter -> AsmPrinter 2004-08-09 22:27:45 +00:00
PowerPCTargetMachine.h * Codegen of GEPs dramatically improved by folding multiplies and adds 2004-07-23 16:08:20 +00:00
PPC32AsmPrinter.cpp CodePrinter -> AsmPrinter 2004-08-09 22:27:45 +00:00
PPC32CodeEmitter.cpp Stub definition of the PowerPC CodeEmitter class; this isn't functional (yet). 2004-08-09 23:03:59 +00:00
PPC32ISelSimple.cpp Fix casts of float to unsigned long 2004-08-10 20:42:36 +00:00
README.txt Fix casts of float to unsigned long 2004-08-10 20:42:36 +00:00

TODO:
* implement cast fp to bool
* implement signed right shift by reg
* fix ulong to double:
  floatdidf assumes signed longs.  so if the high but of a ulong
  just happens to be set, you get the wrong sign.  The fix for this
  is to call cmpdi2 to compare against zero, if so shift right by one,
  convert to fp, and multiply by (add to itself).  the sequence would
  look like:
  {r3:r4} holds ulong a;
  li r5, 0
  li r6, 0 (set r5:r6 to ulong 0)
  call cmpdi2 ==> sets r3 <, =, > 0
  if r3 > 0
  call floatdidf as usual
  else
  shift right ulong a, 1 (we could use emitShift)
  call floatdidf
  fadd f1, f1, f1 (fp left shift by 1)
* PowerPCPEI.cpp needs to be replaced by shiny new target hook
* setCondInst needs to know branchless versions of seteq/setne/etc
* cast elimination pass (uint -> sbyte -> short, kill the byte -> short)
* 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

Current hacks:
* lazy insert of GlobalBaseReg definition at front of first MBB
  A prime candidate for sabre's future "slightly above ISel" passes.
* cast code is huge, unwieldy.  Should probably be broken up into
  smaller pieces.
* visitLoadInst is getting awfully cluttered as well.

Currently failing tests:
* SingleSource
  `- Regression
  |  `- casts (ulong to fp failure)
  `- Benchmarks
  |  `- Shootout-C++ : most programs fail, miscompilations
  `- UnitTests
  |  `- C++Catch
  |  `- SimpleC++Test
  |  `- ConditionalExpr (also C++)
* MultiSource
  |- Applications
  |  `- burg: miscompilation
  |  `- siod: llc bus error
  |  `- hbd: miscompilation
  |  `- d (make_dparser): miscompilation
  `- Benchmarks
     `- MallocBench/make: miscompilation