Skip to content
  1. Dec 19, 2013
    • Kevin Enderby's avatar
      Revert my change to the X86 assembler for intel syntax to work with · d6f2a637
      Kevin Enderby authored
      directional labels.  Because it doesn't work for windows :)
      
      llvm-svn: 197731
      d6f2a637
    • Ted Kremenek's avatar
      Remove dead code identified by Aaron Ballman. · ec690e96
      Ted Kremenek authored
      llvm-svn: 197730
      ec690e96
    • Aaron Ballman's avatar
    • Kevin Enderby's avatar
      Changed the X86 assembler for intel syntax to work with directional labels. · 592d3ac2
      Kevin Enderby authored
      The X86 assembler has a separate code to parser the intel assembly syntax
      in X86AsmParser::ParseIntelOperand().  This did not parse directional labels.
      And if something like 1f was used as a branch target it would get an
      "Unexpected token" error.
      
      The fix starts in X86AsmParser::ParseIntelExpression() in the case for
      AsmToken::Integer, it needs to grab the IntVal from the current token
      then look for a 'b' or 'f' following the Integer.  Then it basically needs to
      do what is done in AsmParser::parsePrimaryExpr() for directional
      labels.  It saves the MCExpr it creates in the IntelExprStateMachine
      in the Sym field.
      
      When it returns to X86AsmParser::ParseIntelOperand() it looks
      for a non-zero Sym field in the IntelExprStateMachine and if
      set it creates a memory operand not an immediate operand
      it would normally do for the Integer.
      
      rdar://14961158
      
      llvm-svn: 197728
      592d3ac2
    • Nick Kledzik's avatar
      [lld] Introduce registry and Reference kind tuple · e5552777
      Nick Kledzik authored
      The main changes are in:
        include/lld/Core/Reference.h
        include/lld/ReaderWriter/Reader.h
      Everything else is details to support the main change.
      
      1) Registration based Readers
      Previously, lld had a tangled interdependency with all the Readers.  It would
      have been impossible to make a streamlined linker (say for a JIT) which
      just supported one file format and one architecture (no yaml, no archives, etc).
      The old model also required a LinkingContext to read an object file, which
      would have made .o inspection tools awkward.
      
      The new model is that there is a global Registry object. You programmatically 
      register the Readers you want with the registry object. Whenever you need to 
      read/parse a file, you ask the registry to do it, and the registry tries each 
      registered reader.
      
      For ease of use with the existing lld code base, there is one Registry
      object inside the LinkingContext object. 
      
      
      2) Changing kind value to be a tuple
      Beside Readers, the registry also keeps track of the mapping for Reference
      Kind values to and from strings.  Along with that, this patch also fixes
      an ambiguity with the previous Reference::Kind values.  The problem was that
      we wanted to reuse existing relocation type values as Reference::Kind values.
      But then how can the YAML write know how to convert a value to a string? The
      fix is to change the 32-bit Reference::Kind into a tuple with an 8-bit namespace
      (e.g. ELF, COFFF, etc), an 8-bit architecture (e.g. x86_64, PowerPC, etc), and
      a 16-bit value.  This tuple system allows conversion to and from strings with 
      no ambiguities.
      
      llvm-svn: 197727
      e5552777
    • Joey Gouly's avatar
      Remove redundant 'classof' functions. · 61a57138
      Joey Gouly authored
      llvm-svn: 197726
      61a57138
    • Daniel Jasper's avatar
      clang-format: Add special case for leading comments in braced lists. · 5a611397
      Daniel Jasper authored
      A comment following the "{" of a braced list seems to almost always
      refer to the first element of the list and thus should be aligned
      to it.
      
      Before (with Cpp11 braced list style):
        SomeFunction({  // Comment 1
                         "first entry",
                         // Comment 2
                         "second entry"});
      After:
        SomeFunction({// Comment 1
                      "first entry",
                      // Comment 2
                      "second entry"});
      
      llvm-svn: 197725
      5a611397
    • Tobias Grosser's avatar
      www: shorten menu entry · 5c6c62f7
      Tobias Grosser authored
      llvm-svn: 197724
      5c6c62f7
    • Tobias Grosser's avatar
      www: Rename menu items · 3905cb3d
      Tobias Grosser authored
      llvm-svn: 197723
      3905cb3d
    • Tobias Grosser's avatar
      www: Use a modern menu style · fcb48744
      Tobias Grosser authored
      llvm-svn: 197722
      fcb48744
    • Joey Gouly's avatar
      [cleanup] Random assortment of simple cleanups. · b46cf502
      Joey Gouly authored
      Pruning header includes and forward references and fixing comments.
      
      llvm-svn: 197720
      b46cf502
    • Rafael Espindola's avatar
      Update the links to the SPARC information. · 694b265d
      Rafael Espindola authored
      llvm-svn: 197719
      694b265d
    • Hans Wennborg's avatar
      Make sys::ThreadLocal<> zero-initialized on non-thread builds (PR18205) · fabf8bfd
      Hans Wennborg authored
      According to the docs, ThreadLocal<>::get() should return NULL
      if no object has been set. This patch makes that the case also for non-thread
      builds and adds a very basic unit test to check it.
      
      (This was causing PR18205 because PrettyStackTraceHead didn't get zero-
      initialized and we'd crash trying to read past the end of that list. We didn't
      notice this so much on Linux since we'd crash after printing all the entries,
      but on Mac we print into a SmallString, and would crash before printing that.)
      
      llvm-svn: 197718
      fabf8bfd
    • Alexander Kornienko's avatar
      Clang-tidy: added --disable-checks, --list-checks options. · fb9e92b1
      Alexander Kornienko authored
      Summary:
      Allow disabling checks by regex. By default, disable alpha.* checks,
      that are not particularly good tested (e.g. IdempotentOperationChecker, see
      http://llvm-reviews.chandlerc.com/D2427).
      
      Fixed a bug, that would disable all analyzer checks, when using a regex more
      strict, than 'clang-analyzer-', for example --checks='clang-analyzer-deadcode-'.
      
      Added --list-checks to list all enabled checks. This is useful to test specific
      values in --checks/--disable-checks.
      
      Reviewers: djasper, klimek
      
      Reviewed By: klimek
      
      CC: cfe-commits, klimek
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2444
      
      llvm-svn: 197717
      fb9e92b1
    • Aaron Ballman's avatar
    • Aaron Ballman's avatar
      No longer leaking Argument objects after calling createArgument. However,... · ced10529
      Aaron Ballman authored
      No longer leaking Argument objects after calling createArgument. However, since an OwningPtr cannot live in a std::vector yet, there are some manual deletions that have a FIXME attached to them. These will go away once C++11 support is allowed.
      
      llvm-svn: 197715
      ced10529
    • Jordan Rose's avatar
      [CMake] Tweak r197697 to handle CMake finding the wrong llvm-config/tblgen. · af9f8752
      Jordan Rose authored
      - If llvm-config fails, output an error to the user rather than allowing
        errors to cascade.
      - Always get llvm-tblgen from llvm-config's bindir.
      
      Turns out my PATH points to a really old version of LLVM; both of these
      fell out of trying to make this experience nicer.
      
      llvm-svn: 197714
      af9f8752
    • Kay Tiong Khoo's avatar
      Stay classy (and legal) LLVM. Remove links to 3rd party SMT solver whose links... · e37d5209
      Kay Tiong Khoo authored
      Stay classy (and legal) LLVM. Remove links to 3rd party SMT solver whose links may not be permanent.
      
      llvm-svn: 197713
      e37d5209
    • Quentin Colombet's avatar
      [X86][fast-isel] Fix select lowering. · 90a646e4
      Quentin Colombet authored
      The condition in selects is supposed to be i1.
      Make sure we are just reading the less significant bit
      of the 8 bits width value to match this constraint.
      
      <rdar://problem/15651765>
      
      llvm-svn: 197712
      90a646e4
    • David Peixotto's avatar
      Implement the .ltorg directive for ARM assembly · 80c083a6
      David Peixotto authored
      This directive will write out the assembler-maintained constant
      pool for the current section. These constant pools are created to
      support the ldr-pseudo instruction (e.g. ldr r0, =val).
      
      The directive can be used by the programmer to place the constant
      pool in a location that can be reached by a pc-relative offset in
      the ldr instruction.
      
      llvm-svn: 197711
      80c083a6
    • Aaron Ballman's avatar
      Type attribute do not get an AST node by default, so these statements can be... · d6180259
      Aaron Ballman authored
      Type attribute do not get an AST node by default, so these statements can be removed (it's inherited automatically from TypeAttr).
      
      llvm-svn: 197710
      d6180259
    • Josh Magee's avatar
      58fa4939
    • David Peixotto's avatar
      Implement the ldr-pseudo opcode for ARM assembly · e407d093
      David Peixotto authored
      The ldr-pseudo opcode is a convenience for loading 32-bit constants.
      It is converted into a pc-relative load from a constant pool. For
      example,
      
        ldr r0, =0x10001
        ldr r1, =bar
      
      will generate this output in the final assembly
      
        ldr r0, .Ltmp0
        ldr r1, .Ltmp1
        ...
        .Ltmp0: .long 0x10001
        .Ltmp1: .long bar
      
      Sketch of the LDR pseudo implementation:
        Keep a map from Section => ConstantPool
      
        When parsing ldr r0, =val
          parse val as an MCExpr
          get ConstantPool for current Section
          Label = CreateTempSymbol()
          remember val in ConstantPool at next free slot
          add operand to ldr that is MCSymbolRef of Label
      
        On finishParse() callback
          Write out all non-empty constant pools
          for each Entry in ConstantPool
            Emit Entry.Label
            Emit Entry.Value
      
      Possible improvements to be added in a later patch:
        1. Does not convert load of small constants to mov
           (e.g. ldr r0, =0x1 => mov r0, 0x1)
        2. Does reuse constant pool entries for same constant
      
      The implementation was tested for ARM, Thumb1, and Thumb2 targets on
      linux and darwin.
      
      llvm-svn: 197708
      e407d093
    • Aaron Ballman's avatar
      Removing the SourceLocation unused attribute argument type. · e6153933
      Aaron Ballman authored
      llvm-svn: 197707
      e6153933
    • David Peixotto's avatar
      Add a finishParse() callback to the targer asm parser · 308e7e43
      David Peixotto authored
      This callback is invoked when the parse has finished successfuly. It
      will be used to write out ARM constant pools to implement the ldr
      pseudo.
      
      llvm-svn: 197706
      308e7e43
    • Kay Tiong Khoo's avatar
      Improved fix for PR17827 (instcombine of shift/and/compare). · a570b5ad
      Kay Tiong Khoo authored
      This change fixes the case of arithmetic shift right - do not attempt to fold that case.
      This change also relaxes the conditions when attempting to fold the logical shift right and shift left cases.
      
      No additional IR-level test cases included at this time. See http://llvm.org/bugs/show_bug.cgi?id=17827 for proofs that these are correct transformations.
      
      llvm-svn: 197705
      a570b5ad
    • Fariborz Jahanian's avatar
      ObjectiveC. Sema test for property, methods · 4b7946a2
      Fariborz Jahanian authored
      'section' attribute. // rdar://15450637
      
      llvm-svn: 197704
      4b7946a2
    • NAKAMURA Takumi's avatar
      Revert r197682, "[CMake] Introduce LIT in add_lit_target." · 69a89c78
      NAKAMURA Takumi authored
      llvm-svn: 197703
      69a89c78
    • NAKAMURA Takumi's avatar
      check-clang: Suppress LLVM_LIT in add_lit_testsuite, for now. · ef4657e6
      NAKAMURA Takumi authored
      llvm-svn: 197702
      ef4657e6
    • Adrian Prantl's avatar
      Move testcase to the appropriate X86 subdirectory. · ddad4947
      Adrian Prantl authored
      llvm-svn: 197701
      ddad4947
    • Rafael Espindola's avatar
      Small simplification: p0 is the same as p. · 9ec8d08e
      Rafael Espindola authored
      llvm-svn: 197700
      9ec8d08e
    • Rafael Espindola's avatar
      Small simplification, p0 is the same as p. · 4fa79758
      Rafael Espindola authored
      llvm-svn: 197699
      4fa79758
    • Daniel Jasper's avatar
      clang-format: Increase penalty for breaking comments. · 19a541ef
      Daniel Jasper authored
      Unexpectedly, it seems that people commonly know what they were doing
      when writing a comment.
      
      Also, being more conservative about comment breaking has the advantage
      of giving more flexibility. If a linebreak within the comment can
      improve formatting, the author can add it (after which clang-format
      won't undo it). There is no way to override clang-format's behavior if
      it breaks a comment.
      
      llvm-svn: 197698
      19a541ef
    • NAKAMURA Takumi's avatar
      [CMake][Standalone] Rewrite standalone build based on llvm-config.... · e6d79ec0
      NAKAMURA Takumi authored
      [CMake][Standalone] Rewrite standalone build based on llvm-config. CLANG_PATH_TO_LLVM_*(s) are deprecated.
      
      Checked on VS10(multiconfig) and some singleconfig builders.
      
      * Assumptions
      
        - You should specify llvm-config as LLVM_CONFIG.
          CMake could find one in $PATH by default.
      
        - ENABLE_ASSERTIONS obeys LLVM's.
      
      * Use cases
      
        a) With LLVM build tree
      
          Assume llvm-config is in your build tree.
          Everything should work as ever.
      
        b) With *installed* LLVM
      
          Assume distributions. The source tree can be optional.
      
          b1) The source tree is provided on the location `llvm-config --src-root`
      
            - Test utils, FileCheck &c., are imported and built in the new tree.
            - Gtest is built in the tree if gtest library is not found.
            - Lit is used in $(SRCROOT)/utils/lit/lit.py.
      
          b2) The source tree is not provided
      
            - clang and utilities can be built.
            - All tests, unittests and check-clang are invalidated and not built.
      
      llvm-svn: 197697
      e6d79ec0
    • Zoran Jovanovic's avatar
      Support for microMIPS control instructions. · 8e918c3c
      Zoran Jovanovic authored
      llvm-svn: 197696
      8e918c3c
    • Will Wilson's avatar
      Fix comment typo. · 9ef61a7c
      Will Wilson authored
      llvm-svn: 197695
      9ef61a7c
    • Rafael Espindola's avatar
      Long doubles are required to be aligned to 128 bits and svr4 32 bits. · 9ec26f39
      Rafael Espindola authored
      Clang was already getting this right.
      
      llvm-svn: 197694
      9ec26f39
    • Hal Finkel's avatar
      Add a disassembler to the PowerPC backend · 2345347e
      Hal Finkel authored
      The tests for the disassembler were adapted from the encoder tests, and for the
      most part, the output from the disassembler matches that encoder-test inputs.
      There are some places where more-informative mnemonics could be produced
      (notably for the branch instructions), and those cases are noted in the tests
      with FIXMEs.
      
      Future work includes:
      
       - Generating more-informative mnemonics when possible (this may also be done
         in the printer).
      
       - Remove the dependence on positional "numbered" operand-to-variable mapping
         (for both encoding and decoding).
      
       - Internally using 64-bit instruction variants in 64-bit mode (if this turns
         out to matter).
      
      llvm-svn: 197693
      2345347e
    • Zoran Jovanovic's avatar
      Support for microMIPS LL and SC instructions. · ff9d5f32
      Zoran Jovanovic authored
      llvm-svn: 197692
      ff9d5f32
    • Hal Finkel's avatar
      Add support for positionally-encoded operands to FixedLenDecoderEmitter · 71b2e20d
      Hal Finkel authored
      Unfortunately, the PowerPC instruction definitions make heavy use of the
      positional operand encoding heuristic to map operands onto bitfield variables
      in the instruction definitions. Changing this to use name-based mapping is not
      trivial, however, because additional infrastructure needs to be designed to
      handle mapping of complex operands (with multiple suboperands) onto multiple
      bitfield variables.
      
      In the mean time, this adds support for positionally encoded operands to
      FixedLenDecoderEmitter, so that we can generate a disassembler for the PowerPC
      backend. To prevent an accidental reliance on this feature, and to prevent an
      undesirable interaction with existing disassemblers, a backend must opt-in to
      this support by setting the new decodePositionallyEncodedOperands
      instruction-set bit to true.
      
      When enabled, this iterates the variables that contribute to the instruction
      encoding, just as the encoder does, and emulates the procedure the encoder uses
      to map "numbered" operands to variables. The bit range for each variable is
      also determined as the encoder determines them. This map is then consulted
      during the decoder-generator's loop over operands to decode, allowing the
      decoder to understand both position-based and name-based operand-to-variable
      mappings.
      
      As noted in the comment on the decodePositionallyEncodedOperands definition,
      this support should be removed once it is no longer needed. There should be no
      change to existing disassemblers.
      
      llvm-svn: 197691
      71b2e20d
Loading