summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCCodeEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-9/+9
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Change getBinaryCodeForInstr prototype. First operand MachineInstr& should ↵Evan Cheng2008-09-021-6/+7
| | | | | | be const. Make corresponding changes. llvm-svn: 55623
* Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminatingDan Gohman2008-07-011-1/+2
| | | | | | | | | | | | | | | | the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. llvm-svn: 52943
* Provide generic hooks for icache invalidation. Add PPC implementation.Anton Korobeynikov2008-06-171-4/+0
| | | | | | Patch by Gary Benson! llvm-svn: 52418
* Tail call optimization improvements:Arnold Schwaighofer2008-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move platform independent code (lowering of possibly overwritten arguments, check for tail call optimization eligibility) from target X86ISelectionLowering.cpp to TargetLowering.h and SelectionDAGISel.cpp. Initial PowerPC tail call implementation: Support ppc32 implemented and tested (passes my tests and test-suite llvm-test). Support ppc64 implemented and half tested (passes my tests). On ppc tail call optimization is performed if caller and callee are fastcc call is a tail call (in tail call position, call followed by ret) no variable argument lists or byval arguments option -tailcallopt is enabled Supported: * non pic tail calls on linux/darwin * module-local tail calls on linux(PIC/GOT)/darwin(PIC) * inter-module tail calls on darwin(PIC) If constraints are not met a normal call will be emitted. A test checking the argument lowering behaviour on x86-64 was added. llvm-svn: 50477
* Unbreak JIT. Ignore TargetInstrInfo::IMPLICIT_DEF.Evan Cheng2008-03-171-0/+2
| | | | llvm-svn: 48447
* Replace all target specific implicit def instructions with a target ↵Evan Cheng2008-03-151-6/+0
| | | | | | independent one: TargetInstrInfo::IMPLICIT_DEF. llvm-svn: 48380
* Enable exception handling int JITNicolas Geoffray2008-02-131-0/+11
| | | | llvm-svn: 47079
* Correct order of parameters.Evan Cheng2008-01-041-2/+2
| | | | llvm-svn: 45562
* Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be usedEvan Cheng2008-01-031-1/+2
| | | | | | for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode). llvm-svn: 45527
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-4/+3
| | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
* Use MachineOperand::getImm instead of MachineOperand::getImmedValue. ↵Chris Lattner2007-12-301-1/+1
| | | | | | Likewise setImmedValue -> setImm llvm-svn: 45453
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-1/+1
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-1/+3
| | | | llvm-svn: 36632
* implement support for the linux/ppc function call ABI. Patch byChris Lattner2007-02-251-2/+5
| | | | | | Nicolas Geoffray! llvm-svn: 34574
* Missing load/store relocations.Jim Laskey2006-12-151-1/+7
| | | | llvm-svn: 32601
* Another step forward in PPC64 JIT support: we now no-longer need stubsChris Lattner2006-12-111-24/+28
| | | | | | | | | | emitted for external globals in PPC64-JIT-PIC mode (which is good because we didn't handle them before!). This also fixes a bug handling the picbase delta, which we would get wrong in some cases. llvm-svn: 32451
* this is an initial patch to switch the ppc64 jit over to working in PIC mode,Chris Lattner2006-12-081-3/+22
| | | | | | | | which allows the code to be above the 2G marker. We still need to JIT emit dyld stubs to support external, weak, common, etc globals, but that will happen tomorrow. llvm-svn: 32348
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-2/+1
| | | | llvm-svn: 32333
* add relocation support for ppc64 branches.Chris Lattner2006-12-061-2/+2
| | | | llvm-svn: 32284
* Rework PPC64 calls. Now we have a LR8/CTR8 register which the PPC64 callsChris Lattner2006-11-141-0/+1
| | | | | | | | clobber. This allows LR8 to be save/restored correctly as a 64-bit quantity, instead of handling it as a 32-bit quantity. This unbreaks ppc64 codegen when the code is actually located above the 4G boundary. llvm-svn: 31734
* For PR786:Reid Spencer2006-11-021-1/+0
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29911
* Initial checkin of the Mach-O emitter. There's plenty of fixmes, but itNate Begeman2006-08-231-38/+18
| | | | | | does emit linkable .o files in very simple cases. llvm-svn: 29850
* Resolve BB references with relocation.Evan Cheng2006-07-271-2/+10
| | | | llvm-svn: 29351
* - Refactor the code that resolve basic block references to a TargetJITInfoEvan Cheng2006-07-251-27/+5
| | | | | | | | | | method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. llvm-svn: 29276
* Implement PPC64 relocations typesChris Lattner2006-07-121-3/+20
| | | | llvm-svn: 29125
* Ensure that dump calls that are associated with asserts are removed fromJim Laskey2006-07-111-1/+1
| | | | | | non-debug build. llvm-svn: 29105
* Use hidden visibility to make symbols in an anonymous namespace getChris Lattner2006-06-281-1/+2
| | | | | | dropped. This shrinks libllvmgcc.dylib another 67K llvm-svn: 28975
* Implement 64-bit undef, sub, shl/shr, srem/uremChris Lattner2006-06-271-1/+2
| | | | llvm-svn: 28929
* Change from using MachineRelocation ctors to using static methodsChris Lattner2006-05-031-2/+2
| | | | | | in MachineRelocation to create Relocations. llvm-svn: 28088
* Suck block address tracking out of targets into the JIT Emitter. ThisChris Lattner2006-05-031-12/+6
| | | | | | | simplifies the MachineCodeEmitter interface just a little bit and makes BasicBlocks work like constant pools and jump tables. llvm-svn: 28082
* Change the BasicBlockAddrs map to be a vector, indexed by MBB number.Chris Lattner2006-05-031-7/+9
| | | | llvm-svn: 28069
* Several related changes:Chris Lattner2006-05-021-2/+0
| | | | | | | | | | | | | 1. Change several methods in the MachineCodeEmitter class to be pure virtual. 2. Suck emitConstantPool/initJumpTableInfo into startFunction, removing them from the MachineCodeEmitter interface, and reducing the amount of target- specific code. 3. Change the JITEmitter so that it allocates constantpools and jump tables *right* next to the functions that they belong to, instead of in a separate pool of memory. This makes all memory for a function be contiguous, and means the JITEmitter only tracks one block of memory now. llvm-svn: 28065
* Fix a purely hypothetical problem (for now): emitWord emits in the hostChris Lattner2006-05-021-5/+1
| | | | | | | | byte format. This doesn't work when using the code emitter in a cross target environment. Since the code emitter is only really used by the JIT, this isn't a current problem, but if we ever start emitting .o files, it would be. llvm-svn: 28060
* Refactor the machine code emitter interface to pull the pointers for the currentChris Lattner2006-05-021-7/+11
| | | | | | | | | | code emission location into the base class, instead of being in the derived classes. This change means that low-level methods like emitByte/emitWord now are no longer virtual (yaay for speed), and we now have a framework to support growable code segments. This implements feature request #1 of PR469. llvm-svn: 28059
* JumpTable support! What this represents is working asm and jit support forNate Begeman2006-04-221-5/+10
| | | | | | | | x86 and ppc for 100% dense switch statements when relocations are non-PIC. This support will be extended and enhanced in the coming days to support PIC, and less dense forms of jump tables. llvm-svn: 27947
* Teach the JIT how to relocate LI, this fixes the JIT on Prolangs-C/TimberWolfMCChris Lattner2006-04-221-0/+1
| | | | llvm-svn: 27943
* Change the PPC JIT to use a Static relocation modelNate Begeman2006-04-211-16/+2
| | | | llvm-svn: 27937
* Move some knowledge about registers out of the code emitter into the ↵Chris Lattner2006-04-171-41/+1
| | | | | | register info. llvm-svn: 27770
* Don't emit pseudo instructions!Chris Lattner2006-03-211-0/+1
| | | | llvm-svn: 26926
* teach the JIT to encode vector registersChris Lattner2006-03-101-32/+32
| | | | llvm-svn: 26697
* - 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. llvm-svn: 26315
* Moved PICEnabled to include/llvm/Target/TargetOptions.hEvan Cheng2006-02-181-0/+1
| | | | llvm-svn: 26272
* 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 llvm-svn: 25793
* Add explicit #includes of <iostream>Chris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25509
OpenPOWER on IntegriCloud