Commit Graph

66 Commits

Author SHA1 Message Date
Brian Gaeke
8005ed3bd7 Don't print [%reg + 0], just print [%reg]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12759 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 17:33:56 +00:00
Brian Gaeke
f3334ebbe3 First version of code to handle loads. Stub function for handling stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12758 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 17:29:37 +00:00
Brian Gaeke
562cb16381 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12757 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 17:04:09 +00:00
Brian Gaeke
d54c38b2f4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 16:41:22 +00:00
Chris Lattner
4d0cda4d5c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 05:04:51 +00:00
Chris Lattner
6179047661 andd subcc instructions which is used to create the 'cmp' pseudo instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12744 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 05:04:01 +00:00
Chris Lattner
0d538bbec2 Avoid emitting an extra copy on each 32-bit operation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12743 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:36:53 +00:00
Brian Gaeke
88ddd4a07d Make generation of stack-slot loads and copies less ugly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12742 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:29:14 +00:00
Brian Gaeke
fa4bb09cf0 Fix bug in printing loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12741 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:29:03 +00:00
Chris Lattner
4be7ca5721 Add support for shift instructions, wrap some long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12740 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:27:16 +00:00
Chris Lattner
a562efce35 Fix encoding of existing shift instructions, add rr shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12739 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:26:57 +00:00
Chris Lattner
22ede709f6 Add a bunch more instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12737 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:06:46 +00:00
Chris Lattner
f97b31e9cf Merge my changes with brians
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12736 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:05:49 +00:00
Brian Gaeke
0f51cc1759 Add in some things I forgot, which Chris helpfully reminded me of...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12735 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:05:12 +00:00
Brian Gaeke
59e04e4889 Add support for the "Y" register, used by MUL & DIV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12734 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:01:11 +00:00
Brian Gaeke
e88c9dc860 Add UDIV, SDIV, and a few variants of WR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12733 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:01:00 +00:00
Brian Gaeke
2d4fa8faac 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12732 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-07 04:00:49 +00:00
Brian Gaeke
ff8282604a Prune unnecessary #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12731 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 23:25:07 +00:00
Brian Gaeke
20117102c2 Simple delay slot filler pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12730 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 23:21:45 +00:00
Brian Gaeke
86a8790826 Add references to delay slot filler pass.
Fill in addPassesToJITCompile method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12729 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 23:21:24 +00:00
Brian Gaeke
3a8ad62d4f First attempt at handling frame index elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12728 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 22:10:22 +00:00
Brian Gaeke
1c38175d6b First attempt at special-casing printing of [%reg + offset] for
ld/st instructions - doesn't seem to work yet, but I think it's
just a typo or something somewhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12727 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 22:10:11 +00:00
Brian Gaeke
856e4fc59e Delete reference to "the Mach-O Runtime ABI".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12726 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 22:09:59 +00:00
Brian Gaeke
ea8494bb89 Deal with call return values.
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-06 22:09:23 +00:00
Brian Gaeke
6c5526e56e Add support for many of the MRegisterInfo callbacks.
Eliminating call-frame pseudo instrs and frame indices are still stubs.
Flesh out the emitPrologue method based on better ABI knowledge.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12632 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:53:37 +00:00
Brian Gaeke
8542e08d15 Add load, store, and NOP instructions.
Fix up comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12631 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:53:37 +00:00
Brian Gaeke
a778ca555a Add support for printing pc-relative displacements of functions (as used in
the CALL instruction).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12630 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:53:35 +00:00
Brian Gaeke
f7e44ef8d5 Add support for call instructions (0-ary only for now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12629 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:53:33 +00:00
Brian Gaeke
54cc3c2135 The .type directive on Solaris uses the # character instead of @.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:52:04 +00:00
Brian Gaeke
6d339f9000 Fix bug in zero-extending of shorts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12453 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:45:42 +00:00
Brian Gaeke
032f80fbf1 Add UMULrr and SMULrr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12452 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:37:13 +00:00
Brian Gaeke
79db7405f7 Use ! for comment char; it works in both Solaris as and GAS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:37:12 +00:00
Brian Gaeke
f57e364f65 Make getClass more robust by adding cLong.
Add handling for Mul instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12450 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 22:37:11 +00:00
Brian Gaeke
cf47198a49 Hmm, who left this sitting around in my tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 04:49:13 +00:00
Chris Lattner
9b3c702614 Avoid allocating special registers a bit more robustly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12207 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 03:48:07 +00:00
Brian Gaeke
08f64c3321 Support return values of basic integer types.
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-06 05:32:28 +00:00
Brian Gaeke
a8056fabeb Sort stanzas into Sparc V8 book page number order.
Add RET, RETL.  Rename SAVE, RESTORE & JMPL for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12185 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 05:32:13 +00:00
Brian Gaeke
bda4a3c61a Hack it so we do not try to allocate values to G0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12184 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 05:31:32 +00:00
Brian Gaeke
d69b3c58d3 Make prolog align stack properly. Make epilog not touch any registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12183 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 05:31:21 +00:00
Brian Gaeke
a8b00cafc4 Emit register names in lowercase, as required by the assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12182 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 05:30:21 +00:00
Brian Gaeke
a98e051417 Teach getRegClassForType where to find FP registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12180 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-06 03:54:13 +00:00
Brian Gaeke
62aa28aef3 Asm output is looking a lot better; not correct for all operands yet though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12143 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-05 08:39:09 +00:00
Brian Gaeke
7a3ae1fbad Support -print-machineinstrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12124 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 19:22:16 +00:00
Brian Gaeke
4acfd039f9 Asm printer support, based on x86 - only prints mnemonics for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12113 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 06:00:41 +00:00
Brian Gaeke
da69e7d9b3 Double-FP pseudo-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12112 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 05:15:03 +00:00
Brian Gaeke
775158d62a Subtract instructions; minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 04:37:45 +00:00
Brian Gaeke
e7173b7e8e Floating point regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12110 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 04:37:22 +00:00
Brian Gaeke
e806173ab6 Simple copyConstantToReg support, SETHIi and ORri
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12107 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-04 00:56:25 +00:00
Brian Gaeke
bc1d27aa6e Support add - note, still missing important copyConstantToRegister stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12106 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 23:03:14 +00:00
Brian Gaeke
05b15fb075 TargetCacheInfo has been removed; its only uses were to propagate a constant
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 06:43:29 +00:00