Skip to content
  1. Jul 18, 2017
  2. Jun 30, 2017
    • Ulrich Weigand's avatar
      [SystemZ] Add all remaining instructions · 03ab2e2b
      Ulrich Weigand authored
      This adds all remaining instructions that were still missing, mostly
      privileged and semi-privileged system-level instructions.  These are
      provided for use with the assembler and disassembler only.
      
      This brings the LLVM assembler / disassembler to parity with the
      GNU binutils tools.
      
      llvm-svn: 306876
      03ab2e2b
  3. Jun 06, 2017
    • Chandler Carruth's avatar
      Sort the remaining #include lines in include/... and lib/.... · 6bda14b3
      Chandler Carruth authored
      I did this a long time ago with a janky python script, but now
      clang-format has built-in support for this. I fed clang-format every
      line with a #include and let it re-sort things according to the precise
      LLVM rules for include ordering baked into clang-format these days.
      
      I've reverted a number of files where the results of sorting includes
      isn't healthy. Either places where we have legacy code relying on
      particular include ordering (where possible, I'll fix these separately)
      or where we have particular formatting around #include lines that
      I didn't want to disturb in this patch.
      
      This patch is *entirely* mechanical. If you get merge conflicts or
      anything, just ignore the changes in this patch and run clang-format
      over your #include lines in the files.
      
      Sorry for any noise here, but it is important to keep these things
      stable. I was seeing an increasing number of patches with irrelevant
      re-ordering of #include lines because clang-format was used. This patch
      at least isolates that churn, makes it easy to skip when resolving
      conflicts, and gets us to a clean baseline (again).
      
      llvm-svn: 304787
      6bda14b3
  4. May 10, 2017
  5. Feb 04, 2017
  6. Nov 28, 2016
    • Ulrich Weigand's avatar
      [SystemZ] Support execution hint instructions · 84404f30
      Ulrich Weigand authored
      This adds assembler support for the instructions provided by the
      execution-hint facility (NIAI and BP(R)P).  This required adding
      support for the new relocation types for 12-bit and 24-bit PC-
      relative offsets used by the BP(R)P instructions.
      
      llvm-svn: 288031
      84404f30
  7. Nov 08, 2016
    • Ulrich Weigand's avatar
      [SystemZ] Model access registers as LLVM registers · fffc7110
      Ulrich Weigand authored
      Add the 16 access registers as LLVM registers.  This allows removing
      a lot of special cases in the assembler and disassembler where we
      were handling access registers; this can all just use the generic
      register code now.
      
      Also add a bunch of instructions to operate on access registers,
      for assembler/disassembler use only.  No change in code generation
      intended.
      
      llvm-svn: 286283
      fffc7110
  8. Nov 02, 2016
  9. Nov 01, 2016
    • Alex Bradbury's avatar
      [TableGen] Move OperandMatchResultTy enum to MCTargetAsmParser.h · 58eba099
      Alex Bradbury authored
      As it stands, the OperandMatchResultTy is only included in the generated
      header if there is custom operand parsing. However, almost all backends
      make use of MatchOperand_Success and friends from OperandMatchResultTy for
      e.g. parseRegister. This is a pain when starting an AsmParser for a new
      backend that doesn't yet have custom operand parsing. Move the enum to
      MCTargetAsmParser.h.
      
      This patch is a prerequisite for D23563
      
      Differential Revision: https://reviews.llvm.org/D23496
      
      llvm-svn: 285705
      58eba099
  10. Oct 31, 2016
    • Ulrich Weigand's avatar
      [SystemZ] Correctly diagnose missing features in AsmParser · d9001301
      Ulrich Weigand authored
      Currently, when using an instruction that is not supported on the
      currently selected architecture, the LLVM assembler is likely to
      diagnose an "invalid operand" instead of a "missing feature".
      
      This is because many operands require a custom parser in order to
      be processed correctly, and if an instruction is not available
      according to the current feature set, the generated parser code
      will also not detect the associated custom operand parsers.
      
      Fixed by temporarily enabling all features while parsing operands.
      The missing features will then be correctly detected when actually
      parsing the instruction itself.
      
      llvm-svn: 285575
      d9001301
    • Ulrich Weigand's avatar
      [SystemZ] Fix encoding of MVCK and .insn ss · ec5d779e
      Ulrich Weigand authored
      LLVM currently treats the first operand of MVCK as if it were a
      regular base+index+displacement address.  However, it is in fact
      a base+displacement combined with a length register field.
      
      While the two might look syntactically similar, there are two
      semantic differences:
      - %r0 is a valid length register, even though it cannot be used
        as an index register.
      - In an expression with just a single register like 0(%rX), the
        register is treated as base with normal addresses, while it is
        treated as the length register (with an empty base) for MVCK.
      
      Fixed by adding a new operand parser class BDRAddr and reworking
      the assembler parser to distinguish between address + length
      register operands and regular addresses.
      
      llvm-svn: 285574
      ec5d779e
  11. Oct 11, 2016
  12. Oct 10, 2016
  13. Oct 09, 2016
  14. Sep 16, 2016
    • Nirav Dave's avatar
      Defer asm errors to post-statement failure · 2364748a
      Nirav Dave authored
      Recommitting after fixing AsmParser initialization and X86 inline asm
      error cleanup.
      
      Allow errors to be deferred and emitted as part of clean up to simplify
      and shorten Assembly parser code. This will allow error messages to be
      emitted in helper functions and be modified by the caller which has
      better context.
      
      As part of this many minor cleanups to the Parser:
      
      * Unify parser cleanup on error
      * Add Workaround for incorrect return values in ParseDirective instances
      * Tighten checks on error-signifying return values for parser functions
        and fix in-tree TargetParsers to be more consistent with the changes.
      * Fix AArch64 test cases checking for spurious error messages that are
        now fixed.
      
      These changes should be backwards compatible with current Target Parsers
      so long as the error status are correctly returned in appropriate
      functions.
      
      Reviewers: rnk, majnemer
      
      Subscribers: aemerson, jyknight, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D24047
      
      llvm-svn: 281762
      2364748a
  15. Sep 13, 2016
    • Nico Weber's avatar
      Revert r281336 (and r281337), it caused PR30372. · e204c48d
      Nico Weber authored
      llvm-svn: 281361
      e204c48d
    • Nirav Dave's avatar
      Defer asm errors to post-statement failure · 9fa8af21
      Nirav Dave authored
      Recommitting after fixing AsmParser Initialization.
      
      Allow errors to be deferred and emitted as part of clean up to simplify
      and shorten Assembly parser code. This will allow error messages to be
      emitted in helper functions and be modified by the caller which has
      better context.
      
      As part of this many minor cleanups to the Parser:
      
      * Unify parser cleanup on error
      * Add Workaround for incorrect return values in ParseDirective instances
      * Tighten checks on error-signifying return values for parser functions
        and fix in-tree TargetParsers to be more consistent with the changes.
      * Fix AArch64 test cases checking for spurious error messages that are
        now fixed.
      
      These changes should be backwards compatible with current Target Parsers
      so long as the error status are correctly returned in appropriate
      functions.
      
      Reviewers: rnk, majnemer
      
      Subscribers: aemerson, jyknight, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D24047
      
      llvm-svn: 281336
      9fa8af21
    • Eric Christopher's avatar
      Temporarily Revert "[MC] Defer asm errors to post-statement failure" as it's... · 04c7db31
      Eric Christopher authored
      Temporarily Revert "[MC] Defer asm errors to post-statement failure" as it's causing errors on the sanitizer bots.
      
      This reverts commit r281249.
      
      llvm-svn: 281280
      04c7db31
  16. Sep 12, 2016
    • Nirav Dave's avatar
      [MC] Defer asm errors to post-statement failure · c0c0f7a1
      Nirav Dave authored
      Allow errors to be deferred and emitted as part of clean up to simplify
      and shorten Assembly parser code. This will allow error messages to be
      emitted in helper functions and be modified by the caller which has
      better context.
      
      As part of this many minor cleanups to the Parser:
      
      * Unify parser cleanup on error
      * Add Workaround for incorrect return values in ParseDirective instances
      * Tighten checks on error-signifying return values for parser functions
        and fix in-tree TargetParsers to be more consistent with the changes.
      * Fix AArch64 test cases checking for spurious error messages that are
        now fixed.
      
      These changes should be backwards compatible with current Target Parsers
      so long as the error status are correctly returned in appropriate
      functions.
      
      Reviewers: rnk, majnemer
      
      Subscribers: aemerson, jyknight, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D24047
      
      llvm-svn: 281249
      c0c0f7a1
  17. Aug 10, 2016
    • Roger Ferrer Ibanez's avatar
      Fix build break of VS 2013 debug builds · 17586582
      Roger Ferrer Ibanez authored
      In debug mode extra macros are enabled for several C++ algorithms. Some of them
      may cause unfortunate build failures.
      
      This commit adds a redundant operator() to work around one of those troublesome
      macros which was hit accidentally by change r278012.
      
      llvm-svn: 278241
      17586582
  18. Aug 08, 2016
    • Zhan Jun Liau's avatar
      [SystemZ] Add support for the .insn directive · 4fbc3f4a
      Zhan Jun Liau authored
      Summary:
      Add support for the .insn directive.
      
      .insn is an s390 specific directive that allows encoding of an instruction
      instead of using a mnemonic. The motivating case is some code in node.js that
      requires support for the .insn directive.
      
      Reviewers: koriakin, uweigand
      
      Subscribers: koriakin, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D21809
      
      llvm-svn: 278012
      4fbc3f4a
  19. Jul 08, 2016
  20. Jan 27, 2016
  21. Nov 14, 2015
    • Akira Hatanaka's avatar
      Reduce the size of MCRelaxableFragment. · b11ef089
      Akira Hatanaka authored
      MCRelaxableFragment previously kept a copy of MCSubtargetInfo and
      MCInst to enable re-encoding the MCInst later during relaxation. A copy
      of MCSubtargetInfo (instead of a reference or pointer) was needed
      because the feature bits could be modified by the parser.
      
      This commit replaces the MCSubtargetInfo copy in MCRelaxableFragment
      with a constant reference to MCSubtargetInfo. The copies of
      MCSubtargetInfo are kept in MCContext, and the target parsers are now
      responsible for asking MCContext to provide a copy whenever the feature
      bits of MCSubtargetInfo have to be toggled.
       
      With this patch, I saw a 4% reduction in peak memory usage when I
      compiled verify-uselistorder.lto.bc using llc.
      
      rdar://problem/21736951
      
      Differential Revision: http://reviews.llvm.org/D14346
      
      llvm-svn: 253127
      b11ef089
    • Akira Hatanaka's avatar
      [MCTargetAsmParser] Move the member varialbes that reference · bd9fc284
      Akira Hatanaka authored
      MCSubtargetInfo in the subclasses into MCTargetAsmParser and define a
      member function getSTI.
      
      This is done in preparation for making changes to shrink the size of
      MCRelaxableFragment. (see http://reviews.llvm.org/D14346).
      
      llvm-svn: 253124
      bd9fc284
  22. Oct 09, 2015
    • Jonas Paulsson's avatar
      [SystemZ] Bugfix in SystemZAsmParser.cpp. · 0a9049ba
      Jonas Paulsson authored
      Let parseRegister() allow RegFP Group if expecting RegV Group, since the
      %f register prefix yields the FP group even while used with vector instructions.
      
      Reviewed by Ulrich Weigand.
      
      llvm-svn: 249810
      0a9049ba
  23. Jul 27, 2015
  24. Jun 30, 2015
  25. May 30, 2015
  26. May 18, 2015
  27. May 13, 2015
  28. May 05, 2015
    • Ulrich Weigand's avatar
      [SystemZ] Add z13 vector facility and MC support · a8b04e1c
      Ulrich Weigand authored
      This patch adds support for the z13 processor type and its vector facility,
      and adds MC support for all new instructions provided by that facilily.
      
      Apart from defining the new instructions, the main changes are:
      
      - Adding VR128, VR64 and VR32 register classes.
      - Making FP64 a subclass of VR64 and FP32 a subclass of VR32.
      - Adding a D(V,B) addressing mode for scatter/gather operations
      - Adding 1-, 2-, and 3-bit immediate operands for some 4-bit fields.
        Until now all immediate operands have been the same width as the
        underlying field (hence the assert->return change in decode[SU]ImmOperand).
      
      In addition, sys::getHostCPUName is extended to detect running natively
      on a z13 machine.
      
      Based on a patch by Richard Sandiford.
      
      llvm-svn: 236520
      a8b04e1c
  29. May 04, 2015
    • Ulrich Weigand's avatar
      [SystemZ] Clean up AsmParser isMem() handling · 1f698b00
      Ulrich Weigand authored
      We know what MemoryKind an operand has at the time we construct it,
      so we might as well just record it in an unused part of the structure.
      This makes it easier to add scatter/gather addresses later.
      
      No behavioral change intended.
      
      Patch originally by Richard Sandiford.
      
      llvm-svn: 236432
      1f698b00
  30. Feb 18, 2015
    • Ulrich Weigand's avatar
      [SystemZ] Support all TLS access models - MC part · 7bdd7c23
      Ulrich Weigand authored
      The current SystemZ back-end only supports the local-exec TLS access model.
      This patch adds all required MC support for the other TLS models, which
      means in particular:
      
      - Support additional relocation types for
        Initial-exec model: R_390_TLS_IEENT
        Local-dynamic-model: R_390_TLS_LDO32, R_390_TLS_LDO64,
                             R_390_TLS_LDM32, R_390_TLS_LDM64, R_390_TLS_LDCALL
        General-dynamic model: R_390_TLS_GD32, R_390_TLS_GD64, R_390_TLS_GDCALL
      
      - Support assembler syntax to generate additional relocations
        for use with __tls_get_offset calls:
          :tls_gdcall:
          :tls_ldcall:
      
      The patch also adds a new test to verify fixups and relocations,
      and removes the (already unused) FK_390_PLT16DBL/FK_390_PLT32DBL
      fixup kinds.
      
      llvm-svn: 229652
      7bdd7c23
  31. Jan 03, 2015
  32. Aug 18, 2014
    • Tim Northover's avatar
      TableGen: allow use of uint64_t for available features mask. · 26bb14e6
      Tim Northover authored
      ARM in particular is getting dangerously close to exceeding 32 bits worth of
      possible subtarget features. When this happens, various parts of MC start to
      fail inexplicably as masks get truncated to "unsigned".
      
      Mostly just refactoring at present, and there's probably no way to test.
      
      llvm-svn: 215887
      26bb14e6
  33. Jun 08, 2014
    • David Blaikie's avatar
      AsmMatchers: Use unique_ptr to manage ownership of MCParsedAsmOperand · 960ea3f0
      David Blaikie authored
      I saw at least a memory leak or two from inspection (on probably
      untested error paths) and r206991, which was the original inspiration
      for this change.
      
      I ran this idea by Jim Grosbach a few weeks ago & he was OK with it.
      Since it's a basically mechanical patch that seemed sufficient - usual
      post-commit review, revert, etc, as needed.
      
      llvm-svn: 210427
      960ea3f0
  34. Apr 25, 2014
  35. Apr 23, 2014
    • Evgeniy Stepanov's avatar
      Create MCTargetOptions. · 0a951b77
      Evgeniy Stepanov authored
      For now it contains a single flag, SanitizeAddress, which enables
      AddressSanitizer instrumentation of inline assembly.
      
      Patch by Yuri Gorshenin.
      
      llvm-svn: 206971
      0a951b77
Loading