Misha Brukman
efcb6b8c2c
* Coalesce the handy CALL* alias opcodes with the standard ones
...
* Congregate more branch-and-link opcodes together
* Mark FP, CPR, and special registers as volatile across calls
llvm-svn: 14511
2004-06-30 22:00:45 +00:00
Misha Brukman
7089b3d426
* Allow more registers to be allocated from the general register pool
...
* Define the condition register class
llvm-svn: 14510
2004-06-30 21:54:50 +00:00
Misha Brukman
08a07e969f
* Inquire about the number of operands from the instruction directly
...
* Only check for a register if we are sure the instruction has one allocated
llvm-svn: 14509
2004-06-30 21:54:12 +00:00
Misha Brukman
49e6aa1ba7
Always assume a function may have calls because the printer may add `bl' to get
...
the PC in a code sequence for global variables.
llvm-svn: 14506
2004-06-30 00:09:12 +00:00
Misha Brukman
3422760e16
* Don't save LR when outputting globals: it's already saved on the stack once
...
for the function
* Registers aren't necessarily sequential wrt their enums, don't rely on it
when emitting function arguments into sequential registers
* Remove X86-specific comments about AL/BL/AH/BH/EDX/etc
* Add an abort() for an unimplemented signed right shift
* The src operand for a GEP was never emitted! Fixed.
* We can skip zero-valued GEP indices as they are no-ops.
"Hello, World!" now works.
llvm-svn: 14505
2004-06-29 23:45:05 +00:00
Misha Brukman
e9166fd352
* Stop using BBNumbering, we don't really need it
...
* Only increment labelNumber once, because it's used by both Load{hi,lo}Addr
* There is no .bss section on PowerPC
* Use .align 2 instead of other random numbers
llvm-svn: 14504
2004-06-29 23:40:57 +00:00
Misha Brukman
79a92e35b4
Set up the prologue and epilogue to be more like the manual and GCC output.
...
llvm-svn: 14502
2004-06-29 23:38:26 +00:00
Misha Brukman
2242e8d27f
* Use LA instead of LWZ for LoadLoAddr
...
* Specify the isCall bit and caller-save registers for some call instrs
llvm-svn: 14501
2004-06-29 23:37:36 +00:00
Misha Brukman
a0721ac147
Only allocate non-volatile registers R13-31 (for now).
...
llvm-svn: 14500
2004-06-29 23:35:32 +00:00
Misha Brukman
ddf07d1c08
Lower ConstantExpressions before the code generator.
...
llvm-svn: 14497
2004-06-29 23:33:20 +00:00
Misha Brukman
01841234e8
* Fix saving LR in function prologue
...
* Adjust epilogue restore sequence to match the PowerPC documentation
llvm-svn: 14480
2004-06-29 17:14:42 +00:00
Misha Brukman
08f6a46ce2
Assembly syntax/comment fixes by Nate Begeman.
...
llvm-svn: 14479
2004-06-29 17:13:26 +00:00
Chris Lattner
dda82ce624
The code generator should work with unreachable blocks. If not, then this
...
is a bug that should be fixed in the code generator, not papered over with
the simplifycfg pass. Eliminating this makes bugpoint much more useful
llvm-svn: 14477
2004-06-29 07:20:16 +00:00
Misha Brukman
7627e1ff1a
Can't print out machine code before it is constructed.
...
llvm-svn: 14472
2004-06-28 21:16:57 +00:00
Misha Brukman
92cc94a0e5
Fix the assembly opcode on LOADLoAddr, courtesy of Nate Begeman.
...
llvm-svn: 14470
2004-06-28 18:27:08 +00:00
Misha Brukman
2f7332b752
Set isBranch and isTerminator bits on all branch instructions.
...
llvm-svn: 14469
2004-06-28 18:23:35 +00:00
Misha Brukman
8f1e58dfe3
Fix loading and storing PC-relative static variables, courtesy of Nate Begeman.
...
llvm-svn: 14468
2004-06-28 18:20:59 +00:00
Misha Brukman
2eccf504e2
No need to generate a lazy-linking stub for internal functions, they can be
...
resolved by the static linker.
llvm-svn: 14467
2004-06-28 18:03:37 +00:00
Misha Brukman
5a52b7aa36
Do not set the `link' bit when branching to the first BB of a function, as it
...
will cause an infinite loop. The link bit is only used for calling functions.
llvm-svn: 14466
2004-06-28 17:57:40 +00:00
Misha Brukman
02ac5488d5
Fix spacing around function arguments.
...
llvm-svn: 14463
2004-06-28 15:53:27 +00:00
Misha Brukman
aef8fec73f
Allow debugging machine instrs (by printout) before/after isel and regalloc
...
llvm-svn: 14416
2004-06-25 19:57:47 +00:00
Misha Brukman
64c1484679
Combine several if stmts with returns into an if-then-elseif-else chain.
...
llvm-svn: 14414
2004-06-25 19:24:52 +00:00
Misha Brukman
d903511cdf
Do not move any values into registers for a void return (there isn't anything).
...
llvm-svn: 14413
2004-06-25 19:04:27 +00:00
Misha Brukman
981cf1f1b4
Convert tabs to spaces.
...
llvm-svn: 14412
2004-06-25 18:45:07 +00:00
Misha Brukman
8f9b970b80
Fix opcode: no immediate in an `or r1, r2, r3' (all registers) instr.
...
llvm-svn: 14411
2004-06-25 18:36:53 +00:00
Misha Brukman
d635cd485a
* Be consistent about MachineBB labels and references to them in instr stream
...
* Use MachineBB's built-in numbering system instead of reinventing one
llvm-svn: 14408
2004-06-25 15:42:10 +00:00
Misha Brukman
4f15d2830a
* Initialize the entire array statically, not member-at-a-time
...
* Remove x86-specific comment re: intel vs. at&t assembly syntax
llvm-svn: 14406
2004-06-25 15:11:34 +00:00
Misha Brukman
fb9eb50899
Fix bug in previous checkin.
...
llvm-svn: 14405
2004-06-25 14:57:19 +00:00
Misha Brukman
4e610581b0
* Wrap long lines
...
* Replace silent fall-through FIXME comments with an error to cerr and an abort
* No need to set size of statically initialized arrays
llvm-svn: 14404
2004-06-25 14:50:41 +00:00
Misha Brukman
167dd03c82
Excise X86-specific comments.
...
llvm-svn: 14403
2004-06-25 14:13:26 +00:00
Misha Brukman
854b18fd19
Add option to print out machine code before register allocation.
...
llvm-svn: 14387
2004-06-24 23:55:01 +00:00
Misha Brukman
91ffab9644
Use DEBUG() guard for printing out debug info.
...
llvm-svn: 14386
2004-06-24 23:54:05 +00:00
Misha Brukman
1d7c31b2c1
Add a `break' in the switch/case statement between the int/fp sections.
...
llvm-svn: 14385
2004-06-24 23:53:24 +00:00
Misha Brukman
4e3d5069db
* Lowercase the register names
...
* Parenthesize assert() expressions correctly
* Fix spacing around for() and if() statements
llvm-svn: 14384
2004-06-24 23:51:00 +00:00
Misha Brukman
5d0be46fb7
* Tabs to spaces
...
* Send an error message to std::cerr before abort()ing
llvm-svn: 14381
2004-06-24 23:19:36 +00:00
Misha Brukman
b312aa9f4b
* Tabs to spaces
...
* Remove unnecessary parens, braces, clean up code layout
llvm-svn: 14379
2004-06-24 23:04:11 +00:00
Misha Brukman
2faa0989d0
Unindent some more code to be consistent.
...
llvm-svn: 14377
2004-06-24 22:00:15 +00:00
Misha Brukman
021bf53a50
Unindent some code, it only needs 2 spaces.
...
llvm-svn: 14376
2004-06-24 21:56:15 +00:00
Misha Brukman
ec698da314
In emitting code for a GEP instr, iterate over GEPTypes because there is one
...
more operand in GEPOps than there are types in GEPTypes: the pointer that is the
first operand of the GEP instruction.
llvm-svn: 14375
2004-06-24 21:54:47 +00:00
Misha Brukman
0e076dbd7a
* Order #includes
...
* Use the DEBUG() guard for debug printouts
llvm-svn: 14367
2004-06-24 17:31:42 +00:00
Misha Brukman
ae07b686fa
Spell out `NoFramePointerElim'.
...
llvm-svn: 14300
2004-06-21 21:18:48 +00:00
Misha Brukman
a2ac4e4345
Use the common `NoFPElim' setting instead of our own.
...
llvm-svn: 14298
2004-06-21 21:10:24 +00:00
Misha Brukman
a79674d478
* Make indentation consistent at 2 chars
...
* Doxygenify function comments
* Wrap code at 80 cols
llvm-svn: 14295
2004-06-21 20:22:03 +00:00
Misha Brukman
4424ef9dd1
This file is no longer applicable.
...
llvm-svn: 14294
2004-06-21 20:17:41 +00:00
Misha Brukman
3d93b9ccca
llvm/IntrinsicLowering.h => llvm/CodeGen/IntrinsicLowering.h
...
llvm-svn: 14292
2004-06-21 18:30:31 +00:00
Misha Brukman
36089f7034
Intrinsic::isnan has gone away, support for it commented out.
...
Intrinsic::isunordered has arrived, and we just use the standard lowering
pass for it.
llvm-svn: 14290
2004-06-21 17:58:36 +00:00
Misha Brukman
1c26b2e29d
Convert tabs to spaces.
...
llvm-svn: 14289
2004-06-21 17:41:12 +00:00
Misha Brukman
30e1885192
Type::getPrimitiveID() -> getTypeID()
...
llvm-svn: 14288
2004-06-21 17:25:55 +00:00
Misha Brukman
76b4796e7c
Type::getPrimitiveID() -> getTypeID()
...
llvm-svn: 14287
2004-06-21 17:19:08 +00:00
Misha Brukman
269034c151
Initial revision
...
llvm-svn: 14283
2004-06-21 16:55:25 +00:00
Misha Brukman
130e02f232
Add file comment.
...
llvm-svn: 14172
2004-06-14 15:13:59 +00:00
Chris Lattner
1f0e0d55c4
Fix the fixed stack offset, patch contributed by Vladimir Prus
...
llvm-svn: 14110
2004-06-10 06:19:25 +00:00
Chris Lattner
5effdb67b7
fine grainify namespacification
...
llvm-svn: 11959
2004-02-28 19:53:18 +00:00
Alkis Evlogimenos
e8f9647831
Add back machine code deleter pass until we get a MachineCode pass
...
that will be responsible for the creation of MachineFunctions and will
be required by all MachineFunctionPass passes.
llvm-svn: 11453
2004-02-15 00:03:15 +00:00
Alkis Evlogimenos
b755d35fd2
Change MachineBasicBlock's vector of MachineInstr pointers into an
...
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Brian Gaeke
355bc299b7
Include PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
...
and addPassesToJITCompile() slightly.
llvm-svn: 11076
2004-02-02 19:06:36 +00:00
Brian Gaeke
24f70fa16d
Add comments describing how you would add prototypes for factory methods for
...
PowerPC-specific passes here.
llvm-svn: 11073
2004-02-02 19:05:28 +00:00
Brian Gaeke
bc72431950
Add the JITInfo object, accessor & initializer.
...
llvm-svn: 10972
2004-01-23 06:39:30 +00:00
Brian Gaeke
2757ec5b94
Add CodeEmitter and JITInfo stubs. Dump the old
...
PowerPCTargetMachine::addPassesToJITCompile() method, in favor of the
TargetJITInfo interface.
llvm-svn: 10971
2004-01-23 06:35:43 +00:00
Brian Gaeke
764f1b476a
Import of skeletal PowerPC backend I have had laying around for months...
...
llvm-svn: 10937
2004-01-21 21:13:19 +00:00