1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

96 Commits

Author SHA1 Message Date
Brian Gaeke
f5697cf56c JMPL has a delay slot.
llvm-svn: 14227
2004-06-18 08:18:54 +00:00
Brian Gaeke
2a5dec63a6 Clean up the commented-out F3_3 stuff.
Replace it with a working class for FP instrs.

llvm-svn: 14226
2004-06-18 06:28:21 +00:00
Brian Gaeke
01309de73d Fix jmpl.
Add some FP moves.

llvm-svn: 14225
2004-06-18 06:28:10 +00:00
Brian Gaeke
c045f38dcb Support printing base+offset pairs where the offset is a register.
Use this for printing the jmpl indirect-call instruction.

llvm-svn: 14224
2004-06-18 06:27:59 +00:00
Brian Gaeke
92a3e14ac4 Support intrinsic calls (although no particular intrinsics are supported yet).
Support indirect calls.
Support returning a float value.

llvm-svn: 14223
2004-06-18 06:27:48 +00:00
Brian Gaeke
c5f1146e62 Add load instructions for floating-point registers.
llvm-svn: 14217
2004-06-18 05:19:27 +00:00
Brian Gaeke
7a618842f1 Support alloca instructions.
Support copying floating-point constants to registers.
Add assertion to visitCallInst to abort if we hit a NULL calledFunction, for now.

llvm-svn: 14216
2004-06-18 05:19:16 +00:00
Brian Gaeke
b824469b44 Make storeRegToStackSlot slightly shorter.
Make copyRegToReg return 1 instead of -1.
Edit a comment in emitPrologue().

llvm-svn: 14211
2004-06-17 22:34:48 +00:00
Brian Gaeke
9a0dc64af6 Set the isBranch and isTerminator flags on branch instructions correctly.
Add a FIXME about the (currently unused) JMPL instructions.

llvm-svn: 14210
2004-06-17 22:34:29 +00:00
Brian Gaeke
c82f209e72 Emit stores correctly; don't fail an assertion.
llvm-svn: 14209
2004-06-17 22:34:19 +00:00
Brian Gaeke
d084a534a2 Support generating machine instructions for Phi nodes (based on x86, but with
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.

llvm-svn: 14208
2004-06-17 22:34:08 +00:00
Brian Gaeke
af2408a4ee Recognize more branches.
llvm-svn: 14207
2004-06-17 22:33:57 +00:00
Brian Gaeke
7d711d517b Use addGlobalAddress and addMBB for call & branch targets instead of addPCDisp.
Abort if we see a PCRelativeDisp MachineOperand, to be safe. This matches
the X86 backend.

llvm-svn: 14202
2004-06-17 19:39:23 +00:00
Chris Lattner
0cd29ae2cd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Brian Gaeke
0a7b268b1a Fix thinko in visitor... ShiftInsts should currently be delegated
to visitBinaryOperator.

llvm-svn: 14182
2004-06-15 21:09:46 +00:00
Brian Gaeke
5fe5e06bea I think we'll use the standard lowering passes for now.
llvm-svn: 14179
2004-06-15 20:37:12 +00:00
Brian Gaeke
d5f45ba4a1 Fix bug generating code for void call instructions: don't call
getReg() on void value.

llvm-svn: 14178
2004-06-15 20:06:32 +00:00
Brian Gaeke
79008f4648 Squash a warning from the Solaris assembler by aligning the stack
on a double-word boundary instead of a single-word boundary.

llvm-svn: 14177
2004-06-15 19:53:10 +00:00
Brian Gaeke
e02c780919 Allow special-casing of operand printing based on opcode. Print
non-register, non-immed. arguments to SETHI and OR using %hi() and
%lo() respectively.

llvm-svn: 14176
2004-06-15 19:52:59 +00:00
Brian Gaeke
b158cb6411 Support constant GEP expressions.
Support copying long constants to register pairs.
Support copying ConstantPointerNulls and ConstantPointerRefs to registers.

llvm-svn: 14175
2004-06-15 19:16:07 +00:00
Chris Lattner
5ce60a188d Adjust to new TM interfaces
llvm-svn: 13949
2004-06-02 05:47:26 +00:00
Brian Gaeke
7cc5d0f106 Add support for widening integral casts.
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.

llvm-svn: 13423
2004-05-08 06:36:14 +00:00
Brian Gaeke
58fd2b0e4a Add a bunch more branches
llvm-svn: 13422
2004-05-08 06:08:29 +00:00
Brian Gaeke
faf41642ca Flesh out GEP support
llvm-svn: 13421
2004-05-08 05:27:20 +00:00
Brian Gaeke
e44dbd4a39 Add ADD with immediate
llvm-svn: 13420
2004-05-08 05:26:55 +00:00
Brian Gaeke
5861a59506 Add forms of CMP, SUBCC, and a few branches, and some comments.
llvm-svn: 13419
2004-05-08 04:21:32 +00:00
Brian Gaeke
eaf8a021e3 Add stub support for GEPs.
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.

llvm-svn: 13418
2004-05-08 04:21:17 +00:00
Brian Gaeke
0d477a958f Add support for copying bool constants to registers.
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.

llvm-svn: 13413
2004-05-07 21:39:30 +00:00
Brian Gaeke
336b83623a I don't think we have to have 4 extra allocated (but unused) bytes on the stack.
llvm-svn: 12905
2004-04-13 18:28:37 +00:00
Brian Gaeke
6d8a362874 I started working on casts, but I don't have anything compilable yet.
llvm-svn: 12903
2004-04-13 18:27:46 +00:00
Brian Gaeke
6badc5d83b Don't print [%reg + 0], just print [%reg]
llvm-svn: 12759
2004-04-07 17:33:56 +00:00
Brian Gaeke
cb5141b4de First version of code to handle loads. Stub function for handling stores.
llvm-svn: 12758
2004-04-07 17:29:37 +00:00
Brian Gaeke
3e29bc5a19 Support loading arguments from %I0...%I5 into virtual registers in
function prologues, and fix an off-by-one in visitCallInst that was
putting call args into the wrong registers.

llvm-svn: 12757
2004-04-07 17:04:09 +00:00
Brian Gaeke
3eb6c1d3ae It's setting up the call args right now, but on the callee side, it's
trying to get incoming args off the stack, instead of the %i0...%i6 regs,
which is wrong.

llvm-svn: 12756
2004-04-07 16:41:22 +00:00
Chris Lattner
37a392dc52 This is a start on handling setcc instructions. As the comment notes, we
have no good way of handling this until the code generator is improved.
We should probably just emit V9 instructions in the meantime.

llvm-svn: 12745
2004-04-07 05:04:51 +00:00
Chris Lattner
bb67452b4b andd subcc instructions which is used to create the 'cmp' pseudo instruction
llvm-svn: 12744
2004-04-07 05:04:01 +00:00
Chris Lattner
2f63fbf9d5 Avoid emitting an extra copy on each 32-bit operation
llvm-svn: 12743
2004-04-07 04:36:53 +00:00
Brian Gaeke
d98edc771e Make generation of stack-slot loads and copies less ugly.
llvm-svn: 12742
2004-04-07 04:29:14 +00:00
Brian Gaeke
90c53bcbda Fix bug in printing loads.
llvm-svn: 12741
2004-04-07 04:29:03 +00:00
Chris Lattner
be45dbdaf8 Add support for shift instructions, wrap some long lines
llvm-svn: 12740
2004-04-07 04:27:16 +00:00
Chris Lattner
ded6e64b53 Fix encoding of existing shift instructions, add rr shifts
llvm-svn: 12739
2004-04-07 04:26:57 +00:00
Chris Lattner
13546cb380 Add a bunch more instructions
llvm-svn: 12737
2004-04-07 04:06:46 +00:00
Chris Lattner
a58da750eb Merge my changes with brians
llvm-svn: 12736
2004-04-07 04:05:49 +00:00
Brian Gaeke
ece16e53c4 Add in some things I forgot, which Chris helpfully reminded me of...
llvm-svn: 12735
2004-04-07 04:05:12 +00:00
Brian Gaeke
4b90f62e6d Add support for the "Y" register, used by MUL & DIV.
llvm-svn: 12734
2004-04-07 04:01:11 +00:00
Brian Gaeke
8651efab54 Add UDIV, SDIV, and a few variants of WR.
llvm-svn: 12733
2004-04-07 04:01:00 +00:00
Brian Gaeke
0d35bd3ca9 Preliminary support for getting 64-bit integer constants into registers.
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.

llvm-svn: 12732
2004-04-07 04:00:49 +00:00
Brian Gaeke
2aa3485241 Prune unnecessary #includes
llvm-svn: 12731
2004-04-06 23:25:07 +00:00
Brian Gaeke
c59ef116a2 Simple delay slot filler pass.
llvm-svn: 12730
2004-04-06 23:21:45 +00:00
Brian Gaeke
38ad8d1aea Add references to delay slot filler pass.
Fill in addPassesToJITCompile method.

llvm-svn: 12729
2004-04-06 23:21:24 +00:00