summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
Commit message (Collapse)AuthorAgeFilesLines
...
* relax an assertion a bit, allowing the GPR argument ofChris Lattner2010-11-162-2/+6
| | | | | | | | these instructions to be encoded with getMachineOpValue. This unbreaks ExecutionEngine/2003-01-04-ArgumentBug.ll when running on a G5 llvm-svn: 119307
* fix a pasto that massively broke the ppc jit while the buildbots happenedChris Lattner2010-11-151-2/+2
| | | | | | to be broken for other reasons llvm-svn: 119283
* Wire up primitive support in the assembler backend for writing .o filesChris Lattner2010-11-155-1/+137
| | | | | | | | | | | | | | directly on the mac. This is very early, doesn't support relocations and has a terrible hack to avoid .machine from being printed, but despite that it generates an bitwise-identical-to-cctools .o file for stuff like this: define i32 @test() nounwind { ret i32 42 } I don't plan to continue pushing this forward, but if anyone else was interested in doing it, it should be really straight-forward. llvm-svn: 119136
* split out an encoder for memri operands, allowing a relocation to be ploppedChris Lattner2010-11-155-58/+68
| | | | | | | | | | | | | | | | into the immediate field. This allows us to encode stuff like this: lbz r3, lo16(__ZL4init)(r4) ; globalopt.cpp:5 ; encoding: [0x88,0x64,A,A] ; fixup A - offset: 0, value: lo16(__ZL4init), kind: fixup_ppc_lo16 stw r3, lo16(__ZL1s)(r5) ; globalopt.cpp:6 ; encoding: [0x90,0x65,A,A] ; fixup A - offset: 0, value: lo16(__ZL1s), kind: fixup_ppc_lo16 With this, we should have a completely function MCCodeEmitter for PPC, wewt. llvm-svn: 119134
* add support for encoding the lo14 forms used for a few PPC64 addressingChris Lattner2010-11-155-25/+45
| | | | | | | | | modes. For example, we now get: ld r3, lo16(_G)(r3) ; encoding: [0xe8,0x63,A,0bAAAAAA00] ; fixup A - offset: 0, value: lo16(_G), kind: fixup_ppc_lo14 llvm-svn: 119133
* fix a regression with the new instprinter: we lost the ability toChris Lattner2010-11-151-0/+22
| | | | | | | print DBG_VALUE instructions. This should unbreak the llvm-gcc-powerpc-darwin9 buildbot. llvm-svn: 119132
* implement the start of support for lo16 and ha16, allowing us to get stuff like:Chris Lattner2010-11-155-30/+108
| | | | | | | lis r4, ha16(__ZL4init) ; encoding: [0x3c,0x80,A,A] ; fixup A - offset: 0, value: ha16(__ZL4init), kind: fixup_ppc_ha16 llvm-svn: 119127
* add a fixup for conditional branches, giving us output like this:Chris Lattner2010-11-152-8/+11
| | | | | | | beq cr0, LBB0_4 ; encoding: [0x41,0x82,A,0bAAAAAA00] ; fixup A - offset: 0, value: LBB0_4, kind: fixup_ppc_brcond14 llvm-svn: 119126
* change direct branches to encode with the same encoding methodChris Lattner2010-11-153-23/+38
| | | | | | | | as direct calls. Change conditional branches to encode with their own method, simplifying the JIT encoder and making room for adding an mc fixup. llvm-svn: 119125
* eliminate a now-unneeded operand printer.Chris Lattner2010-11-152-4/+0
| | | | llvm-svn: 119124
* split call operands out to their own encoding class, simplifyingChris Lattner2010-11-154-77/+130
| | | | | | | | | | code in the JIT. Use this to form the first fixup for the PPC backend, giving us stuff like this: bl L_foo$stub ; encoding: [0b010010AA,A,A,0bAAAAAA01] ; fixup A - offset: 0, value: L_foo$stub, kind: fixup_ppc_br24 llvm-svn: 119123
* add proper encoding for MTCRF instead of using a hack.Chris Lattner2010-11-153-15/+37
| | | | llvm-svn: 119121
* add basic encoding support for immediates and registers, allowing us Chris Lattner2010-11-152-4/+8
| | | | | | | | | | to encode all of these instructions correctly (for example): mflr r0 ; encoding: [0x7c,0x08,0x02,0xa6] stw r0, 8(r1) ; encoding: [0x90,0x01,0x00,0x08] stwu r1, -64(r1) ; encoding: [0x94,0x21,0xff,0xc0] llvm-svn: 119118
* add a dummy entry to fix a build errorChris Lattner2010-11-151-2/+2
| | | | llvm-svn: 119117
* Implement a basic MCCodeEmitter for PPC. This doesn't handleChris Lattner2010-11-155-2/+113
| | | | | | | | | | | | | | | | fixups yet, and doesn't handle actually encoding operand values, but this is enough for llc -show-mc-encoding to show the base instruction encoding information, e.g.: mflr r0 ; encoding: [0x7c,0x08,0x02,0xa6] stw r0, 8(r1) ; encoding: [0x90,0x00,0x00,0x00] stwu r1, -64(r1) ; encoding: [0x94,0x00,0x00,0x00] Ltmp0: lhz r4, 4(r3) ; encoding: [0xa0,0x00,0x00,0x00] cmplwi cr0, r4, 8 ; encoding: [0x28,0x00,0x00,0x00] beq cr0, LBB0_2 ; encoding: [0x40,0x00,0x00,0x00] llvm-svn: 119116
* dissolve some more hacks.Chris Lattner2010-11-152-6/+6
| | | | llvm-svn: 119115
* fix some fixme's, removing dead code.Chris Lattner2010-11-151-8/+2
| | | | llvm-svn: 119114
* remove asmstrings (which can never be printed) from pseudo Chris Lattner2010-11-154-103/+48
| | | | | | | instructions, allowing is to eliminate some dead operand printing methods from the instprinter. llvm-svn: 119113
* strength reduce TOC temp label generation, no functionality change.Chris Lattner2010-11-151-7/+4
| | | | llvm-svn: 119112
* rip out a ton of old instruction printing junk now that theChris Lattner2010-11-151-419/+86
| | | | | | new instprinting logic is there. llvm-svn: 119111
* Turn on the new instprinter by default.Chris Lattner2010-11-151-1/+1
| | | | | | | | | | | | | | The only change in the output is: 1) we get a better comment on mfcr, we get: mfcr r2 ; cr2 instead of: mfcr r2 ; 32 2) we no longer emit $stub's on powerpc/leopard. The Leopard linker autosynthesizes them. llvm-svn: 119108
* convert the operand bits into bitfields since they are all combinable inChris Lattner2010-11-153-116/+92
| | | | | | | | | different ways. Add $non_lazy_ptr support, and proper lowering for global values. Now all the ppc regression tests pass with the new instruction printer. llvm-svn: 119106
* add targetoperand flags for jump tables, constant pool and block addressChris Lattner2010-11-156-111/+122
| | | | | | | | | | | | | | nodes to indicate when ha16/lo16 modifiers should be used. This lets us pass PowerPC/indirectbr.ll. The one annoying thing about this patch is that the MCSymbolExpr isn't expressive enough to represent ha16(label1-label2) which we need on PowerPC. I have a terrible hack in the meantime, but this will have to be revisited at some point. Last major conversion item left is global variable references. llvm-svn: 119105
* remove some extraneous quotes to make the new instprinter match.Chris Lattner2010-11-151-2/+2
| | | | llvm-svn: 119104
* Attempt to unbreak cmake-based buildsAnton Korobeynikov2010-11-151-0/+1
| | | | llvm-svn: 119098
* First step of huge frame-related refactoring: move emit{Prologue,Epilogue} ↵Anton Korobeynikov2010-11-155-664/+702
| | | | | | out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place llvm-svn: 119097
* Whitespace cleanupAnton Korobeynikov2010-11-151-4/+4
| | | | llvm-svn: 119096
* implement support for the MO_DARWIN_STUB TargetOperand flag,Chris Lattner2010-11-144-35/+172
| | | | | | | | and have isel apply to to call operands as required. This allows us to get $stub suffixes on label references on ppc/tiger with the new instprinter, fixing two tests. Only 2 to go. llvm-svn: 119093
* with the picbase nonsense starting to be figured out, implementChris Lattner2010-11-141-0/+22
| | | | | | lowering support for MovePCtoLR[8]. Down to 4 failures again. llvm-svn: 119090
* move the pic base symbol stuff up to MachineFunctionChris Lattner2010-11-142-2/+3
| | | | | | | since it is trivial and will be shared between ppc and x86. This substantially simplifies the X86 backend also. llvm-svn: 119089
* reimplement ppc asmprinter "toc" handling to use a VariantKindChris Lattner2010-11-142-3/+27
| | | | | | | | on the operand, required for .o file writing and fixing the PowerPC/mult-alt-generic-powerpc64.ll failure with the new instprinter. llvm-svn: 119087
* lower PPC::MFCRpseud when transforming to MC, avoiding callingChris Lattner2010-11-142-2/+18
| | | | | | the aborting printSpecial() method. This gets us to 8 failures. llvm-svn: 119084
* make the stubbed-out printer methods abort instead of Chris Lattner2010-11-142-3/+18
| | | | | | printing nothing. This gets us back up to 24 failures. llvm-svn: 119083
* wire up a few more things, down to 4 test failures, allChris Lattner2010-11-142-19/+39
| | | | | | about handling $stub, lo/hi etc. llvm-svn: 119082
* properly wire up the instprinter to the ppc64 backend, down to 5 failures.Chris Lattner2010-11-141-1/+1
| | | | llvm-svn: 119081
* implement pretty printing support for the various pseudoChris Lattner2010-11-141-0/+45
| | | | | | | ops the asmprinter supported, fixing PowerPC/rlwimi2.ll among others. Down to 20 failures. llvm-svn: 119080
* Wire up symbol hi/lo printing. We don't print hi()/lo(), but this getsChris Lattner2010-11-142-4/+17
| | | | | | us further along. Only 28 failures now. llvm-svn: 119079
* implement basic support for symbol operand lowering,Chris Lattner2010-11-143-3/+63
| | | | | | and printing support for call operands. Down to 77 failures. llvm-svn: 119078
* switch PPC to a simplified MCInstLowering model.Chris Lattner2010-11-144-92/+13
| | | | llvm-svn: 119074
* fix PPC.h to not pull in TargetMachine.hChris Lattner2010-11-141-2/+2
| | | | llvm-svn: 119072
* implement basic support for memory operands and crbit operands,Chris Lattner2010-11-142-5/+72
| | | | | | this fixes 3 more ppc tests. llvm-svn: 119065
* implement several trivial operand printers, reducingChris Lattner2010-11-142-6/+56
| | | | | | failures in CodeGen/PowerPC from 120 -> 117 llvm-svn: 119063
* Implement support for printing register and immediate operands,Chris Lattner2010-11-143-6/+46
| | | | | | | | | | | | | | add support for darwin vs aix syntax. We now can print instructions like this: add r3, r3, r4 blr and (in aix mode): add 3, 3, 4 blr llvm-svn: 119062
* stub out PPCMCInstLowering, add a new option that uses it and the newChris Lattner2010-11-144-0/+154
| | | | | | instprinter when -enable-ppc-inst-printer is passed to llc. llvm-svn: 119061
* stub out a powerpc MCInstPrinter implementation.Chris Lattner2010-11-146-1/+144
| | | | llvm-svn: 119059
* move PPCAsmPrinter into the main PPC library, like ARM and X86.Chris Lattner2010-11-145-22/+2
| | | | llvm-svn: 119054
* In the calling convention logic, ValVT is always a legal type,Duncan Sands2010-11-041-6/+6
| | | | | | | and as such can be represented by an MVT - the more complicated EVT is not needed. Use MVT for ValVT everywhere. llvm-svn: 118245
* Inside the calling convention logic LocVT is always a simpleDuncan Sands2010-11-031-8/+8
| | | | | | | | | | value type, so there is no point in passing it around using an EVT. Use the simpler MVT everywhere. Rather than trying to propagate this information maximally in all the code that using the calling convention stuff, I chose to do a mainly low impact change instead. llvm-svn: 118167
* Inline asm multiple alternative constraints development phase 2 - improved ↵John Thompson2010-10-292-2/+49
| | | | | | basic logic, added initial platform support. llvm-svn: 117667
* Remove some variables that are never really usedDuncan Sands2010-10-211-1/+0
| | | | | | (gcc-4.6 warns about these). llvm-svn: 117021
OpenPOWER on IntegriCloud