summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
...
* brgBrian Gaeke2002-12-161-11/+12
| | | | | | | | | Fix some bugs in use of MBB vs. BB and iterators that are invalidated before we use them. Reference targetClass by enum name, not by number. llvm-svn: 5069
* Correct the setting of Def flags on registers that are modified!Chris Lattner2002-12-151-11/+9
| | | | llvm-svn: 5065
* Give passes nice names!Chris Lattner2002-12-154-0/+16
| | | | llvm-svn: 5059
* Simplify interfaces used by regalloc to insert codeChris Lattner2002-12-152-44/+32
| | | | llvm-svn: 5052
* Changes to make new TargetRegisterClass interface.Chris Lattner2002-12-151-61/+32
| | | | llvm-svn: 5050
* * Simplify TargetRegisterClass implementationsChris Lattner2002-12-152-26/+9
| | | | | | * Change regclass iterators to use an extra level of pointers llvm-svn: 5047
* Add support to cast from a bool typeChris Lattner2002-12-151-6/+12
| | | | | | | Add support for boolean constants add getClassB method llvm-svn: 5034
* Use MachineOperand::isFoo methods instead of our own global functionsChris Lattner2002-12-153-50/+22
| | | | llvm-svn: 5033
* Implement indirect function callsChris Lattner2002-12-132-2/+12
| | | | llvm-svn: 5024
* Make function code generation printing debug-only.Misha Brukman2002-12-131-4/+3
| | | | llvm-svn: 5023
* Fix bork in doMultiplyChris Lattner2002-12-131-3/+4
| | | | llvm-svn: 5021
* Add sanity checksChris Lattner2002-12-131-0/+2
| | | | llvm-svn: 5020
* Cleaned up the code: factored out switch/case into a separate function, putMisha Brukman2002-12-131-43/+22
| | | | | | | constants in an array for quick lookup. Stole the idea from elsewhere in Jello. llvm-svn: 5017
* Insert phi code at top of blockChris Lattner2002-12-131-2/+5
| | | | llvm-svn: 5015
* lib/Target/X86/InstSelectSimple.cpp:Brian Gaeke2002-12-131-1/+1
| | | | | | | | The MachineBasicBlock variable name patrol hereby fines Chris Lattner one bag of nachos, for shadowing global names while his license to do so was under suspension. llvm-svn: 5014
* Implement cast bool to XChris Lattner2002-12-131-3/+4
| | | | llvm-svn: 5012
* Rename all BMI MachineBasicBlock operands to MBB.Brian Gaeke2002-12-131-21/+22
| | | | | | | Try to mess around with emitGEPOperation's elementSizeReg to make it work, again. llvm-svn: 5011
* Finish up iterator stuphChris Lattner2002-12-131-32/+49
| | | | llvm-svn: 5009
* Treat longs as ints => pretend they're all 32-bit values and squeeze them intoMisha Brukman2002-12-131-0/+6
| | | | | | 32-bit registers. llvm-svn: 5008
* Code gen phi's correctlyChris Lattner2002-12-131-39/+109
| | | | llvm-svn: 5004
* Print X86 PHI nodes in a sane mannerChris Lattner2002-12-131-0/+16
| | | | llvm-svn: 5003
* Added moveReg2Reg() and moveImm2Reg() to accomodate moving data around due toMisha Brukman2002-12-132-0/+46
| | | | | | PHI nodes. llvm-svn: 5001
* lib/Target/X86/InstSelectSimple.cpp: Start counting arguments with 2,Brian Gaeke2002-12-132-14/+19
| | | | | | | | | | | | | | | | because arguments start two stack slots off of EBP. Break out of the for loop once the argument is found. Increment the counter at the end of the loop instead of the beginning. Use addRegOffset and compute the scale * index part at compile time instead of using the fancy load instruction. Just because an instruction set has wacky addressing modes doesn't mean we ought to use them (at least, if you believe Dave Patterson). lib/Target/X86/X86InstrBuilder.h: Add some comments. test/Regression/Jello/test-loadstore.ll: Let main return int 0. llvm-svn: 4999
* InstSelectSimple.cpp: Give promote32 a comment. Add initialBrian Gaeke2002-12-134-10/+33
| | | | | | | | | | | implementation of getReg() for arguments. MachineCodeEmitter.cpp: Fix using EBP with index, scale and no displacement (whew!) due to Chris. Printer.cpp: Fix printing out index and scale in memory references. llvm-svn: 4998
* Implement getelementptr constant exprsChris Lattner2002-12-132-33/+45
| | | | | | | Implement ConstantPointerRefs Treat long/ulongs as if they were integers. A hack, but an effective one llvm-svn: 4995
* brgBrian Gaeke2002-12-132-1/+33
| | | | | | | | | | | | | InstSelectSimple.cpp: Add stub implementation of visitFreeInst. Add comments that mention how we are failing to implement malloc/free. Add initial implementation of visitAllocaInst. X86TargetMachine.cpp: Include llvm/Transforms/Scalar.h. Add LowerAllocations pass before instruction selection. jello/Makefile: Add scalaropts.a. llvm-svn: 4994
* Emit the right form of mod/rm mod fieldChris Lattner2002-12-132-2/+2
| | | | llvm-svn: 4986
* Nicify a bitChris Lattner2002-12-131-2/+1
| | | | llvm-svn: 4985
* Fix encoding of CBW instructionChris Lattner2002-12-131-1/+1
| | | | llvm-svn: 4983
* Moves now select correct opcode based on the data size.Misha Brukman2002-12-131-3/+18
| | | | llvm-svn: 4981
* Remove extranous #includeChris Lattner2002-12-131-1/+0
| | | | llvm-svn: 4980
* Rename MemArg* to Arg*Chris Lattner2002-12-135-49/+49
| | | | llvm-svn: 4979
* Make mem size an assertChris Lattner2002-12-133-27/+17
| | | | | | Add mem size flags to all instructions using an imm llvm-svn: 4978
* This is supposed to provide correct size for datatypes. Supposedly.Misha Brukman2002-12-132-4/+40
| | | | llvm-svn: 4977
* Added the flag to mark instructions which are really 2-address instructions inMisha Brukman2002-12-121-35/+35
| | | | | | X86, but would be 3-address in any normail architecture. llvm-svn: 4974
* This checkin is brought to you by the brian gaeke allnighter fund.Brian Gaeke2002-12-122-30/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (lib/Target/X86) InstSelectSimple.cpp: Include llvm/DerivedTypes.h and iostream. Refactor visitMul out into a wrapper around doMultiply(), so that we can do multiplications on temporary values when we are doing getelementptrs. Refactor part of getReg out into makeAnotherReg, so that we can create registers willy-nilly to hold temporary values, when we are doing getelementptrs. Add stub implementations of visitMallocInst and visitAllocaInst. Add initial implementation of visitGetElementPtrInst. In copyConstantToRegister: We throw a *lot* of our asserts here. So, when we want to throw an assert, print out to stderr whatever expr or whatever constant made us barf. Support copying ConstantPointerNull to register, using a move immediate of zero. Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings of the numbers in the other instruction names. All uses modified. Teach visitCallInst to extract byte- and short-class return values from subregs of EAX. Add a FIXME note about how we would do it for float-class return values. Add a FIXME note about how we would cast float to int and back. X86InstrInfo.def: Rename FLDr4 and FLDr8 to FLDr32 and FLDr64, so that they match the meanings of the numbers in the other instruction names. All uses modified. (tools/jello) GlobalVars.cpp: Include iostream. If we have to emit a floating-point constant to memory, gamble and use the same method as for ints. If we have to emit a ConstantPointerNull to memory, try using a "void *" and "NULL". Otherwise, if we are going to throw an assert, print out whatever constant made us barf, first. llvm-svn: 4973
* Implement a lot of cast functionality (no FP or 64)Brian Gaeke2002-12-061-34/+62
| | | | llvm-svn: 4944
* Target/X86/Printer.cpp: Add sizePtr function, and use it instead ofBrian Gaeke2002-12-053-111/+143
| | | | | | | | | | | | | | | | | | " <SIZE> PTR " string when emitting assembly. Target/X86/X86InstrInfo.def: Tidy up a bit: Squashed everything down to 118 chars wide, wrapping lines so that comment is at the same point on each line. Rename "NoImpRegs" as "NoIR". (most instructions have NoImpRegs twice on a line, so this saves 10 columns). Also, annotate various instructions with flags for size of memory operand. (MemArg16, MemArg32, MemArg64, etc.) Target/X86/X86InstrInfo.h: Define flags for size of memory operand. (MemArg16, MemArg32, MemArg64, etc.) llvm-svn: 4932
* Implemented functions for emitting prologues and epilogues;Misha Brukman2002-12-042-1/+62
| | | | | | removed EBP from the list of callee-saved registers (it isn't one). llvm-svn: 4929
* Added push and pop instructions.Misha Brukman2002-12-041-1/+2
| | | | llvm-svn: 4928
* Fix handling of function calls that return voidChris Lattner2002-12-041-9/+11
| | | | llvm-svn: 4925
* Implement initial support for return values from call instructionsChris Lattner2002-12-041-0/+14
| | | | llvm-svn: 4924
* Adjust the stack pointer after a function call, proportional to the number ofMisha Brukman2002-12-041-0/+9
| | | | | | arguments pushed onto the stack. llvm-svn: 4922
* Added instructions to add/subtract imm32 to/from a reg32.Misha Brukman2002-12-041-0/+2
| | | | llvm-svn: 4921
* Fix bogus assertion failuresChris Lattner2002-12-043-3/+3
| | | | llvm-svn: 4919
* Avoid bad assertionChris Lattner2002-12-041-1/+1
| | | | llvm-svn: 4918
* Remove think-o assertionChris Lattner2002-12-041-2/+0
| | | | llvm-svn: 4917
* Avoid crashing on Arguments, just silently miscompileChris Lattner2002-12-041-0/+2
| | | | llvm-svn: 4916
* storeReg2RegOffset() and loadRegOffset2Reg() now take the iterator by valueMisha Brukman2002-12-042-4/+4
| | | | | | instead of by reference, since they return the modified iterator. llvm-svn: 4914
* Moved buildReg2RegClassMap() into from X86RegisterInfo to MRegisterInfo, sinceMisha Brukman2002-12-042-15/+0
| | | | | | it is target-independent. llvm-svn: 4911
OpenPOWER on IntegriCloud