Commit Graph

8500 Commits

Author SHA1 Message Date
Reid Spencer
84472d6e3c Adjust to Compressor interface change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18249 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 19:38:05 +00:00
Reid Spencer
bc98a64b2a Revise to LLVM makefile standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18246 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 16:12:25 +00:00
Reid Spencer
26eda77f1f Initial Version from bzip2 Release 1.0.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18245 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 16:11:36 +00:00
Reid Spencer
53c4c5672c Implement dependent library linking. It is no longer required that -lstdc++
-lstdsup++ no -lc be passed on the command line to llvm linkers if the
progam being linked was compiled with the C/C++ Front End or Stacker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18243 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 09:32:08 +00:00
Reid Spencer
719012d625 Remove blank comment lines for uniformity.
Make sure lines don't exceed 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18242 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 09:29:44 +00:00
Nate Begeman
d4c8bea47f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 07:09:01 +00:00
Chris Lattner
fde839b4ff Fix the build on non ppc machines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18235 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 06:14:45 +00:00
Chris Lattner
2a0c0dff0b The JIT works enough
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 04:14:54 +00:00
Chris Lattner
5cbf3bc202 Fix encoding of fsel, fixing olden/power, McCat/bisort and several others.
All of Olden passes now! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18227 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 04:11:07 +00:00
Chris Lattner
a1ab451392 Fix encoding of fneg instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18226 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 03:53:44 +00:00
Chris Lattner
cd61ec837f Fix encoding of swari, fixing several programs, including Olden/mst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18225 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 03:40:20 +00:00
Chris Lattner
b752a97ca4 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 00:33:57 +00:00
Chris Lattner
5efb75daed * 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18222 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 22:30:08 +00:00
Nate Begeman
53e4aa57c6 Add the same optimization that we do loading from fixed alloca slots to
storing to fixed alloca slots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18221 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 21:53:14 +00:00
Chris Lattner
73278080c8 Write CompilationCallback as an explicit assembly stub to avoid getting GCC's
prolog.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18220 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 21:01:46 +00:00
Chris Lattner
892afa9556 When rewriting the original call instruction, make sure to rewrite it to
call the right address.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18213 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 18:00:02 +00:00
Chris Lattner
fb887e010d 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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18212 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 17:42:55 +00:00
Reid Spencer
5f8448f79c Implement and document prefix options with arbitrary values including an
= sign. This needed to support -DNAME=value options as pass-through in
llvmc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18203 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 06:13:42 +00:00
Brian Gaeke
e4ed742588 Update list of failing benchmarks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18202 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 04:07:42 +00:00
Brian Gaeke
31e575901f Fix bug in emitGEPOperation with large struct-member offsets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18201 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 04:07:33 +00:00
Chris Lattner
69efbdd4f3 Fix a few more tests by encoding the extsb and other XForm11 instructions
correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18200 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 03:52:02 +00:00
Chris Lattner
2f5091ac2a Fix the encoding of ORi and other DForm4 instructions. This brings us to
36/42 SingleSource/UnitTests passing!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18199 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 02:15:41 +00:00
Chris Lattner
00a8c01999 Loads are relocatable too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18198 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 02:03:44 +00:00
Chris Lattner
b765ff1219 Calls do not need a MovPCtoLR instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18197 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 02:00:06 +00:00
Chris Lattner
b9f26da5dd Get constant pools working. This fixes even more programs, allowing us to
pass 24/42 in UnitTests (up from 20).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18196 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 01:56:12 +00:00
Tanya Lattner
a6ec8f5548 Forced branches to be first to be scheduled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18195 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 01:49:10 +00:00
Chris Lattner
8599d385a2 Rewrite branches more closely to correct. This makes more stuff pass, and
stops the infinite loops!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18194 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 01:35:12 +00:00
Chris Lattner
310a752872 Branch instructions explicitly represent CRx in them. bEcause of this, encode
them explicitly as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18193 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 01:15:19 +00:00
Nate Begeman
3b78e3b6a9 Fix encoding of bctrl, and remove some unused instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18192 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 00:16:37 +00:00
Reid Spencer
84b9cedf91 Allow reading of member names that begin with an _ character.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18179 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 22:35:39 +00:00
Chris Lattner
6f407893e2 Fix encoding of blr and bctr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18178 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 22:06:24 +00:00
Nate Begeman
65b7f3ed2a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18176 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 21:37:22 +00:00
Nate Begeman
ca6d0f53ff Save/Restore arg regs and nonvolatile regs the compiler might use during
CompilationCallback


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18175 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 21:34:18 +00:00
Chris Lattner
5afa9af81b Fix the encoding of OR, AND and many other instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18174 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 21:17:35 +00:00
Brian Gaeke
88108b8cfa Support shr long/ulong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18173 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 21:10:50 +00:00
Brian Gaeke
4dd043f090 Support printing ConstantAggregateZeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18172 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 21:10:49 +00:00
Brian Gaeke
8a0c4fd0c6 Update failing SingleSource test-case list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18171 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 21:10:48 +00:00
Chris Lattner
d162032013 Remove argtype and argcount magic, which was used by the old asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18170 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 20:41:34 +00:00
Chris Lattner
583e32b653 Get rid of flags that are dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18169 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 20:37:41 +00:00
Chris Lattner
89d60de90e Fix encoding of rlwinm?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18165 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 19:23:32 +00:00
Chris Lattner
943f45208c Fix encodings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18164 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 19:23:18 +00:00
Chris Lattner
9ba12359e3 Enumerate CR registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18162 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 18:59:59 +00:00
Chris Lattner
d9d06b3af1 Initial implementation of exiting CompilationCallback
This should save all argument registers on entry and restore on exit, despite
that, simple things seem to work!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18161 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 18:49:46 +00:00
Chris Lattner
22cd028eef This method is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18160 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 18:47:55 +00:00
Chris Lattner
05ad23711e Remove this method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 18:47:42 +00:00
Chris Lattner
adbcc1025e Squelch a bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18157 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 15:57:01 +00:00
Chris Lattner
d7fa35c6d2 Squelch a bogus warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18156 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 15:56:38 +00:00
Nate Begeman
dd30751654 Don't return value from void function. This is only temporary anyway while
the JIT is made to work!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 10:04:49 +00:00
Brian Gaeke
fbe558c993 pseudocode for 64-bit lshr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18154 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 08:14:09 +00:00
Chris Lattner
7598bbac66 Fix a minor bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18153 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 06:56:31 +00:00