aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCCodeEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* - Added option -relocation-model to set relocation model. Valid values ↵Evan Cheng2006-02-221-1/+3
| | | | | | | | | | | include static, pic, dynamic-no-pic, and default. PPC and x86 default is dynamic-no-pic for Darwin, pic for others. - Removed options -enable-pic and -ppc-static. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26315 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved PICEnabled to include/llvm/Target/TargetOptions.hEvan Cheng2006-02-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26272 91177308-0d34-0410-b5e6-96231b3b80d8
* Functions that are lazily streamed in from the .bc file are *not* external.Chris Lattner2006-01-291-1/+2
| | | | | | | | This fixes llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c and PR704 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25793 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit #includes of <iostream>Chris Lattner2006-01-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25509 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the PPC JIT failures last night, which were due to mishandling of ↵Chris Lattner2006-01-071-0/+1
| | | | | | linkonce globals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25141 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the JIT failures from last night.Chris Lattner2005-12-111-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24659 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to clean up function call pseudos and support the BLA instruction,Nate Begeman2005-11-161-1/+1
| | | | | | | | which branches to an absolute address. This is required to support objc direct dispatch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24370 91177308-0d34-0410-b5e6-96231b3b80d8
* More PPC32 -> PPC changes, as well as merging some classes that wereNate Begeman2005-10-161-3/+3
| | | | | | | redundant after the change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23759 91177308-0d34-0410-b5e6-96231b3b80d8
* prune #includesChris Lattner2005-10-151-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23752 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PPC32*.h to PPC*.hChris Lattner2005-10-141-2/+2
| | | | | | | This completes the grand PPC file renaming git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23745 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PowerPC*.h to PPC*.hChris Lattner2005-10-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23743 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate PowerPC.td and PPC32.td, consolidating them into PPC.tdChris Lattner2005-10-141-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23738 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the ppc backend to use two register classes for FP: F8RC and F4RC.Chris Lattner2005-10-011-1/+2
| | | | | | | | These are used to represent float and double values, and the two regclasses contain the same physical registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23577 91177308-0d34-0410-b5e6-96231b3b80d8
* Split IMPLICIT_DEF into IMPLICIT_DEF_GPR and IMPLICIT_DEF_FP, so that theChris Lattner2005-08-241-1/+2
| | | | | | | | instructions take a consistent reg class. Implement ISD::UNDEF in the dag->dag selector to generate this, fixing UnitTests/2003-07-06-IntOverflow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23028 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
* Support building non-PICNate Begeman2005-07-211-34/+31
| | | | | | | | | Remove the LoadHiAddr pseudo-instruction. Optimization of stores to and loads from statics. Force JIT to use new non-PIC codepaths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22494 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate mfocrf when targeting g5. Generate fsqrt/fsqrts when targetin g5.Nate Begeman2005-07-201-2/+2
| | | | | | | 8-byte align doubles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22486 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-28/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21425 91177308-0d34-0410-b5e6-96231b3b80d8
* Add completely untested support for mtcrf/mfcrf encodingChris Lattner2005-04-191-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21353 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle ExternalSymbol operands in the PPC JITChris Lattner2005-04-181-9/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21312 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable optimization suggested by Chris Lattner to not emit reloc stubs forNate Begeman2004-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | 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
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18223 91177308-0d34-0410-b5e6-96231b3b80d8
* * Rename existing relocations to be more specificChris Lattner2004-11-241-9/+24
| | | | | | | | | | | | | | | * 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
* Loads are relocatable tooChris Lattner2004-11-241-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18198 91177308-0d34-0410-b5e6-96231b3b80d8
* Calls do not need a MovPCtoLR instructionChris Lattner2004-11-241-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18197 91177308-0d34-0410-b5e6-96231b3b80d8
* 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18196 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite branches more closely to correct. This makes more stuff pass, andChris Lattner2004-11-241-20/+15
| | | | | | | stops the infinite loops! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18194 91177308-0d34-0410-b5e6-96231b3b80d8
* Enumerate CR registersChris Lattner2004-11-231-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18162 91177308-0d34-0410-b5e6-96231b3b80d8
* Squelch a bogus warning.Chris Lattner2004-11-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18156 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bugChris Lattner2004-11-231-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18153 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit relocations for the global variable using instructions. This gets usChris Lattner2004-11-231-48/+44
| | | | | | | | LA, LOADHiAddr, CALLpcrel, and MovePCtoLR working, though the constant pool probably is not right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18144 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some dead codeChris Lattner2004-11-221-76/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18136 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable this.Chris Lattner2004-11-221-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18130 91177308-0d34-0410-b5e6-96231b3b80d8
* This chunk of code needs to be rewrittenChris Lattner2004-11-221-28/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18127 91177308-0d34-0410-b5e6-96231b3b80d8
* getJITStubForFunction is optional and unimplemented, just remove it.Chris Lattner2004-11-201-5/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18036 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify namespacesChris Lattner2004-11-161-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17870 91177308-0d34-0410-b5e6-96231b3b80d8
* * Correctly handle the MovePCtoLR pseudo-instr with a bl to next instrMisha Brukman2004-10-231-9/+15
| | | | | | | * Stop the confusion of using rv and Addr for global addresses: just use rv git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17195 91177308-0d34-0410-b5e6-96231b3b80d8
* * Do not emit IMPLICIT_DEF pseudo-instructionsMisha Brukman2004-10-231-6/+71
| | | | | | | | | | * 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() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17190 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove debug code emitter from the JITMisha Brukman2004-10-211-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17151 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this compile.Alkis Evlogimenos2004-10-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17150 91177308-0d34-0410-b5e6-96231b3b80d8
* * Added basic support for JITing functions, basic blocks, instruction encoding,Misha Brukman2004-10-211-20/+169
| | | | | | | | | including registers, constants, and partial support for global addresses * The JIT is disabled by default to allow building llvm-gcc, which wants to test running programs during configure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17149 91177308-0d34-0410-b5e6-96231b3b80d8
* * Claim to support machine code emission - return false fromMisha Brukman2004-10-141-4/+26
| | | | | | | | | | addPassesToEmitMachineCode() * Add support for registers and constants in getMachineOpValue() This enables running "int main() { ret 0 }" via the PowerPC JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16983 91177308-0d34-0410-b5e6-96231b3b80d8
* * Include the real (generated) version of getBinaryCodeForInstr()Misha Brukman2004-10-141-10/+20
| | | | | | | | | | * Add implementation of getMachineOpValue() for generated code emitter * Convert assert()s in unimplemented functions to abort()s so that non-debug builds fail predictably * Add file header comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16981 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Breaking up the PowerPC target into 32- and 64-bit subparts, Part I: 32-bit.Misha Brukman2004-08-111-15/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15634 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub definition of the PowerPC CodeEmitter class; this isn't functional (yet).Misha Brukman2004-08-091-4/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15600 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial revisionMisha Brukman2004-06-211-0/+43
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14283 91177308-0d34-0410-b5e6-96231b3b80d8