Skip to content
  1. Jun 01, 2013
    • Tim Northover's avatar
      X86: change MOV64ri64i32 into MOV32ri64 · 3a1fd4c0
      Tim Northover authored
      The MOV64ri64i32 instruction required hacky MCInst lowering because it
      was allocated as setting a GR64, but the eventual instruction ("movl")
      only set a GR32. This converts it into a so-called "MOV32ri64" which
      still accepts a (appropriate) 64-bit immediate but defines a GR32.
      This is then converted to the full GR64 by a SUBREG_TO_REG operation,
      thus keeping everyone happy.
      
      This fixes a typo in the opcode field of the original patch, which
      should make the legact JIT work again (& adds test for that problem).
      
      llvm-svn: 183068
      3a1fd4c0
    • Eric Christopher's avatar
      Temporarily Revert "X86: change MOV64ri64i32 into MOV32ri64" as it · e1e57e5e
      Eric Christopher authored
      seems to have caused PR16192 and other JIT related failures.
      
      llvm-svn: 183059
      e1e57e5e
  2. May 31, 2013
    • Ahmed Bougacha's avatar
      Add a way to define the bit range covered by a SubRegIndex. · f1ed334d
      Ahmed Bougacha authored
      NOTE: If this broke your out-of-tree backend, in *RegisterInfo.td, change
      the instances of SubRegIndex that have a comps template arg to use the
      ComposedSubRegIndex class instead.
      
      In TableGen land, this adds Size and Offset attributes to SubRegIndex,
      and the ComposedSubRegIndex class, for which the Size and Offset are
      computed by TableGen. This also adds an accessor in MCRegisterInfo, and
      Size/Offsets for the X86 and ARM subreg indices.
      
      llvm-svn: 183020
      f1ed334d
    • Tim Northover's avatar
      X86: change MOV64ri64i32 into MOV32ri64 · d4736d67
      Tim Northover authored
      The MOV64ri64i32 instruction required hacky MCInst lowering because it was
      allocated as setting a GR64, but the eventual instruction ("movl") only set a
      GR32. This converts it into a so-called "MOV32ri64" which still accepts a
      (appropriate) 64-bit immediate but defines a GR32. This is then converted to
      the full GR64 by a SUBREG_TO_REG operation, thus keeping everyone happy.
      
      llvm-svn: 182991
      d4736d67
  3. May 30, 2013
    • Tim Northover's avatar
      X86: use sub-register sequences for MOV*r0 operations · 64ec0ff4
      Tim Northover authored
      Instead of having a bunch of separate MOV8r0, MOV16r0, ... pseudo-instructions,
      it's better to use a single MOV32r0 (which will expand to "xorl %reg, %reg")
      and obtain other sizes with EXTRACT_SUBREG and SUBREG_TO_REG. The encoding is
      smaller and partial register updates can sometimes be avoided.
      
      Until recently, this sequence was a barrier to rematerialization though. That
      should now be fixed so it's an appropriate time to make the change.
      
      llvm-svn: 182928
      64ec0ff4
    • Tim Northover's avatar
      X86: change zext moves to use sub-register infrastructure. · 04eb4234
      Tim Northover authored
      32-bit writes on amd64 zero out the high bits of the corresponding 64-bit
      register. LLVM makes use of this for zero-extension, but until now relied on
      custom MCLowering and other code to fixup instructions. Now we have proper
      handling of sub-registers, this can be done by creating SUBREG_TO_REG
      instructions at selection-time.
      
      Should be no change in functionality.
      
      llvm-svn: 182921
      04eb4234
    • Andrew Trick's avatar
      Order CALLSEQ_START and CALLSEQ_END nodes. · ad6d08ac
      Andrew Trick authored
      Fixes PR16146: gdb.base__call-ar-st.exp fails after
      pre-RA-sched=source fixes.
      
      Patch by Xiaoyi Guo!
      
      This also fixes an unsupported dbg.value test case. Codegen was
      previously incorrect but the test was passing by luck.
      
      llvm-svn: 182885
      ad6d08ac
  4. May 29, 2013
  5. May 25, 2013
  6. May 24, 2013
    • Ahmed Bougacha's avatar
      Add MCSymbolizer for symbolic/annotated disassembly. · ad1084de
      Ahmed Bougacha authored
      This is a basic first step towards symbolization of disassembled
      instructions. This used to be done using externally provided (C API)
      callbacks. This patch introduces:
      - the MCSymbolizer class, that mimics the same functions that were used
        in the X86 and ARM disassemblers to symbolize immediate operands and
        to annotate loads based off PC (for things like c string literals).
      - the MCExternalSymbolizer class, which implements the old C API.
      - the MCRelocationInfo class, which provides a way for targets to
        translate relocations (either object::RelocationRef, or disassembler
        C API VariantKinds) to MCExprs.
      - the MCObjectSymbolizer class, which does symbolization using what it
        finds in an object::ObjectFile. This makes simple symbolization (with
        no fancy relocation stuff) work for all object formats!
      - x86-64 Mach-O and ELF MCRelocationInfos.
      - A basic ARM Mach-O MCRelocationInfo, that provides just enough to
        support the C API VariantKinds.
      
      Most of what works in otool (the only user of the old symbolization API
      that I know of) for x86-64 symbolic disassembly (-tvV) works, namely:
      - symbol references: call _foo; jmp 15 <_foo+50>
      - relocations:       call _foo-_bar; call _foo-4
      - __cf?string:       leaq 193(%rip), %rax ## literal pool for "hello"
      Stub support is the main missing part (because libObject doesn't know,
      among other things, about mach-o indirect symbols).
      
      As for the MCSymbolizer API, instead of relying on the disassemblers
      to call the tryAdding* methods, maybe this could be done automagically
      using InstrInfo? For instance, even though PC-relative LEAs are used
      to get the address of string literals in a typical Mach-O file, a MOV
      would be used in an ELF file. And right now, the explicit symbolization
      only recognizes PC-relative LEAs. InstrInfo should have already have
      most of what is needed to know what to symbolize, so this can
      definitely be improved.
      
      I'd also like to remove object::RelocationRef::getValueString (it seems
      only used by relocation printing in objdump), as simply printing the
      created MCExpr is definitely enough (and cleaner than string concats).
      
      llvm-svn: 182625
      ad1084de
  7. May 23, 2013
  8. May 22, 2013
  9. May 21, 2013
  10. May 18, 2013
    • David Majnemer's avatar
      X86: Bad peephole interaction between adc, MOV32r0 · 5ba473af
      David Majnemer authored
      The peephole tries to reorder MOV32r0 instructions such that they are
      before the instruction that modifies EFLAGS.
      
      The problem is that the peephole does not consider the case where the
      instruction that modifies EFLAGS also depends on the previous state of
      EFLAGS.
      
      Instead, walk backwards until we find an instruction that has a def for
      EFLAGS but does not have a use.
      If we find such an instruction, insert the MOV32r0 before it.
      If it cannot find such an instruction, skip the optimization.
      
      llvm-svn: 182184
      5ba473af
    • Matt Arsenault's avatar
      Add LLVMContext argument to getSetCCResultType · 75865923
      Matt Arsenault authored
      llvm-svn: 182180
      75865923
  11. May 17, 2013
    • Benjamin Kramer's avatar
      X86: Make shuffle -> shift conversion more aggressive about undefs. · fc33e1d9
      Benjamin Kramer authored
      Shuffles that only move an element into position 0 of the vector are common in
      the output of the loop vectorizer and often generate suboptimal code when SSSE3
      is not available. Lower them to vector shifts if possible.
      
      We still prefer palignr over psrldq because it has higher throughput on
      sandybridge.
      
      llvm-svn: 182102
      fc33e1d9
  12. May 16, 2013
  13. May 14, 2013
  14. May 13, 2013
  15. May 11, 2013
  16. May 10, 2013
  17. May 09, 2013
    • Bill Wendling's avatar
      Generate a compact unwind encoding in the face of a stack alignment push. · 07fe235e
      Bill Wendling authored
      We generate a `push' of a random register (%rax) if the stack needs to be
      aligned by the size of that register. However, this could mess up compact unwind
      generation. In particular, we want to still generate compact unwind in the
      presence of this monstrosity.
      
      Check if the push of of the %rax/%eax register. If it is and it's marked with
      the `FrameSetup' flag, then we can generate a compact unwind encoding for the
      function only if the push is the last FrameSetup instruction.
      
      llvm-svn: 181540
      07fe235e
    • Bill Wendling's avatar
      Simplify the code a bit. · 98d5c52d
      Bill Wendling authored
      The compact unwind registers were defined in two different
      places. It's better just to place them in the function that uses them
      and specify that this is a 64-bit or 32-bit machine.
      
      No functionality change.
      
      llvm-svn: 181529
      98d5c52d
  18. May 07, 2013
Loading