summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
* Fix Regression/CodeGen/PowerPC/2005-01-14-UndefLong.llChris Lattner2005-01-141-0/+2
| | | | llvm-svn: 19557
* Fix: Regression/CodeGen/PowerPC/2005-01-14-SetSelectCrash.llChris Lattner2005-01-141-1/+2
| | | | llvm-svn: 19555
* This hunk:Chris Lattner2005-01-021-2/+2
| | | | | | | | | | | - unsigned TrueValue = getReg(TrueVal, BB, BB->begin()); + unsigned TrueValue = getReg(TrueVal); Fixes the PPC regressions from last night. The other hunk is just a clarity improvement. llvm-svn: 19263
* Fix a FIXME: Select instructions on longs were miscompiled.Chris Lattner2005-01-011-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, improve codegen of select instructions. For this testcase: int %test(bool %C, int %A, int %B) { %D = select bool %C, int %A, int %B ret int %D } We used to generate this code: _test: cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; b .LBB_test_3 ; .LBB_test_2: ; or r5, r4, r4 .LBB_test_3: ; or r3, r5, r5 blr Now we emit: _test: cmpwi cr0, r3, 0 bne .LBB_test_2 ; .LBB_test_1: ; or r4, r5, r5 .LBB_test_2: ; or r3, r4, r4 blr -Chris llvm-svn: 19214
* Specify all of the targets built.Chris Lattner2004-12-161-1/+1
| | | | llvm-svn: 18985
* Factor out common .td file chunks.Chris Lattner2004-12-164-27/+8
| | | | llvm-svn: 18982
* 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
OpenPOWER on IntegriCloud