aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc/SparcV8ISelSimple.cpp
AgeCommit message (Collapse)Author
2004-09-02Back to compiling land for v8Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16138 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18CPR fixesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14960 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16Do IMPLICIT_DEFs on incoming args' hard regs, to avoid confusing the regalloc.Brian Gaeke
Support single-fp incoming args. Support single-fp outgoing args ('call' operands). Support double-fp return values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14880 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08Support setcc on fp values.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08Fix bug involving bool arguments to binary operators.Brian Gaeke
Fix typo in comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14684 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08Fix bug in copying long constants to register pairs. We were gettingBrian Gaeke
the top and bottom halves backwards...how embarrassing. Support 'cast long to long' and other similar no-op casts to long. Support 'ret long'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14683 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08Support 'ret float'Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14681 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04Add #includesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14625 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-30Fix indentation to be 2 spaces.Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14512 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-30visitSetCondInst() takes a parameter of type `SetCondInst'Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14508 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-27Trim whitespace.Brian Gaeke
Support cast of ints (and narrower) to float and double. Support cast double to double (using load and store). Abort if we see a CallInst or SetCondInst with long/fp args, instead of producing bad code. Support add, sub, mul, div of float and double. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14440 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24Support cast float to float, cast double to float, and cast float to double.Brian Gaeke
(It's not yet clear how to copy doubles from register to register.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14371 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24Fix a dyn_cast in copyConstantToRegister which should have been a cast.Brian Gaeke
Compactify the code that emits copies of constant ints into registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14365 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24Use correct add*Imm form in more BuildMI calls.Brian Gaeke
Fix bug in emitGEPOperation where we weren't passing MBB, IP to getReg. (hey, wouldn't a constant expression lowering pass be cool? huh huhuhuh) Fix bug in emitGEPOperation where we might try to OR a constant into a register which was too big to fit in the immediate field. Support and, or, xor of longs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14363 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24Rename the load and store opcodes. The non-fp ones only have oneBrian Gaeke
variant worth worrying about; the fp ones have two. Stub out the case analysis of int-to-fp casts (no code yet). I think the number of operands passed to BuildMI for loads was wrong. Support load and store of float and double. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14360 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24Strange as it may sound, we'll not use LDD/STD to store longs. For reasons ofBrian Gaeke
representational consistency, we want to address the halves of each 64-bit value separately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24Support constant cast expressions.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14355 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-20Move the IntrinsicLowering header into the CodeGen directory, as per PR346Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18Make visitAllocaInst() look more like its X86 counterpart.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14229 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18Support intrinsic calls (although no particular intrinsics are supported yet).Brian Gaeke
Support indirect calls. Support returning a float value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-18Support alloca instructions.Brian Gaeke
Support copying floating-point constants to registers. Add assertion to visitCallInst to abort if we hit a NULL calledFunction, for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14216 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17Support generating machine instructions for Phi nodes (based on x86, but withBrian Gaeke
modifications for 1 LLVM BB --> many MBBs). Fix store operand order: make it always be Base, Offset, SrcReg (think "[ Base + Offset ] = SrcReg"). Rewrite visitBranchInst() to be even dumber (but working) -- give up on the branch fallthrough trick, for the time being. Make visitSetCondInst() work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14208 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17Use addGlobalAddress and addMBB for call & branch targets instead of addPCDisp.Brian Gaeke
Abort if we see a PCRelativeDisp MachineOperand, to be safe. This matches the X86 backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-17Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15Fix thinko in visitor... ShiftInsts should currently be delegatedBrian Gaeke
to visitBinaryOperator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14182 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15Fix bug generating code for void call instructions: don't callBrian Gaeke
getReg() on void value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14178 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-15Support constant GEP expressions.Brian Gaeke
Support copying long constants to register pairs. Support copying ConstantPointerNulls and ConstantPointerRefs to registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14175 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08Add support for widening integral casts.Brian Gaeke
Flesh out the SetCC support... which currently ends in a little bit of unfinished code (which is probably completely hilarious) for generating the condition value splitting the basic block up into 4 blocks, like this (clearly a better API is needed for this!): BB cond. branch / / R1=1 R2=0 \ / \ / R=phi(R1,R2) Other minor edits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08Flesh out GEP supportBrian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13421 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-08Add stub support for GEPs.Brian Gaeke
Add support for branches (based loosely on X86/InstSelectSimple). Add support for not visiting phi nodes in the first pass. Add support for loading bools. Flesh out support for stores. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13418 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07Add support for copying bool constants to registers.Brian Gaeke
Disable the code that copies long constants to registers - it looks fishy. Implement some simple casts: integral, smaller than longs, and equal-width or narrowing only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-13I started working on casts, but I don't have anything compilable yet.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07First version of code to handle loads. Stub function for handling stores.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12758 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07Support loading arguments from %I0...%I5 into virtual registers inBrian Gaeke
function prologues, and fix an off-by-one in visitCallInst that was putting call args into the wrong registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12757 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07It's setting up the call args right now, but on the callee side, it'sBrian Gaeke
trying to get incoming args off the stack, instead of the %i0...%i6 regs, which is wrong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07This is a start on handling setcc instructions. As the comment notes, weChris Lattner
have no good way of handling this until the code generator is improved. We should probably just emit V9 instructions in the meantime. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07Avoid emitting an extra copy on each 32-bit operationChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12743 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07Add support for shift instructions, wrap some long linesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12740 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07Add a bunch more instructionsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12737 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07Preliminary support for getting 64-bit integer constants into registers.Brian Gaeke
Preliminary support for division. It's gross because you have to initialize the "Y" register, which is the top 32 bits of the thing you're dividing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12732 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06Deal with call return values.Brian Gaeke
Don't put NOPs in delay slots at all. We'll have a fix-up pass later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12725 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02Add support for call instructions (0-ary only for now).Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12629 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16Fix bug in zero-extending of shorts.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16Make getClass more robust by adding cLong.Brian Gaeke
Add handling for Mul instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09Hmm, who left this sitting around in my treeBrian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06Support return values of basic integer types.Brian Gaeke
Emit RETL instruction to return instead of funny JMPL. Fix indentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12186 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04Subtract instructions; minor cleanupsBrian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04Simple copyConstantToReg support, SETHIi and ORriBrian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12107 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03Support add - note, still missing important copyConstantToRegister stuffBrian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29Add an instruction selector capable of selecting 'ret void'Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11973 91177308-0d34-0410-b5e6-96231b3b80d8