Commit Graph

2498 Commits

Author SHA1 Message Date
Misha Brukman
01d46e9c55 Implement PowerPCInstrInfo::isMoveInstr(), patch by Nate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14898 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 20:51:55 +00:00
Misha Brukman
6b4ea88e83 Add prototype for TargetInstrInfo::isMoveInstr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14897 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 20:50:55 +00:00
Misha Brukman
86fd274790 * Enable allocation of registers r2-r10
* Allocate registers 13-31 backwards (to be able to store them all at once)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14896 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 20:35:20 +00:00
Misha Brukman
2bf5438931 Add IMPLICIT_DEFS pseudo-instruction; patch by: Nate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 20:33:41 +00:00
Misha Brukman
039ba763d1 The generated instruction selector isn't (yet) functional
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 20:31:13 +00:00
Misha Brukman
da2b13f694 * Output non-lazy linking stubs for external global variables
* Get rid of dead and #if 0'd code
* Minor for loop speed-up: save end iterator instead of querying every time


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14893 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 20:29:04 +00:00
Misha Brukman
6f14ad1ca0 Define double alignment as 8 bytes now that assert(DoubleAlignment == PointerSize)
has been eliminated


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14891 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 19:32:12 +00:00
Misha Brukman
29188c6ff6 * Add spaces between words and numbers in comments printed out for longs/floats
* Print out IMPLICIT_DEFS as comments in the assembly, patch by Nate Begeman


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14890 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 19:01:13 +00:00
Misha Brukman
29baf29b01 Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14888 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 17:40:28 +00:00
Brian Gaeke
7c4676f341 Add a class for pseudo-instructions. Use it.
Add IMPLICIT_USE and IMPLICIT_DEF, a la X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14884 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 10:32:10 +00:00
Brian Gaeke
7d7ac63366 Add what will eventually be the TSFlags. Big switch(opcode) statements are bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14883 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 10:31:59 +00:00
Brian Gaeke
d303a2058c Add special handling for pseudo-instructions (print them as comments).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14882 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 10:31:47 +00:00
Brian Gaeke
22b5cd8ac7 Add to-do list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14881 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 10:31:36 +00:00
Brian Gaeke
812c488f0a Do IMPLICIT_DEFs on incoming args' hard regs, to avoid confusing the regalloc.
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-16 10:31:25 +00:00
Chris Lattner
81d54465d9 The powerpc is now gone. However it is now just known as the Skeleton target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 07:14:34 +00:00
Chris Lattner
9404cce349 Build the skeleton target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14875 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 07:11:53 +00:00
Chris Lattner
5ad021c8d4 Initial checkin of the rest of the skeleton target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 07:11:15 +00:00
Chris Lattner
25c29d1e6c Initial skeleton tablegen files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14873 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 06:29:19 +00:00
Chris Lattner
522d9834a2 Add skeleton makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14872 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 06:20:55 +00:00
Chris Lattner
6efa9d018c Initial readme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 06:12:28 +00:00
Chris Lattner
4d143ee019 IA64 compat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:08:28 +00:00
Chris Lattner
23f9ef062a Use new macro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14865 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:04:54 +00:00
Chris Lattner
69e5845a81 Nuke a clearly bogus assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14854 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 07:44:34 +00:00
Chris Lattner
f51c7f56ca Fix for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14845 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:40:04 +00:00
Chris Lattner
017fdcb76d Revert stuff that I didn't mean to checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14844 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:33:38 +00:00
Chris Lattner
76e2df2645 Patches towards fixing PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14841 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:14:30 +00:00
Chris Lattner
d2995df5b7 Improve codegen for the LLVM offsetof/sizeof "operator". Before we compiled
this LLVM function:

int %foo() {
        ret int cast (int** getelementptr (int** null, int 1) to int)
}

into:

foo:
        mov %EAX, 0
        lea %EAX, DWORD PTR [%EAX + 4]
        ret

now we compile it into:

foo:
        mov %EAX, 4
        ret

This sequence is frequently generated by the MSIL front-end, and soon the malloc lowering pass and
Java front-ends as well..

-Chris


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14834 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 00:58:53 +00:00
Misha Brukman
5f8cce1348 Make sure MTSPR instruction is inserted into the BasicBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14822 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 18:26:31 +00:00
Misha Brukman
32caa8de62 Don't define the same register twice when loading a ConstantPointerRef to a reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14819 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 17:57:04 +00:00
Misha Brukman
8d442c2dc4 * Fix multiplication by powers of two and otherwise
* Clarify variable name (StoreInst SI instead of LI)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14818 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 15:29:51 +00:00
Brian Gaeke
d94b6d3fa5 Add Machine-CFG edges to SparcV9 MachineBasicBlocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14806 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-14 05:40:50 +00:00
Misha Brukman
a596f8c3aa * Specify that FP arith options have 3 operands
* Correctly load FP constants from the constant pool, should be refactored


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14799 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-13 15:35:45 +00:00
Misha Brukman
d9aa7836e2 Correctly load FP constants out of the constant pool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 23:49:47 +00:00
Misha Brukman
f028f82a58 Apple's MacOS X is another OS which does not provide alloca() via <alloca.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14781 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 23:37:18 +00:00
Misha Brukman
01eca8d2c2 Implement getModuleMatchQuality and getJITMatchQuality() for PowerPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14780 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 23:36:12 +00:00
Chris Lattner
7c38def077 Implement TargetRegistrationListener
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14759 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 06:03:21 +00:00
Chris Lattner
68905bb6fc Delete the allocate*TargetMachine function, which is now dead.
The shared command line options are now in a header that makes sense.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14757 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:17:58 +00:00
Chris Lattner
0cf0c37469 Delete the allocate*TargetMachine function, which is now dead .
The shared command line options are now in a header that makes sense.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14756 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:17:10 +00:00
Chris Lattner
4e547ec8bf Delete the allocate*TargetMachine function, which is now dead .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14755 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:16:31 +00:00
Chris Lattner
d7099bc608 Implement a couple of methods that TargetMachineRegistry now provides. See,
I told you this file wasn't useless :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14749 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:00:19 +00:00
Chris Lattner
71d24aab2d Make these format a bit nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14747 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 03:27:42 +00:00
Chris Lattner
d36c970a11 Auto-registrate target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 02:48:49 +00:00
Chris Lattner
98599d098f Add compilability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14744 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 02:48:28 +00:00
Chris Lattner
bf5733737f Initial impl of this file. Yes this is pretty useless right now, but it
will grow in time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14743 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 02:44:26 +00:00
Misha Brukman
313efcb886 * Add support for indexing into structures, thanks to Chris (x86)
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"!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14723 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 15:45:07 +00:00
Misha Brukman
c1ef127ae2 Read/write the offset value for stack-relative loads via correct instr operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14722 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-09 15:37:16 +00:00
Misha Brukman
f3f6382423 Add support for __fixdfdi(), __floatdisf(), and __floatdidf() external functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14703 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 19:41:16 +00:00
Misha Brukman
0aa97c625b * Use several Function* for external functions instead of a std::map
* Non-const FP values must be loaded into int regs (for vararg fns) via memory


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14701 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 18:27:59 +00:00
Misha Brukman
fc879c336b * Add support for loading FP constants from the constant pool
* Load FP values into int regs as well for vararg functions; without memory ops!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14700 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 18:02:38 +00:00
Misha Brukman
05fcd0c891 * Fix header comment, excise references to X86
* Add suport for printing out references to constant pool indices


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14699 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-08 17:58:04 +00:00