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
c6b114f258
DForm 5/6 extended mneumonics take 3 arguments.
...
llvm-svn: 15620
2004-08-10 19:03:31 +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
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
d210ed1855
Define a ClassPrefix for PowerPC.
...
llvm-svn: 15580
2004-08-09 17:46:26 +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
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
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
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
Misha Brukman
8a1978fd72
Remove unused opcodes.
...
llvm-svn: 15447
2004-08-03 20:23:44 +00:00
Misha Brukman
570dcf63e6
* Use simpler instruction templates to define instructions
...
* Fix several extended opcodes
llvm-svn: 15423
2004-08-02 21:58:52 +00:00
Misha Brukman
6b21bde2d6
Replace patterns 0, 4, and 5 with simpler heirarchical definitions that use the
...
official PowerPC instruction format lingo: X- and D-form.
llvm-svn: 15422
2004-08-02 21:56:35 +00:00
Misha Brukman
cd4f51b4b6
Separate instruction formats from instruction definitions.
...
llvm-svn: 15414
2004-08-02 16:54:54 +00:00
Misha Brukman
695d50d030
* Conditional save/restore of LR disabled as it's not quite correct
...
* sumarray2d fixed: large fixed-size alloca
* make is now compileable
* Re-organized tests to fit them under proper headings
Patch by Nate Begeman.
llvm-svn: 15347
2004-07-30 15:53:09 +00:00
Misha Brukman
c102577ff1
Do not mark LR as callee-save: not quite correctly done. Patch: Nate Begeman.
...
llvm-svn: 15346
2004-07-30 15:51:51 +00:00
Misha Brukman
471b43a357
* Temporarily suspend LR save/restore optimization as it is not quite correct
...
* Implement large fixed-size allocas Entire patch by Nate Begeman.
llvm-svn: 15345
2004-07-30 15:50:45 +00:00
Chris Lattner
07fad1cdee
Minor corrections
...
llvm-svn: 15309
2004-07-28 20:18:53 +00:00
Misha Brukman
7f01b2539b
Add notes on bug involving casting ulong -> double, thanks to Nate Begeman.
...
llvm-svn: 15307
2004-07-28 19:16:10 +00:00
Misha Brukman
862bb562cc
Simplify loading (un)signed constants to registers, patch by Nate Begeman.
...
llvm-svn: 15306
2004-07-28 19:13:49 +00:00
Misha Brukman
db13b6edba
Remove an extra 8 byte distance penalty. Patch by Nate Begeman.
...
llvm-svn: 15305
2004-07-28 19:13:07 +00:00
Misha Brukman
ca5880025d
Find longs by type, not by their primitive size being 64. Patch by Nate Begeman.
...
llvm-svn: 15304
2004-07-28 19:12:24 +00:00
Misha Brukman
f7037385e2
LI can only take signed values, so values > 32767 can only be loaded with ORI
...
llvm-svn: 15299
2004-07-28 00:56:04 +00:00
Misha Brukman
bd1d7dceb7
Reorganize tests to place them in proper directories.
...
llvm-svn: 15298
2004-07-28 00:55:12 +00:00
Misha Brukman
04dee3bb66
UnitTests 2003-05-26-Shorts and 2003-07-09-LoadShorts have been fixed;
...
2003-05-22-VarSizeArray is broken.
llvm-svn: 15297
2004-07-28 00:01:41 +00:00
Misha Brukman
47d5a22f8b
Fix printing of immediate operands by looking at their operand types in
...
the TargetInstrInfo. This fixes UnitTests 2003-05-26-Shorts and
2003-07-09-LoadShorts.
llvm-svn: 15296
2004-07-28 00:00:48 +00:00
Misha Brukman
92ca8eccd8
Renamed files:
...
* PowerPCReg.td => PowerPCRegisterinfo.td
* PowerPCInstrs.td => PowerPCInstrInfo.td
llvm-svn: 15295
2004-07-27 23:29:16 +00:00
Misha Brukman
2ffb787446
Branch selection support implemented by Nate Begeman for long branches.
...
llvm-svn: 15288
2004-07-27 18:43:04 +00:00
Misha Brukman
a594740016
Correctly print out long branches, assert on finding pseudo instr COND_BRANCH
...
Patch by Nate Begeman.
llvm-svn: 15286
2004-07-27 18:40:39 +00:00
Misha Brukman
09396bf158
Run the branch selection pass right before the asm printer.
...
Patch by Nate Begeman.
llvm-svn: 15285
2004-07-27 18:39:34 +00:00
Misha Brukman
4d66925aea
Remove empty unused method processFunctionBeforeFrameFinalized()
...
llvm-svn: 15284
2004-07-27 18:38:40 +00:00
Misha Brukman
83df71af70
Add COND_BRANCH pseudo instruction, patch by Nate Begeman.
...
llvm-svn: 15283
2004-07-27 18:35:54 +00:00
Misha Brukman
5b092c15c6
Build COND_BRANCHes which may become long or short, decided by a later pass.
...
Patch by Nate Begeman.
llvm-svn: 15282
2004-07-27 18:35:23 +00:00
Misha Brukman
a783ee55a9
Moved definition of invertPPCBranchOpcode() into PowerPCInstrInfo class.
...
Patch by Nate Begeman.
llvm-svn: 15281
2004-07-27 18:34:11 +00:00
Misha Brukman
ef8cf023a0
Add PowerPCBranchSelector to discover which are `long' branches.
...
Contributed by Nate Begeman.
llvm-svn: 15280
2004-07-27 18:33:06 +00:00
Misha Brukman
9eaa879f49
Fixed saving/restoring LR unconditionally, only done as necessary.
...
llvm-svn: 15275
2004-07-27 17:17:48 +00:00
Misha Brukman
bc1a2f96a6
Save and restore LR just like any other register and ONLY if we actually modify
...
it (due to calls or globals access). We now compile `void empty(){}' to `blr'.
llvm-svn: 15274
2004-07-27 17:17:18 +00:00
Misha Brukman
26978c3730
LR is a 32-bit int reg
...
llvm-svn: 15273
2004-07-27 17:15:32 +00:00
Misha Brukman
f1a7e941fb
MovePCtoLR (which is `bl' in disguise) modifies LR implicitly
...
llvm-svn: 15272
2004-07-27 17:15:05 +00:00
Misha Brukman
2bcffa484b
Register LR is callee-saved
...
llvm-svn: 15271
2004-07-27 17:14:34 +00:00
Misha Brukman
640ec1e5e6
Add IMPLICIT_DEF of LR for branch-and-link instrs (calls and global accesses)
...
llvm-svn: 15270
2004-07-27 17:13:58 +00:00
Misha Brukman
b5ed14486b
Do not store the stack pointer if the stack size is 0.
...
Also, convert C-style comments to C++ and make sure code wraps at 80 cols.
llvm-svn: 15245
2004-07-26 22:00:26 +00:00