1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
Commit Graph

2547 Commits

Author SHA1 Message Date
Tanya Lattner
4b705a5897 Reworked branching so we don't handle BAs specially. It just updates the branchTO regardless of what type of branch it is.
llvm-svn: 18322
2004-11-29 04:39:47 +00:00
Tanya Lattner
819de3ccd4 Fixed bug where instructions in the kernel were not ordered right to preserve dependencies in a cycle.
llvm-svn: 18314
2004-11-28 23:36:15 +00:00
Chris Lattner
1de5cd0fd0 The LLVM bool type shall have 1 byte alignment on PPC.
llvm-svn: 18311
2004-11-28 21:16:45 +00:00
Nate Begeman
6048139b1f Remove the ISel->AsmPrinter link via the TargetMachine that was put in
place to help bring up the PowerPC back end on Darwin.  This code is no
longer serves any purpose now that the AsmPrinter does the right thing
all the time printing GlobalValues.  --Cruft.

llvm-svn: 18267
2004-11-27 04:45:11 +00:00
Chris Lattner
47987cf373 There is no reason to store <x,x>, just store <x>.
llvm-svn: 18263
2004-11-26 20:25:17 +00:00
Nate Begeman
6405f5e9b3 Enable optimization suggested by Chris Lattner to not emit reloc stubs for
static global variables whose addresses are taken.  This allows us to
convert the following code for taking the address of a static function foo

        addis r2, r30, ha16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")
        lwz r3, lo16(Ll1__2E_foo_2$non_lazy_ptr-"L00001$pb")(r2)

which also includes linker stub code emitted at the end of the .s file not
shown here, and replace it with this:

        addis r2, r30, ha16(l1__2E_foo_2-"L00001$pb")
        la r3, lo16(l1__2E_foo_2-"L00001$pb")(r2)

which in addition to not needing linker help, also has no load instruction.
For those not up on PowerPC mnemonics, la is shorthand for add immediate.

llvm-svn: 18239
2004-11-25 07:09:01 +00:00
Chris Lattner
98ddaa680d Fix the build on non ppc machines
llvm-svn: 18235
2004-11-25 06:14:45 +00:00
Chris Lattner
026387ccbc The JIT works enough
llvm-svn: 18228
2004-11-25 04:14:54 +00:00
Chris Lattner
671d625e17 Fix encoding of fsel, fixing olden/power, McCat/bisort and several others.
All of Olden passes now! :)

llvm-svn: 18227
2004-11-25 04:11:07 +00:00
Chris Lattner
1f6882a401 Fix encoding of fneg instruction
llvm-svn: 18226
2004-11-25 03:53:44 +00:00
Chris Lattner
1a5a39e9ec Fix encoding of swari, fixing several programs, including Olden/mst
llvm-svn: 18225
2004-11-25 03:40:20 +00:00
Chris Lattner
01269e6ad3 There is not a 1-1 mappign between llvm blocks and PPC blocks, do not use
LLVM blocks as the keys for the branch rewriter.  This fixes treeadd and
many other programs with the JIT.

llvm-svn: 18223
2004-11-25 00:33:57 +00:00
Chris Lattner
ebbfaa3db8 * Rename existing relocations to be more specific
* Add relocations for refernces to non-lazy darwin stubs and implement
  them correctly.

With this change, we can correctly references external globals, and now
all but two UnitTests and all but 1 Regression/C tests pass.

More importantly, bugpoint-jit will start giving us useful testcases,
instead of always telling us that references to external globals don't
work :)

llvm-svn: 18222
2004-11-24 22:30:08 +00:00
Nate Begeman
e9b752c4e3 Add the same optimization that we do loading from fixed alloca slots to
storing to fixed alloca slots.

llvm-svn: 18221
2004-11-24 21:53:14 +00:00
Chris Lattner
4b48c12388 Write CompilationCallback as an explicit assembly stub to avoid getting GCC's
prolog.

llvm-svn: 18220
2004-11-24 21:01:46 +00:00
Chris Lattner
961fae4d82 When rewriting the original call instruction, make sure to rewrite it to
call the right address.

llvm-svn: 18213
2004-11-24 18:00:02 +00:00
Chris Lattner
8cd0215f14 Force the intregs ptr into R2 and the FPregs ptr into R3. This fixes a really
obscure problem where we were doing:

lmw     r3,0(r9)

which is undefined on PPC.  Now we do:

lmw     r3,0(r2)

by force, not relying on the GCC register allocator for luck :)

llvm-svn: 18212
2004-11-24 17:42:55 +00:00
Brian Gaeke
8d69439f39 Update list of failing benchmarks.
llvm-svn: 18202
2004-11-24 04:07:42 +00:00
Brian Gaeke
3bb57935a7 Fix bug in emitGEPOperation with large struct-member offsets.
llvm-svn: 18201
2004-11-24 04:07:33 +00:00
Chris Lattner
de6bb17359 Fix a few more tests by encoding the extsb and other XForm11 instructions
correctly.

llvm-svn: 18200
2004-11-24 03:52:02 +00:00
Chris Lattner
338b1b4634 Fix the encoding of ORi and other DForm4 instructions. This brings us to
36/42 SingleSource/UnitTests passing!

llvm-svn: 18199
2004-11-24 02:15:41 +00:00
Chris Lattner
2c1b140d62 Loads are relocatable too
llvm-svn: 18198
2004-11-24 02:03:44 +00:00
Chris Lattner
ef7794a7c6 Calls do not need a MovPCtoLR instruction
llvm-svn: 18197
2004-11-24 02:00:06 +00:00
Chris Lattner
9e59b1f3b5 Get constant pools working. This fixes even more programs, allowing us to
pass 24/42 in UnitTests (up from 20).

llvm-svn: 18196
2004-11-24 01:56:12 +00:00
Tanya Lattner
1d440e4782 Forced branches to be first to be scheduled.
llvm-svn: 18195
2004-11-24 01:49:10 +00:00
Chris Lattner
a4fd491b8d Rewrite branches more closely to correct. This makes more stuff pass, and
stops the infinite loops!

llvm-svn: 18194
2004-11-24 01:35:12 +00:00
Chris Lattner
a8184a2882 Branch instructions explicitly represent CRx in them. bEcause of this, encode
them explicitly as well.

llvm-svn: 18193
2004-11-24 01:15:19 +00:00
Nate Begeman
f8b9f49dc8 Fix encoding of bctrl, and remove some unused instructions
llvm-svn: 18192
2004-11-24 00:16:37 +00:00
Chris Lattner
f50b42adc1 Fix encoding of blr and bctr
llvm-svn: 18178
2004-11-23 22:06:24 +00:00
Nate Begeman
9b9c78b3e2 Use the correct register class as a constaint to gcc's inline assembly, so
that we don't end up trying to use r0 as a base register.

llvm-svn: 18176
2004-11-23 21:37:22 +00:00
Nate Begeman
7ae4c39fc6 Save/Restore arg regs and nonvolatile regs the compiler might use during
CompilationCallback

llvm-svn: 18175
2004-11-23 21:34:18 +00:00
Chris Lattner
08eb9d0d18 Fix the encoding of OR, AND and many other instructions
llvm-svn: 18174
2004-11-23 21:17:35 +00:00
Brian Gaeke
ce245ef743 Support shr long/ulong.
llvm-svn: 18173
2004-11-23 21:10:50 +00:00
Brian Gaeke
29093f7ec7 Support printing ConstantAggregateZeros.
llvm-svn: 18172
2004-11-23 21:10:49 +00:00
Brian Gaeke
371faf708f Update failing SingleSource test-case list.
llvm-svn: 18171
2004-11-23 21:10:48 +00:00
Chris Lattner
04a25df638 Remove argtype and argcount magic, which was used by the old asmprinter.
llvm-svn: 18170
2004-11-23 20:41:34 +00:00
Chris Lattner
9a57aafc94 Get rid of flags that are dead
llvm-svn: 18169
2004-11-23 20:37:41 +00:00
Chris Lattner
88fcda18b8 Fix encoding of rlwinm?
llvm-svn: 18165
2004-11-23 19:23:32 +00:00
Chris Lattner
512b1d6c2a Fix encodings
llvm-svn: 18164
2004-11-23 19:23:18 +00:00
Chris Lattner
cb15c858c2 Enumerate CR registers
llvm-svn: 18162
2004-11-23 18:59:59 +00:00
Chris Lattner
4cad3e8fbc Initial implementation of exiting CompilationCallback
This should save all argument registers on entry and restore on exit, despite
that, simple things seem to work!!!

llvm-svn: 18161
2004-11-23 18:49:46 +00:00
Chris Lattner
141a71cf32 This method is dead
llvm-svn: 18160
2004-11-23 18:47:55 +00:00
Chris Lattner
9554912215 Remove this method.
llvm-svn: 18159
2004-11-23 18:47:42 +00:00
Chris Lattner
aa5a51292c Squelch a bogus warning
llvm-svn: 18157
2004-11-23 15:57:01 +00:00
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
Brian Gaeke
b63c34a9f9 pseudocode for 64-bit lshr.
llvm-svn: 18154
2004-11-23 08:14:09 +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