summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Fix Regression/CodeGen/PowerPC/2004-12-12-ZeroSizeCommon.ll, and all programsChris Lattner2004-12-121-0/+1
| | | | | | when compiled with debug information. llvm-svn: 18835
* CSE calls to getTypeSize.Chris Lattner2004-12-121-3/+2
| | | | llvm-svn: 18833
* Use the target triple to pick this target.Chris Lattner2004-12-121-1/+6
| | | | llvm-svn: 18830
* Fix several bugs in 'op x, imm' handling. Foremost is that we now emitChris Lattner2004-11-301-14/+10
| | | | | | | | | | | | | | addi r3, r3, -1 instead of addi r3, r3, 1 for 'sub int X, 1'. Secondarily, this fixes several cases where we could crash given an unsigned constant. And fixes a couple of minor missed optimization cases, such as xor X, ~0U -> not X llvm-svn: 18379
* Fix CodeGen/PowerPC/2004-11-30-shr-var-crash.llChris Lattner2004-11-301-1/+1
| | | | llvm-svn: 18376
* Fix test/Regression/CodeGen/PowerPC/2004-11-29-ShrCrash.llChris Lattner2004-11-301-1/+3
| | | | llvm-svn: 18374
* Fix test/Regression/CodeGen/PowerPC/2004-11-30-shift-crash.llChris Lattner2004-11-301-1/+6
| | | | llvm-svn: 18371
* The LLVM bool type shall have 1 byte alignment on PPC.Chris Lattner2004-11-281-2/+2
| | | | llvm-svn: 18311
* Remove the ISel->AsmPrinter link via the TargetMachine that was put inNate Begeman2004-11-273-24/+2
| | | | | | | | 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
* There is no reason to store <x,x>, just store <x>.Chris Lattner2004-11-261-5/+3
| | | | llvm-svn: 18263
* Enable optimization suggested by Chris Lattner to not emit reloc stubs forNate Begeman2004-11-253-21/+18
| | | | | | | | | | | | | | | | | | | 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
* Fix the build on non ppc machinesChris Lattner2004-11-251-0/+5
| | | | llvm-svn: 18235
* The JIT works enoughChris Lattner2004-11-251-1/+0
| | | | llvm-svn: 18228
* Fix encoding of fsel, fixing olden/power, McCat/bisort and several others.Chris Lattner2004-11-251-1/+1
| | | | | | All of Olden passes now! :) llvm-svn: 18227
* Fix encoding of fneg instructionChris Lattner2004-11-251-1/+1
| | | | llvm-svn: 18226
* Fix encoding of swari, fixing several programs, including Olden/mstChris Lattner2004-11-251-1/+1
| | | | llvm-svn: 18225
* There is not a 1-1 mappign between llvm blocks and PPC blocks, do not useChris Lattner2004-11-251-5/+4
| | | | | | | LLVM blocks as the keys for the branch rewriter. This fixes treeadd and many other programs with the JIT. llvm-svn: 18223
* * Rename existing relocations to be more specificChris Lattner2004-11-243-18/+65
| | | | | | | | | | | | | | * 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
* Add the same optimization that we do loading from fixed alloca slots toNate Begeman2004-11-241-0/+12
| | | | | | storing to fixed alloca slots. llvm-svn: 18221
* Write CompilationCallback as an explicit assembly stub to avoid getting GCC'sChris Lattner2004-11-241-20/+35
| | | | | | prolog. llvm-svn: 18220
* When rewriting the original call instruction, make sure to rewrite it toChris Lattner2004-11-241-4/+5
| | | | | | call the right address. llvm-svn: 18213
* Force the intregs ptr into R2 and the FPregs ptr into R3. This fixes a reallyChris Lattner2004-11-241-4/+8
| | | | | | | | | | | | | | 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
* Fix a few more tests by encoding the extsb and other XForm11 instructionsChris Lattner2004-11-241-12/+19
| | | | | | correctly. llvm-svn: 18200
* Fix the encoding of ORi and other DForm4 instructions. This brings us toChris Lattner2004-11-241-1/+9
| | | | | | 36/42 SingleSource/UnitTests passing! llvm-svn: 18199
* Loads are relocatable tooChris Lattner2004-11-241-1/+2
| | | | llvm-svn: 18198
* Calls do not need a MovPCtoLR instructionChris Lattner2004-11-241-3/+6
| | | | llvm-svn: 18197
* Get constant pools working. This fixes even more programs, allowing us toChris Lattner2004-11-241-10/+10
| | | | | | pass 24/42 in UnitTests (up from 20). llvm-svn: 18196
* Rewrite branches more closely to correct. This makes more stuff pass, andChris Lattner2004-11-241-20/+15
| | | | | | stops the infinite loops! llvm-svn: 18194
* Branch instructions explicitly represent CRx in them. bEcause of this, encodeChris Lattner2004-11-241-4/+6
| | | | | | them explicitly as well. llvm-svn: 18193
* Fix encoding of bctrl, and remove some unused instructionsNate Begeman2004-11-241-5/+2
| | | | llvm-svn: 18192
* Fix encoding of blr and bctrChris Lattner2004-11-231-2/+2
| | | | llvm-svn: 18178
* Use the correct register class as a constaint to gcc's inline assembly, soNate Begeman2004-11-231-2/+2
| | | | | | that we don't end up trying to use r0 as a base register. llvm-svn: 18176
* Save/Restore arg regs and nonvolatile regs the compiler might use duringNate Begeman2004-11-231-12/+29
| | | | | | CompilationCallback llvm-svn: 18175
* Fix the encoding of OR, AND and many other instructionsChris Lattner2004-11-231-1/+11
| | | | llvm-svn: 18174
* Remove argtype and argcount magic, which was used by the old asmprinter.Chris Lattner2004-11-231-189/+0
| | | | llvm-svn: 18170
* Get rid of flags that are deadChris Lattner2004-11-234-52/+38
| | | | llvm-svn: 18169
* Fix encoding of rlwinm?Chris Lattner2004-11-231-1/+1
| | | | llvm-svn: 18165
* Fix encodingsChris Lattner2004-11-231-2/+2
| | | | llvm-svn: 18164
* Enumerate CR registersChris Lattner2004-11-231-8/+8
| | | | llvm-svn: 18162
* Initial implementation of exiting CompilationCallbackChris Lattner2004-11-231-9/+24
| | | | | | | This should save all argument registers on entry and restore on exit, despite that, simple things seem to work!!! llvm-svn: 18161
* This method is deadChris Lattner2004-11-231-7/+0
| | | | llvm-svn: 18160
* Remove this method.Chris Lattner2004-11-231-5/+0
| | | | llvm-svn: 18159
* Squelch a bogus warning.Chris Lattner2004-11-231-1/+1
| | | | llvm-svn: 18156
* Don't return value from void function. This is only temporary anyway whileNate Begeman2004-11-231-1/+1
| | | | | | the JIT is made to work! llvm-svn: 18155
* Fix a minor bugChris Lattner2004-11-231-1/+2
| | | | llvm-svn: 18153
* Be really paranoid about not breaking stuff yetChris Lattner2004-11-231-0/+1
| | | | llvm-svn: 18152
* Implement the first hunk of CompilationCallback. The pieces missing are theChris Lattner2004-11-231-10/+54
| | | | | | | | | | 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
* Implement the stub needed to get into compilation callback.Chris Lattner2004-11-231-5/+14
| | | | llvm-svn: 18147
* Simplify code a bitChris Lattner2004-11-231-1/+1
| | | | llvm-svn: 18146
* Initial implementation of the JIT interfaces. Relocation is done and stubsChris Lattner2004-11-231-0/+117
| | | | | | | | | 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
OpenPOWER on IntegriCloud