aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug I introduced in the ppc refactoring, which caused longChris Lattner2010-11-161-0/+1
| | | | | | | | | | | | branches to be emitted as: bne cr0, 2 instead of: bne cr0, $+8 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119317 91177308-0d34-0410-b5e6-96231b3b80d8
* Encode the multi-load/store instructions with their respective modes ('ia',Bill Wendling2010-11-1612-536/+562
| | | | | | | | | | 'db', 'ib', 'da') instead of having that mode as a separate field in the instruction. It's more convenient for the asm parser and much more readable for humans. <rdar://problem/8654088> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119310 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Get rid of sys::Path, Triple, and cleanup namespace.Michael J. Spencer2010-11-161-7/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119309 91177308-0d34-0410-b5e6-96231b3b80d8
* add copy of comment to the code that will survive the mcjit'izationChris Lattner2010-11-161-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119308 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119307 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember to resize SpillSlotToUsesMap when allocating an emergency spill slot.Jakob Stoklund Olesen2010-11-162-19/+19
| | | | | | | | | Use amazing new function call technology instead of writing identical code in multiple places. This fixes PR8604. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119306 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8612 in the standard spiller, take two.Jakob Stoklund Olesen2010-11-161-1/+8
| | | | | | | | | | The live range of a register defined by an early clobber starts at the use slot, not the def slot. Except when it is an early clobber tied to a use operand. Then it starts at the def slot like a standard def. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119305 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Thumb2 encodings for mov and friends.Owen Anderson2010-11-161-23/+50
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119295 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the 11 byte nop to be a single instruction.Rafael Espindola2010-11-151-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119286 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a pasto that massively broke the ppc jit while the buildbots happenedChris Lattner2010-11-151-2/+2
| | | | | | | | to be broken for other reasons git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119283 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Fix PR8612 in the standard spiller as well."Jakob Stoklund Olesen2010-11-151-5/+1
| | | | | | This reverts r119183 which borke the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119270 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to provide encodings for some miscellaneous Thumb2 encodings.Owen Anderson2010-11-151-14/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119187 91177308-0d34-0410-b5e6-96231b3b80d8
* Code clean up. The peephole pass should be the one updating the instructionEvan Cheng2010-11-153-24/+18
| | | | | | | iterator, not TII->OptimizeCompareInstr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119186 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide Thumb2 encodings for sxtb and friends.Owen Anderson2010-11-151-32/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119185 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit this change and remove the failing part of the test - it didn'tEric Christopher2010-11-151-4/+5
| | | | | | | | pass in the first place and was masked by earlier failures not warning and aborting the block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119184 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8612 in the standard spiller as well.Jakob Stoklund Olesen2010-11-151-1/+5
| | | | | | | The live range of a register defined by an early clobber starts at the use slot, not the def slot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119183 91177308-0d34-0410-b5e6-96231b3b80d8
* When spilling a register defined by an early clobber, make sure that the newJakob Stoklund Olesen2010-11-151-0/+6
| | | | | | | | | | | | | live ranges for the spill register are also defined at the use slot instead of the normal def slot. This fixes PR8612 for the inline spiller. A use was being allocated to the same register as a spilled early clobber def. This problem exists in all the spillers. A fix for the standard spiller is forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119182 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM LDR_PRE/LDR_POST/STR_PRE/STR_POST (and the *B counterparts) binary encoding.Jim Grosbach2010-11-154-38/+151
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119180 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Thumb2 encodings for comparison and shift operators.Owen Anderson2010-11-151-36/+106
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119176 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compiler warnigns.Benjamin Kramer2010-11-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119175 91177308-0d34-0410-b5e6-96231b3b80d8
* Add correct Thumb2 encodings for mvn and friends.Owen Anderson2010-11-151-11/+80
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119170 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FIXMEs.Jim Grosbach2010-11-151-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119167 91177308-0d34-0410-b5e6-96231b3b80d8
* Nuke redundant encoding bit set.Jim Grosbach2010-11-151-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119164 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach InstructionSimplify the trick of skipping incoming phiDuncan Sands2010-11-151-4/+9
| | | | | | | values that are equal to the phi itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119161 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MCExpr::EvaluateAsRelocatableImpl of variables to return the originalRafael Espindola2010-11-155-116/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | variable if recursing fails to simplify it. Factor AliasedSymbol to be a method of MCSymbol. Update MCAssembler::EvaluateFixup to match the change in EvaluateAsRelocatableImpl. Remove the WeakRefExpr hack, as the object writer now sees the weakref with no extra effort needed. Nothing else is using MCTargetExpr, but keep it for now. Now that the ELF writer sees relocations with aliases, handle .weak foo2 foo2: .weak bar2 .set bar2,foo2 .quad bar2 the same way gas does and produce a relocation with bar2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119152 91177308-0d34-0410-b5e6-96231b3b80d8
* Dovetail with Dan Dunbar's rework of ELFObjectWriter.Jason W Kim2010-11-151-223/+311
| | | | | | | | | | Added 2 new subclasses - X86ELFObjectWriter and ARMELFObectWriter. ARM and X86 require different code for RecordRelocation(), possibly others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119149 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8565.Rafael Espindola2010-11-152-6/+26
| | | | | | | | | | | This moves most of the isUsed logic to the MCSymbol itself. With this we get a bit more relaxed about allowing definitions after uses: uses that don't evaluate their argument immediately (jmp foo) are accepted. ddunbar, this was the smallest compromise I could think of that lets us accept gcc (and clang!) assembly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119144 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve code layout, mostly indentation. Kalle Raiskila2010-11-151-166/+150
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119142 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119136 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119134 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119133 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119132 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119127 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119126 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119125 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a now-unneeded operand printer.Chris Lattner2010-11-152-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119124 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119123 91177308-0d34-0410-b5e6-96231b3b80d8
* correct the fixup comment printer to work on big endian platforms.Chris Lattner2010-11-151-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119122 91177308-0d34-0410-b5e6-96231b3b80d8
* add proper encoding for MTCRF instead of using a hack.Chris Lattner2010-11-153-15/+37
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119121 91177308-0d34-0410-b5e6-96231b3b80d8
* add fields to the .td files unconditionally, simplifying tblgen a bit.Chris Lattner2010-11-157-31/+31
| | | | | | | | Switch the ARM backend to use 'let' instead of 'set' with this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119120 91177308-0d34-0410-b5e6-96231b3b80d8
* 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] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119118 91177308-0d34-0410-b5e6-96231b3b80d8
* add a dummy entry to fix a build errorChris Lattner2010-11-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119117 91177308-0d34-0410-b5e6-96231b3b80d8
* 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] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119116 91177308-0d34-0410-b5e6-96231b3b80d8
* dissolve some more hacks.Chris Lattner2010-11-152-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119115 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some fixme's, removing dead code.Chris Lattner2010-11-151-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119114 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119113 91177308-0d34-0410-b5e6-96231b3b80d8
* strength reduce TOC temp label generation, no functionality change.Chris Lattner2010-11-151-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119112 91177308-0d34-0410-b5e6-96231b3b80d8
* rip out a ton of old instruction printing junk now that theChris Lattner2010-11-151-419/+86
| | | | | | | new instprinting logic is there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119111 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add missing makefile.Michael J. Spencer2010-11-151-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119110 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure ARM multi load / store pass copies memoperands when forming ldrd / ↵Evan Cheng2010-11-151-0/+17
| | | | | | strd. pr8113. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119109 91177308-0d34-0410-b5e6-96231b3b80d8