Chris Lattner
e8e62c5431
Squelch a bogus warning.
...
llvm-svn: 18156
2004-11-23 15:56:38 +00:00
Nate Begeman
f096183b46
Don't return value from void function. This is only temporary anyway while
...
the JIT is made to work!
llvm-svn: 18155
2004-11-23 10:04:49 +00:00
Chris Lattner
b8eb5dabd7
Fix a minor bug
...
llvm-svn: 18153
2004-11-23 06:56:31 +00:00
Chris Lattner
30c5ade43e
Be really paranoid about not breaking stuff yet
...
llvm-svn: 18152
2004-11-23 06:56:18 +00:00
Chris Lattner
8bb3fbffa3
Implement the first hunk of CompilationCallback. The pieces missing are the
...
ones noted, which require funny PPC specific inline assembly.
If some angel felt the desire to help me, I think this is that last bit missing
for JIT support (however, generic code emitter might night work right with
the constant pool yet).
llvm-svn: 18151
2004-11-23 06:55:05 +00:00
Chris Lattner
ec9138be44
Implement the stub needed to get into compilation callback.
...
llvm-svn: 18147
2004-11-23 06:27:02 +00:00
Chris Lattner
5ac6f7a36d
Simplify code a bit
...
llvm-svn: 18146
2004-11-23 06:05:44 +00:00
Chris Lattner
37a72a9ef2
Initial implementation of the JIT interfaces. Relocation is done and stubs
...
for external functions work. CompilationCallback has not been written, and
stubs for internal functions are not generated yet. This means you can call
printf and exit, and use global variables, but cannot call functions local to
a module yet.
llvm-svn: 18145
2004-11-23 06:02:06 +00:00
Chris Lattner
2f47d181d8
Emit relocations for the global variable using instructions. This gets us
...
LA, LOADHiAddr, CALLpcrel, and MovePCtoLR working, though the constant pool
probably is not right.
llvm-svn: 18144
2004-11-23 05:59:53 +00:00
Chris Lattner
17d87ca91f
Implement all of the methods
...
llvm-svn: 18142
2004-11-23 05:57:57 +00:00
Chris Lattner
068ade1373
Initial checkin of the 32-bit PPC relocation types
...
llvm-svn: 18141
2004-11-23 05:57:38 +00:00
Chris Lattner
e74f5f8a4e
Move JITInfo from PPCTM to PPC32TM
...
llvm-svn: 18140
2004-11-23 05:56:40 +00:00
Chris Lattner
8e3800acc9
Do not provide the non-specialized PowerPCJITInfo object, it is pretty useless.
...
Instead, let derived classes provide specialized ones.
llvm-svn: 18139
2004-11-23 05:55:38 +00:00
Chris Lattner
1b163867c6
LA is really addi. Be consistent with operand ordering to avoid confusing the code emitter
...
llvm-svn: 18138
2004-11-23 05:54:25 +00:00
Chris Lattner
3e3ba3b1cf
Remove some dead code
...
llvm-svn: 18136
2004-11-22 23:07:22 +00:00
Chris Lattner
5b68bdb2ce
Comment out a couple of unused instructions.
...
llvm-svn: 18135
2004-11-22 23:07:01 +00:00
Chris Lattner
a020fc1650
Disable this.
...
llvm-svn: 18130
2004-11-22 21:51:40 +00:00
Chris Lattner
bab8204396
This chunk of code needs to be rewritten
...
llvm-svn: 18127
2004-11-22 21:45:54 +00:00
Nate Begeman
7ec36ad70f
Fix Shootout-C++/wc, which was broken by my recent changes to emit fewer
...
reg-reg copies. The necessary conditions for this bug are a GEP that is
used outside the basic block in which it is defined, whose components
other than the pointer are all constant zero, and where the use is
selected before the definition (backwards branch to successsor block).
llvm-svn: 18084
2004-11-21 05:14:06 +00:00
Chris Lattner
3e3645938e
ignore generated files.
...
llvm-svn: 18072
2004-11-21 00:00:54 +00:00
Chris Lattner
3ff7bafe17
Remove this method, it's not clear how it could be implemented indep of 32 or 64-bit mode
...
llvm-svn: 18038
2004-11-20 04:17:17 +00:00
Chris Lattner
e3461cf0bc
getJITStubForFunction is optional and unimplemented, just remove it.
...
llvm-svn: 18036
2004-11-20 04:14:44 +00:00
Nate Begeman
83cded0ecb
Eliminate another 6k register copies that the register allocator would just
...
coalesce out of hbd. Speeds up compilation by 2% (0.6s)
llvm-svn: 17987
2004-11-19 08:01:16 +00:00
Nate Begeman
de1fd6a162
Generate fewer reg-reg copies for the register allocator to deal with.
...
This eliminates over 2000 in hbd alone.
llvm-svn: 17973
2004-11-19 02:06:40 +00:00
Nate Begeman
567d30174a
Eliminate another common source of moves that the register allocator
...
shouldn't be forced to coalesce for us: folded GEP operations. This too
fires thousands of times across the testsuite.
llvm-svn: 17947
2004-11-18 07:22:46 +00:00
Nate Begeman
3e1aaef2b5
When accessing the base register for global variables, use the register
...
directly rather than making a copy for the register allocator to coalesce.
This kills thousands of live intervals across the testsuite.
llvm-svn: 17946
2004-11-18 06:51:29 +00:00
Nate Begeman
7e254235e2
Clean up and fix cast codegen by removing cases that are handled elsewhere,
...
and properly emitting signed short to unsigned int. This fixes the last
regression vs. the CBE, MultiSource/Applications/hbd.
llvm-svn: 17942
2004-11-18 04:56:53 +00:00
Chris Lattner
c13149e03e
Simplify namespaces
...
llvm-svn: 17870
2004-11-16 04:47:33 +00:00
Misha Brukman
757502af07
Add BCTR and LWZU instruction opcodes
...
llvm-svn: 17851
2004-11-15 21:20:09 +00:00
Misha Brukman
0d900050be
Handle GhostLinkage (should not ever reach the assembly printing stage!)
...
llvm-svn: 17749
2004-11-14 21:03:30 +00:00
Misha Brukman
c98cd22aae
Fix build on Linux/PowerPC64 using SuSE GCC (#undef PPC)
...
llvm-svn: 17744
2004-11-14 20:34:01 +00:00
Nate Begeman
398bd2b9f6
Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
...
llvm-svn: 17637
2004-11-09 04:01:18 +00:00
Nate Begeman
a0c15f3ffd
Put int the getReg cast optimization from x86 so that we generate fewer
...
move instructions for the register allocator to coalesce.
llvm-svn: 17608
2004-11-08 02:25:40 +00:00
Nate Begeman
a7541b19fc
Disable bogus cast elimination when the cast is used by a setcc instruction.
...
llvm-svn: 17583
2004-11-07 20:23:42 +00:00
Nate Begeman
bc8bc24d28
Thanks to sabre for pointing out that we were incorrectly codegen'ing
...
int test(int x) { return 32768 - x; }
Fixed by teaching the function that checks a constant's validity to be used
as an immediate argument about subtract-from instructions.
llvm-svn: 17476
2004-11-04 19:43:18 +00:00
Reid Spencer
d3f7233495
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Nate Begeman
46c3a8875f
Remove file that is no longer used, and move include of MRegisterInfo.h
...
from PowerPCFrameInfo.h to PowerPCAsmPrinter.cpp where it is actually
needed.
llvm-svn: 17244
2004-10-26 06:02:38 +00:00
Nate Begeman
7c3c97af10
Eliminate usage of MRegisterInfo::getRegClass(physreg)
...
llvm-svn: 17240
2004-10-26 05:40:45 +00:00
Nate Begeman
ae98298003
Update to-do list
...
llvm-svn: 17235
2004-10-26 04:10:53 +00:00
Nate Begeman
113f516f6b
Fix treecc. Also fix a latent bug in emitBinaryConstOperation that would
...
allow and const, 0 to be incorrectly codegen'd into a rlwinm instruction.
llvm-svn: 17234
2004-10-26 03:48:25 +00:00
Chris Lattner
9c356da87d
Disable the JIT until it can sorta kinda work.
...
llvm-svn: 17230
2004-10-25 20:53:41 +00:00
Nate Begeman
4b5ed899fd
Implement more complete and correct codegen for bitfield inserts, as tested
...
by the recently committed rlwimi.ll test file. Also commit initial code
for bitfield extract, although it is turned off until fully debugged.
llvm-svn: 17207
2004-10-24 10:33:30 +00:00
Misha Brukman
f8bd6fc901
* Correctly handle the MovePCtoLR pseudo-instr with a bl to next instr
...
* Stop the confusion of using rv and Addr for global addresses: just use rv
llvm-svn: 17195
2004-10-23 23:47:34 +00:00
Misha Brukman
58d9e43fa1
Add BA, BL, and BLA opcodes
...
llvm-svn: 17193
2004-10-23 20:29:24 +00:00
Misha Brukman
0342392149
* Do not emit IMPLICIT_DEF pseudo-instructions
...
* Convert register numbers from their opcode value to the real value, e.g.
PPC::R1 => 1 and PPC::F1 => 1
* Add correct handling of loading of global values which are PC-relative --
implement ha16() and lo16()
llvm-svn: 17190
2004-10-23 18:28:01 +00:00
Misha Brukman
bd6a01c3ef
DForm_1, particularly used by store instructions, needs the immediate operand to
...
be listed second as that is how the instructions are usually created (and is the
correct asm syntax) so that it's assembled correctly from its constituents
llvm-svn: 17183
2004-10-23 06:08:38 +00:00
Misha Brukman
e4ae05e099
Fix the SPR field for MTLR, MFLR, MTCTR, and MFCTR instructions.
...
The decimal value given in the manual (8 or 9) really needs to be multiplied by
a factor of 32 because of the group of 5 zero bits after the register code.
llvm-svn: 17182
2004-10-23 06:05:49 +00:00
Misha Brukman
5cea06807d
The value of the XO field for MFLR and MFCTR is 339, not 399
...
llvm-svn: 17181
2004-10-23 05:38:55 +00:00
Misha Brukman
39d23c81d4
Remove extraneous blank line
...
llvm-svn: 17180
2004-10-23 04:59:22 +00:00
Misha Brukman
c660c6c514
Align function arguments in function headers
...
llvm-svn: 17178
2004-10-23 04:58:32 +00:00