Commit Graph

2125 Commits

Author SHA1 Message Date
Nate Begeman 9c7ddc3e21 Add indexed forms of load doubleword and load word algebraic for 64 bit targets
llvm-svn: 15743
2004-08-14 22:12:20 +00:00
Nate Begeman caeb78e720 Fix handling of FP constants with single precision, and loading of internal linkage function addresses
llvm-svn: 15742
2004-08-14 22:11:38 +00:00
Nate Begeman 0ad7f813d8 Add initial support for using the generated asm writer. Also, fix FP constant printing to always print 8 byte intializers. Move printing of LinkOnce stubs.
llvm-svn: 15741
2004-08-14 22:09:10 +00:00
Nate Begeman 8536df7dbe Add generation of asm writer from tablegen files to Makefile
llvm-svn: 15740
2004-08-14 22:06:38 +00:00
Nate Begeman a4da0d6294 Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get MachineFunction from MachineInstruction's parent's parent
llvm-svn: 15739
2004-08-14 22:05:10 +00:00
Nate Begeman 1b0142d54e Eliminate MachineFunction& argument from eliminateFrameIndex in SparcV9 target
llvm-svn: 15738
2004-08-14 22:03:29 +00:00
Nate Begeman 7f1f81511d Eliminate MachineFunction& argument from eliminateFrameIndex in Skeleton target
llvm-svn: 15737
2004-08-14 22:01:38 +00:00
Nate Begeman 6e5010d935 Remove an unneeded header and forward declaration
llvm-svn: 15722
2004-08-13 09:33:17 +00:00
Nate Begeman 5bf9bfe398 Fix siod by switching BoolTy to byte rather than int until CFE changes for
Darwin.  Also, change asm printer to output proper stubs for external
functions whose address is passed as an argument to aid in bugpointing.

llvm-svn: 15721
2004-08-13 09:32:01 +00:00
Nate Begeman 420213f3c5 Fix 177.mesa compilation, don't use floating point regs for base addresses!
llvm-svn: 15720
2004-08-13 04:45:14 +00:00
Nate Begeman 2f1d849271 Fix llc crasher compiling siod by giving BuildMI the correct number of arguments
llvm-svn: 15719
2004-08-13 03:56:49 +00:00
Nate Begeman 2e8bfa2364 Longs are in one register on PowerPC 64; use appropriate instructions to operate on them.
llvm-svn: 15711
2004-08-13 02:20:47 +00:00
Nate Begeman 765cb5f844 Add some more 64 bit instructions we need for the PowerPC-64 ISel to the tablegen files
llvm-svn: 15710
2004-08-13 02:19:26 +00:00
Chris Lattner f9db6ff94b Remove dead methods
llvm-svn: 15698
2004-08-12 18:37:15 +00:00
Chris Lattner 907a360b11 Fix warning
llvm-svn: 15697
2004-08-12 18:36:28 +00:00
Chris Lattner 5ff05d724f Instead of a virtual method call, lets try a direct constant reference
llvm-svn: 15696
2004-08-12 18:29:05 +00:00
Chris Lattner 6411ff3c83 Virtual method calls are overrated
llvm-svn: 15695
2004-08-12 18:20:55 +00:00
Chris Lattner df86f30815 Virtual method calls are overrated.
llvm-svn: 15694
2004-08-12 18:20:41 +00:00
Chris Lattner b0ac422db5 Remove dead methods
llvm-svn: 15691
2004-08-12 17:58:27 +00:00
Chris Lattner e843032834 When we want a constant, just use it, instead of calling through layers of
virtual methods and register name mapping functions

llvm-svn: 15690
2004-08-12 17:56:01 +00:00
Misha Brukman af77fe4097 Disable PPC64 backend by default because LLC cannot choose automatically between
SparcV9 and PowerPC64 without target triples, since they are both 64-bit
big-endian targets.

llvm-svn: 15688
2004-08-12 17:16:43 +00:00
Misha Brukman 52a4abc299 * Correct 64-bit version: blr 1 (not 0)
* BuildMI() can build 0-param instructions (e.g., NOP)

llvm-svn: 15681
2004-08-12 03:30:03 +00:00
Misha Brukman 5d967b3c5e * Print out full names for non-GPR or -FPR registers
* BuildMI() really *does* handle 0 params!

llvm-svn: 15680
2004-08-12 03:28:47 +00:00
Misha Brukman 58040a63ee * Pointers are 8 bytes, hence cLong type on 64-bit PPC
* Fix loading of GlobalValues

llvm-svn: 15678
2004-08-12 02:53:01 +00:00
Misha Brukman 6f2e67a726 Eliminate special-casing 14-bit immediate load/store opcodes
llvm-svn: 15677
2004-08-12 02:51:38 +00:00
Misha Brukman 5098bd5499 Correctly print out ASCII literal strings on AIX
llvm-svn: 15674
2004-08-12 01:01:13 +00:00
Misha Brukman 345399b06e Mark R2 as available for allocation on Darwin/PPC32, but not AIX/PPC64
llvm-svn: 15673
2004-08-12 00:10:01 +00:00
Misha Brukman c94c0f75f4 * Move AIX into the llvm namespace to be accessed from RegisterInfo
* Mark InstrInfo with 32 vs. 64 bit flag
* Enable the 64-bit isel and asm printer

llvm-svn: 15672
2004-08-11 23:47:08 +00:00
Misha Brukman aea37d65c8 Set the is64bit flag and propagate it to PowerPCRegisterInfo
llvm-svn: 15671
2004-08-11 23:45:43 +00:00
Misha Brukman 39f7533b40 * Set the is64bit boolean flag in PowerPCRegisterInfo
* Doubles are 8 bytes in 64-bit PowerPC, and use the general register class
* Use double-word loads and stores for restoring from/saving to stack
* Do not allocate R2 if compiling for AIX

llvm-svn: 15670
2004-08-11 23:44:55 +00:00
Misha Brukman c2a043488a 64-bit instruction selector and AIX-specific 64-bit asm printer
llvm-svn: 15669
2004-08-11 23:42:15 +00:00
Misha Brukman d7344dc9bd Fix names of 64-bit CMP*D* opcodes, add LWA and STD* opcodes
llvm-svn: 15668
2004-08-11 23:33:34 +00:00
Misha Brukman 78c1dcfc3e Add support for 64-bit CMPDI, CMPLDI, and CMPLD opcodes
llvm-svn: 15667
2004-08-11 20:56:14 +00:00
Misha Brukman 28beda9ba4 Add doubleword load/store (64-bit only).
llvm-svn: 15665
2004-08-11 15:54:36 +00:00
Misha Brukman 7224ee1e4c Hyphenate ##-bit and remove first-person from comments.
llvm-svn: 15663
2004-08-11 13:35:44 +00:00
Nate Begeman f17ea0f7b7 Clean up 32/64bit and Darwin/AIX split. Next steps: 64 bit ISel, AIX asm printer.
llvm-svn: 15662
2004-08-11 07:40:04 +00:00
Chris Lattner 6f0291792e Fix a case where constantexprs could leak into the PPC isel.
llvm-svn: 15661
2004-08-11 07:34:50 +00:00
Chris Lattner eb34c59930 Remove a bunch of ad-hoc target-specific flags that were only used by the
old asmprinter.

llvm-svn: 15660
2004-08-11 07:12:04 +00:00
Chris Lattner 085663c4ec Remove a dead method
llvm-svn: 15659
2004-08-11 07:07:14 +00:00
Chris Lattner d1bee6ee12 Finally, the entire instruction asmprinter is now generated from tblgen, woo!
llvm-svn: 15658
2004-08-11 07:02:04 +00:00
Chris Lattner a0bafce127 Add asmprintergen support for the last X86 instruction that needs it: pcrelative calls.
llvm-svn: 15657
2004-08-11 06:59:12 +00:00
Chris Lattner 5edeb20bbb This file is long dead
llvm-svn: 15656
2004-08-11 06:55:12 +00:00
Chris Lattner 5f4b65e57d Scrunch memoperands, add a few more for floating point memops
Eliminate the FPI*m classes, converting them to use FPI instead.

llvm-svn: 15655
2004-08-11 06:50:10 +00:00
Chris Lattner b975636f71 Move hacks up
llvm-svn: 15654
2004-08-11 06:09:55 +00:00
Chris Lattner 6dd0474edd Make FPI take asm string and operand list
llvm-svn: 15653
2004-08-11 05:54:16 +00:00
Chris Lattner c52899c3c7 Nuke the Im*i* patterns, by asmprintergenifying all users.
llvm-svn: 15652
2004-08-11 05:31:07 +00:00
Chris Lattner f5c767038a X86 instructions that read-modify-write memory are not LLVM two-address instructions.
llvm-svn: 15651
2004-08-11 05:07:25 +00:00
Chris Lattner 0d7bc2c5da Get rid of the Im8, Im16, Im32 classes, converting more instructions over to
asmprintergeneration

llvm-svn: 15650
2004-08-11 04:31:00 +00:00
Nate Begeman 7526da6ead Fix 255.vortex by using getClassB instead of getClass
llvm-svn: 15648
2004-08-11 03:30:55 +00:00
Chris Lattner 4dfadc05e6 Remove dead method
llvm-svn: 15647
2004-08-11 02:26:39 +00:00
Chris Lattner 09ee05bcdf Convert asmprinter to new style of instruction printer
Start asmprintergen'ifying machine instrs with memory operands.

llvm-svn: 15646
2004-08-11 02:25:00 +00:00
Chris Lattner 6bd2d26b56 Fill out immediate operand classes, add a new Operand class
llvm-svn: 15642
2004-08-11 01:53:34 +00:00
Misha Brukman e67a212267 Breaking up the PowerPC target into 32- and 64-bit subparts, Part III: the rest.
llvm-svn: 15636
2004-08-11 00:11:25 +00:00
Misha Brukman 284086aa4a Breaking up the PowerPC target into 32- and 64-bit subparts: Part II: 64-bit.
llvm-svn: 15635
2004-08-11 00:10:41 +00:00
Misha Brukman d022a5ac5a Breaking up the PowerPC target into 32- and 64-bit subparts, Part I: 32-bit.
llvm-svn: 15634
2004-08-11 00:09:42 +00:00
Misha Brukman 3decf86fb7 Implement new constructor.
llvm-svn: 15633
2004-08-10 23:10:25 +00:00
Misha Brukman dad438bfb9 Renamed PPC32 (namespace for regs, opcodes) to PPC to include 64-bit targets
llvm-svn: 15631
2004-08-10 22:47:03 +00:00
Misha Brukman 0b9444e536 * Fix file header to use tablegen emacs mode instead of c++
* Wrap long line to 80 cols

llvm-svn: 15630
2004-08-10 21:24:44 +00:00
Chris Lattner ce5fb7db1c This is purely a formatting patch that gets us closer to the mecca of fitting
X86InstrInfo.td into 80 columns

llvm-svn: 15629
2004-08-10 21:21:30 +00:00
Chris Lattner 116fc25d79 Drop the first argument of FPI, and asmprinterify fxch
llvm-svn: 15628
2004-08-10 21:02:13 +00:00
Nate Begeman 63be70d8f2 Fix casts of float to unsigned long
Replace STDX (store 64 bit int indexed) with STFDX (store double indexed)
Fix latent bug in indexed load generation
Generate indexed loads and stores in many more cases

llvm-svn: 15626
2004-08-10 20:42:36 +00:00
Misha Brukman 1401c28e35 Fix file header comment: update filename, set tablegen emacs mode.
llvm-svn: 15625
2004-08-10 20:28:13 +00:00
Chris Lattner ead14c1a07 This purely mechanical patch gives the "I" tblgen class operand list and asm
string operands, and adjusts all users to pass them in instead of using II.

llvm-svn: 15624
2004-08-10 20:17:41 +00:00
Chris Lattner c4eb5951d5 Convert Ii32 instructions over to use the asmprinter generator
llvm-svn: 15621
2004-08-10 19:06:36 +00:00
Misha Brukman c6b114f258 DForm 5/6 extended mneumonics take 3 arguments.
llvm-svn: 15620
2004-08-10 19:03:31 +00:00
Misha Brukman dc541abcd0 * Instruction definitions moved to SparcV9InstrInfo.td for consistency
* Defined PHI instruction and SparcV9 subclass of Target

llvm-svn: 15615
2004-08-10 18:15:31 +00:00
Misha Brukman 591d47113f Renamed SparcV9_Reg.td -> SparcV9RegisterInfo.td for consistency.
llvm-svn: 15614
2004-08-10 18:14:04 +00:00
Misha Brukman 09d87b4939 Fix DForm_4: format is `op r, r, i'
llvm-svn: 15613
2004-08-10 18:07:55 +00:00
Misha Brukman 17913b3f23 Fix comment header, specify type of file `tablegen'.
llvm-svn: 15612
2004-08-10 17:37:14 +00:00
Chris Lattner 9f49a91b44 Convert the Ii16 instructions over
llvm-svn: 15606
2004-08-10 16:22:02 +00:00
Chris Lattner 4d66b78036 Convert all Ii8 instructions over to the autogenerated asmprinter.
llvm-svn: 15605
2004-08-10 16:09:54 +00:00
Misha Brukman 8fbdc9fc4f Define the target name so we can use it via TableGen.
llvm-svn: 15604
2004-08-10 15:29:15 +00:00
Chris Lattner 1d787355e7 Paper over CBackend/2004-08-09-va-end-null.ll
Note that this indicates a serious problem with the way we are emitting varargs,
but this should not be properly fixed until after 1.3.

This patch SHOULD go into 1.3.

llvm-svn: 15602
2004-08-10 00:19:16 +00:00
Misha Brukman 189229151f Stub definition of the PowerPC CodeEmitter class; this isn't functional (yet).
llvm-svn: 15600
2004-08-09 23:03:59 +00:00
Misha Brukman eca36a5aa0 CodePrinter -> AsmPrinter
llvm-svn: 15599
2004-08-09 22:27:45 +00:00
Misha Brukman 8f951e579b Remove ClassPrefix variable as it's no longer used.
llvm-svn: 15586
2004-08-09 19:13:29 +00:00
Misha Brukman 0eb9cee698 The (future) SparcV8 JIT would do well to have a class prefix.
llvm-svn: 15583
2004-08-09 18:13:09 +00:00
Misha Brukman 11bbbb9cdd Define the ClassPrefix for SparcV9.
llvm-svn: 15581
2004-08-09 17:46:49 +00:00
Misha Brukman d210ed1855 Define a ClassPrefix for PowerPC.
llvm-svn: 15580
2004-08-09 17:46:26 +00:00
Misha Brukman 8f7272c249 Classes need to have a prefix name, so that they can be tacked on to the pieces
that TableGen creates for them, e.g. CodeEmitter, AsmPrinter, etc.

llvm-svn: 15579
2004-08-09 17:46:06 +00:00
Misha Brukman b3401c4c50 Generate a code emitter for PowerPC as well, this will be used in the JIT.
llvm-svn: 15578
2004-08-09 17:24:32 +00:00
Misha Brukman 5295e1db10 Use instruction formats as defined in the PowerPC ISA manual
llvm-svn: 15577
2004-08-09 17:24:04 +00:00
Reid Spencer 42817b7ea1 Fix stack size processing now that the return address isn't an implied
push onto the top of the stack like x86, which uses the local area
offset.  This will allow the removal of PowerPCPEI.cpp soon.

llvm-svn: 15573
2004-08-09 01:24:32 +00:00
Brian Gaeke 8d38dee7b4 dumpSavedState has outlived its usefulness.
llvm-svn: 15555
2004-08-06 19:11:43 +00:00
Chris Lattner a8dcf2423e Changes commited for Nate Begeman:
Use a PowerPC specific prolog epilog inserter to control where spilled
callee save regs are placed on the stack.
Get rid of implicit return address stack slot, save return address reg
(LR) in appropriate slot
Improve code generated for functions that don't have calls or access
globals


Note from Chris: PowerPCPEI will eventually be eliminated, once the
functionality is merged into CodeGen/PrologEpilogInserter.cpp

llvm-svn: 15536
2004-08-06 06:58:50 +00:00
Brian Gaeke a1a0643e38 Update the To-Do list according to my notes + assertions
llvm-svn: 15535
2004-08-06 04:38:13 +00:00
John Criswell 2fc39a9c2f Added Louis Gerbarg. Louis is given credit in the CREDITS.TXT file, so I
assume Louis also holds copyright.

llvm-svn: 15534
2004-08-05 23:46:27 +00:00
John Criswell e7ccf6445e Add additional copyright notice for the PowerPC backend.
Thanks Nate!

llvm-svn: 15531
2004-08-05 20:36:00 +00:00
Misha Brukman 7d41ed5271 Simplify makefile by combining all TableGen dependencies into one variable
llvm-svn: 15527
2004-08-05 18:34:15 +00:00
Misha Brukman 1d1d1c4676 PowerPC is a real target now.
llvm-svn: 15522
2004-08-05 18:22:30 +00:00
Misha Brukman 283042bed3 Hand-propagate the constant TARGET_NAME which was making lines wrap anyway
llvm-svn: 15506
2004-08-04 21:48:45 +00:00
Misha Brukman b2b9686b3a * Remove unnecessary comment
* Fix alignment of code
* Tabs to spaces

llvm-svn: 15505
2004-08-04 21:48:00 +00:00
Misha Brukman 2068654d68 Align dependencies so they don't hurt the eyes to look at them
llvm-svn: 15504
2004-08-04 21:37:41 +00:00
Misha Brukman cdd72aaa1f Remove unused instruction classes
llvm-svn: 15501
2004-08-04 21:18:57 +00:00
Misha Brukman f74157ab15 Make tablegen targets depend on PowerPCInstrFormats.td as well
llvm-svn: 15500
2004-08-04 21:18:36 +00:00
Chris Lattner 08c58e63d9 getValues does not exist
llvm-svn: 15495
2004-08-04 17:29:14 +00:00
Chris Lattner 50c6df4ba0 getValues is gone
llvm-svn: 15494
2004-08-04 17:27:27 +00:00
Alkis Evlogimenos 832437255d Stop using getValues().
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Brian Gaeke ef57e5b91a Get rid of the only use of TargetInstrInfo::getResultPos(), a deprecated method.
llvm-svn: 15483
2004-08-04 08:05:27 +00:00
Brian Gaeke def3b458b0 Include SparcV9BurgISel.h, to pick up the definition of
createSparcV9BurgInstSelector().

llvm-svn: 15474
2004-08-04 07:30:04 +00:00