summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* This PHI has 4 additional operands, not 2.Misha Brukman2004-08-191-1/+1
| | | | llvm-svn: 15926
* Convert casts that will have no effect into move instructions.Nate Begeman2004-08-191-4/+22
| | | | llvm-svn: 15914
* Clean up floating point instruction selection.Nate Begeman2004-08-191-53/+10
| | | | | | | | Change int->float cast code to put conversion constants in constant pool. Shorten code sequence for constant pool fp loads. Remove LOADLoDirect/LOADLoIndirect psuedo instructions and tweak asmwriter llvm-svn: 15913
* Re-fix hiding the Frame Pointer from the register allocator in functionsNate Begeman2004-08-171-19/+7
| | | | | | | | that have a frame pointer. This change fixes Burg. In addition, make the necessary changes to floating point code gen and constant loading after Chris Lattner's fixes to the asm writer. These changes fix MallocBench/gs llvm-svn: 15873
* PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC*Misha Brukman2004-08-171-6/+6
| | | | llvm-svn: 15850
* Fix mismatched adjust down/up of SP in functions that contain variableNate Begeman2004-08-161-4/+4
| | | | | | sized allocas. llvm-svn: 15806
* Fix float to int codepath by always allocating 8 bytes for the target of a ↵Nate Begeman2004-08-151-6/+9
| | | | | | double store; optimize cmplwi generation. llvm-svn: 15759
* Fix handling of FP constants with single precision, and loading of internal ↵Nate Begeman2004-08-141-27/+27
| | | | | | linkage function addresses llvm-svn: 15742
* Fix siod by switching BoolTy to byte rather than int until CFE changes forNate Begeman2004-08-131-1/+1
| | | | | | | Darwin. Also, change asm printer to output proper stubs for external functions whose address is passed as an argument to aid in bugpointing. llvm-svn: 15721
* Fix 177.mesa compilation, don't use floating point regs for base addresses!Nate Begeman2004-08-131-1/+1
| | | | llvm-svn: 15720
* Fix llc crasher compiling siod by giving BuildMI the correct number of argumentsNate Begeman2004-08-131-1/+1
| | | | llvm-svn: 15719
* Clean up 32/64bit and Darwin/AIX split. Next steps: 64 bit ISel, AIX asm ↵Nate Begeman2004-08-111-1/+0
| | | | | | printer. llvm-svn: 15662
* Fix a case where constantexprs could leak into the PPC isel.Chris Lattner2004-08-111-1/+4
| | | | llvm-svn: 15661
* Fix 255.vortex by using getClassB instead of getClassNate Begeman2004-08-111-2/+1
| | | | llvm-svn: 15648
* Breaking up the PowerPC target into 32- and 64-bit subparts, Part I: 32-bit.Misha Brukman2004-08-111-7/+7
| | | | llvm-svn: 15634
* Renamed PPC32 (namespace for regs, opcodes) to PPC to include 64-bit targetsMisha Brukman2004-08-101-372/+372
| | | | llvm-svn: 15631
* Fix casts of float to unsigned longNate Begeman2004-08-101-28/+84
| | | | | | | | 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
* Changes commited for Nate Begeman:Chris Lattner2004-08-061-12/+17
| | | | | | | | | | | | | | | Use a PowerPC specific prolog epilog inserter to control where spilled callee save regs are placed on the stack. Get rid of implicit return address stack slot, save return address reg (LR) in appropriate slot Improve code generated for functions that don't have calls or access globals Note from Chris: PowerPCPEI will eventually be eliminated, once the functionality is merged into CodeGen/PrologEpilogInserter.cpp llvm-svn: 15536
* Simplify loading (un)signed constants to registers, patch by Nate Begeman.Misha Brukman2004-07-281-45/+47
| | | | llvm-svn: 15306
* LI can only take signed values, so values > 32767 can only be loaded with ORIMisha Brukman2004-07-281-1/+7
| | | | llvm-svn: 15299
* Build COND_BRANCHes which may become long or short, decided by a later pass.Misha Brukman2004-07-271-23/+14
| | | | | | Patch by Nate Begeman. llvm-svn: 15282
* Add IMPLICIT_DEF of LR for branch-and-link instrs (calls and global accesses)Misha Brukman2004-07-271-0/+2
| | | | llvm-svn: 15270
* * Rewrote castsMisha Brukman2004-07-261-192/+510
| | | | | | | | | | * Implemented GEP folding * Dynamically output global address stuff once per function * Fix casting fp<->short/byte Patch contributed by Nate Begeman. llvm-svn: 15237
* Eliminate spurious empty space; make code easier to page through.Misha Brukman2004-07-231-21/+12
| | | | llvm-svn: 15146
* Implement casting a floating point to 32-bit unsigned valueMisha Brukman2004-07-231-2/+61
| | | | llvm-svn: 15143
* * Codegen of GEPs dramatically improved by folding multiplies and addsMisha Brukman2004-07-231-51/+134
| | | | | | | | * Function pointers implemented correctly using appropriate stubs Contributed by Nate Begeman. llvm-svn: 15133
* * Change class of BoolTy back to cIntMisha Brukman2004-07-231-19/+19
| | | | | | * Fix indentation back to 2 spaces llvm-svn: 15121
* * Change bool from cInt to cByte (for now)Misha Brukman2004-07-221-67/+90
| | | | | | | | | | | | | * Don't allow negative immediates to users of unsigned immediates * Fix long compares * Support <const int>, op as a potential immediate candidate * Fix sign extension of short and byte loads * Fix and improve integer casts * Fix passing of doubles as vararg functions Patch contributed by Nate Begeman. llvm-svn: 15109
* * Add the lost fix to define the second reg of a 2-reg representation of longsMisha Brukman2004-07-211-1/+4
| | | | | | * Fix opcode RLWNM -> RLWINM since it uses an immediate const shift value llvm-svn: 15087
* * Speed up canUseAsImmediateForOpcode() by comparing Operand beforeMisha Brukman2004-07-211-19/+19
| | | | | | | dyn_cast<>ing and checking Constant's value * Convert tabs to spaces llvm-svn: 15086
* * Fix printing of signed immediate valuesMisha Brukman2004-07-211-503/+427
| | | | | | | | | | | | * Generation of opcodes that take 16 bit immediates * Rewrote multiply to be correct for 64 bit values * Rewrote all the long handling to be correct for PowerPC * Fix visitSelectInst() to define the upper register of the pair of regs representing a long value Patch contributed by Nate Begeman. llvm-svn: 15083
* Treat external variables similarly to those with weak linkage: load indirect.Misha Brukman2004-07-201-4/+4
| | | | llvm-svn: 15047
* * Differentiate between global and weak symbol loadsMisha Brukman2004-07-201-64/+45
| | | | | | | | | | | | * Fix functions that take more than 32 bytes of args * Alignment of doubles in structs is 4 bytes, not 8 * Fix passing long args: rN = hi, rN+1 = lo * Rewrite signed divide * Rewrite Intrinsic::returnaddress Patch courtesy of Nate Begeman. llvm-svn: 15036
* Move handing of GlobalValues from getReg() to copyConstantToRegister(), thisMisha Brukman2004-07-201-19/+11
| | | | | | will avoid extra register-to-register copies. Thanks to Chris for the idea. llvm-svn: 15019
* * cFP class split into cFP32 and cFP64Misha Brukman2004-07-201-218/+229
| | | | | | | | | | | | | | | * Fn args passed in registers are now recorded as used by the call instruction `-> asm printer updated to not print out those registers with the call instr * Stack frame layout in prolog/epilog fixed, spills and vararg fns now work * float/double to signed int codegen now correct * various single precision float codegen bugs fixed * const integer multiply codegen fixed * select and setcc blocks inserted into the correct place in machine CFG * load of integer constant code optimized All of Shootout tests now work. Great thanks to Nate Begeman for the patch! llvm-svn: 15014
* Fix infinite loopChris Lattner2004-07-181-5/+5
| | | | llvm-svn: 14971
* CPR FixesChris Lattner2004-07-181-4/+2
| | | | llvm-svn: 14961
* * Use LI(S) to copy constants into registers intead of ADDI(S) as the latter isMisha Brukman2004-07-161-77/+154
| | | | | | | | | | | | a funky way to "use" R0 for a 0-valued operand * Add IMPLICIT_DEFs for incoming function arguments via registers to help the register allocator not clobber those registers * Implement comparisons with longs * Teach emitSelectOperation() to fold the SetCC operation Patch contributed by Nate Begeman llvm-svn: 14901
* Patches towards fixing PR341Chris Lattner2004-07-151-1/+1
| | | | llvm-svn: 14841
* Make sure MTSPR instruction is inserted into the BasicBlockMisha Brukman2004-07-141-1/+1
| | | | llvm-svn: 14822
* Don't define the same register twice when loading a ConstantPointerRef to a regMisha Brukman2004-07-141-5/+3
| | | | llvm-svn: 14819
* * Fix multiplication by powers of two and otherwiseMisha Brukman2004-07-141-5/+9
| | | | | | * Clarify variable name (StoreInst SI instead of LI) llvm-svn: 14818
* * Specify that FP arith options have 3 operandsMisha Brukman2004-07-131-13/+10
| | | | | | * Correctly load FP constants from the constant pool, should be refactored llvm-svn: 14799
* Correctly load FP constants out of the constant pool.Misha Brukman2004-07-121-6/+3
| | | | llvm-svn: 14782
* Add compilabilityChris Lattner2004-07-111-0/+1
| | | | llvm-svn: 14744
* * Add support for indexing into structures, thanks to Chris (x86)Misha Brukman2004-07-091-60/+94
| | | | | | | | | | | | The large diff is because of indentation of a whole region * Fix querying predecessor blocks in SelectPHINodes(), thanks to Brian (v8) * Add support for external functions malloc() and free() * Fix some code indentation Remember, kids: It's not plagiarism if you "creatively borrow" from your sources. It's called "research"! llvm-svn: 14723
* Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functionsMisha Brukman2004-07-081-3/+11
| | | | llvm-svn: 14703
* * Use several Function* for external functions instead of a std::mapMisha Brukman2004-07-081-26/+39
| | | | | | * Non-const FP values must be loaded into int regs (for vararg fns) via memory llvm-svn: 14701
* * Add support for loading FP constants from the constant poolMisha Brukman2004-07-081-10/+44
| | | | | | * Load FP values into int regs as well for vararg functions; without memory ops! llvm-svn: 14700
* * Use a map for caching lookups to external functions (fp div/rem)Misha Brukman2004-07-071-20/+28
| | | | | | * Tabs to spaces llvm-svn: 14673
OpenPOWER on IntegriCloud