Skip to content
  1. Dec 19, 2013
    • Zoran Jovanovic's avatar
      Support for microMIPS control instructions. · 8e918c3c
      Zoran Jovanovic authored
      llvm-svn: 197696
      8e918c3c
    • 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
    • Zoran Jovanovic's avatar
      Support for microMIPS TLS relocations. · 69be811a
      Zoran Jovanovic authored
      llvm-svn: 197685
      69be811a
    • Saleem Abdulrasool's avatar
      ARM IAS: support .inst directive · c0da2cb3
      Saleem Abdulrasool authored
      This adds support for the .inst directive.  This is an ARM specific directive to
      indicate an instruction encoded as a constant expression.  The major difference
      between .word, .short, or .byte and .inst is that the latter will be
      disassembled as an instruction since it does not get flagged as data.
      
      llvm-svn: 197657
      c0da2cb3
  2. Dec 18, 2013
  3. Dec 17, 2013
  4. Dec 13, 2013
  5. Dec 11, 2013
  6. Dec 09, 2013
    • Vladimir Medic's avatar
      Method parseSetAssignment treats every operand with '$' sign as register and... · 0d02be37
      Vladimir Medic authored
      Method parseSetAssignment treats every operand with '$' sign as register and the parsing is directed to set alias for register. This will result in errors reported when expressions containing label references are parsed(for example long jumps)
      As we can't make a complete solution now it has been decided to enable .set directive to handle long jump expressions. This will cause parser to report errors when parsing integer based register assignments, for example:
         .set r3, will be reported as error. Still, the need for expressions is higher priority as the integer based register assignments are Mips specific and can be avoided using register names.
      
      llvm-svn: 196773
      0d02be37
  7. Dec 06, 2013
    • David Peixotto's avatar
      Integrated assembler incorrectly lexes ARM-style comments · 2cdc56d2
      David Peixotto authored
      The integrated assembler fails to properly lex arm comments when
      they are adjacent to an identifier in the input stream. The reason
      is that the arm comment symbol '@' is also used as symbol variant in
      other assembly languages so when lexing an identifier it allows the
      '@' symbol as part of the identifier.
      
      Example:
        $ cat comment.s
        foo:
          add r0, r0@got to parse this as a comment
      
        $ llvm-mc -triple armv7 comment.s
        comment.s:4:18: error: unexpected token in argument list
          add r0, r0@got to parse this as a comment
                         ^
      This should be parsed as correctly as `add r0, r0`.
      
      This commit modifes the assembly lexer to not include the '@' symbol
      in identifiers when lexing for targets that use '@' for comments.
      
      llvm-svn: 196607
      2cdc56d2
  8. Dec 05, 2013
    • Matheus Almeida's avatar
      [mips][msa] Fix issue with immediate fields of LD/ST instructions · 6b59c449
      Matheus Almeida authored
      not being correctly encoded/decoded.
      In more detail, immediate fields of LD/ST instructions should be
      divided/multiplied by the size of the data format before encoding and
      after decoding, respectively.
      
      llvm-svn: 196494
      6b59c449
    • Alp Toker's avatar
      Correct word hyphenations · f907b891
      Alp Toker authored
      This patch tries to avoid unrelated changes other than fixing a few
      hyphen-related ambiguities and contractions in nearby lines.
      
      llvm-svn: 196471
      f907b891
    • NAKAMURA Takumi's avatar
      Move llvm/test/MC/ELF/thumb-st_other.s to test/MC/ARM. · 57b20a7e
      NAKAMURA Takumi authored
      llvm-svn: 196457
      57b20a7e
    • Logan Chien's avatar
      [mc] Fix ELF st_other flag. · ee36595c
      Logan Chien authored
      ELF_Other_Weakref and ELF_Other_ThumbFunc seems to be LLVM
      internal ELF symbol flags.  These should not be emitted to
      object file.
      
      This commit defines ELF_STO_Shift for the target-defined
      flags for st_other, and increase the value of
      ELF_Other_Shift to 16.
      
      llvm-svn: 196440
      ee36595c
    • Kevin Enderby's avatar
      Fix a bug in darwin's 32-bit X86 handling of evaluating fixups. · 86496a45
      Kevin Enderby authored
      Where it would use a scattered relocation entry but falls back to a
      normal relocation entry because the FixupOffset is more than 24-bits.
      
      The bug is in the X86MachObjectWriter::RecordScatteredRelocation() where
      it changes reference parameter FixedValue but then returns false to indicate
      it did not create a scattered relocation entry.  The fix is simply to save the
      original value of the parameter FixedValue at the start of the method and
      restore it if we are returning false in that case.
      
      rdar://15526046
      
      llvm-svn: 196432
      86496a45
  9. Dec 04, 2013
    • David Peixotto's avatar
      Add support for parsing ARM symbol variants on ELF targets · 8ad70b35
      David Peixotto authored
      ARM symbol variants are written with parens instead of @ like this:
      
        .word __GLOBAL_I_a(target1)
      
      This commit adds support for parsing these symbol variants in
      expressions. We introduce a new flag to MCAsmInfo that indicates the
      parser should use parens to parse the symbol variant. The expression
      parser is modified to look for symbol variants using parens instead
      of @ when the corresponding MCAsmInfo flag is true.
      
      The MCAsmInfo parens flag is enabled only for ARM on ELF.
      
      By adding this flag to MCAsmInfo, we are able to get rid of
      redundant ARM-specific symbol variants and use the generic variants
      instead (e.g. VK_GOT instead of VK_ARM_GOT). We use the new
      UseParensForSymbolVariant attribute in MCAsmInfo to correctly print
      the symbol variants for arm.
      
      To achive this we need to keep a handle to the MCAsmInfo in the
      MCSymbolRefExpr class that we can check when printing the symbol
      variant.
      
      Updated Tests:
        Changed case of symbol variant to match the generic kind.
        test/CodeGen/ARM/tls-models.ll
        test/CodeGen/ARM/tls1.ll
        test/CodeGen/ARM/tls2.ll
        test/CodeGen/Thumb2/tls1.ll
        test/CodeGen/Thumb2/tls2.ll
      
      PR18080
      
      llvm-svn: 196424
      8ad70b35
    • Rafael Espindola's avatar
      Produce deterministic coff files. · 9201e6b5
      Rafael Espindola authored
      llvm-svn: 196341
      9201e6b5
    • Juergen Ributzka's avatar
      [Stackmap] Specify the triple and cpu to fix the unit test. · c4c9b371
      Juergen Ributzka authored
      llvm-svn: 196339
      c4c9b371
    • Juergen Ributzka's avatar
      [Stackmap] Emit multi-byte nops for X86. · 17e0d9ee
      Juergen Ributzka authored
      llvm-svn: 196334
      17e0d9ee
  10. Dec 02, 2013
  11. Nov 30, 2013
  12. Nov 29, 2013
  13. Nov 28, 2013
  14. Nov 27, 2013
    • Rafael Espindola's avatar
      Use the same tls section name as msvc. · 3c8e147a
      Rafael Espindola authored
      We currently error in clang with:
      "error: thread-local storage is unsupported for the current target", but we
      can start to get the llvm level ready.
      
      When compiling
      
      template<typename T>
      struct foo {
        static __declspec(thread) int bar;
      };
      template<typename T>
      __declspec(therad) int foo<T>::bar;
      template struct foo<int>;
      
      msvc produces
      
      SECTION HEADER #3
         .tls$ name
             0 physical address
             0 virtual address
             4 size of raw data
           12F file pointer to raw data (0000012F to 00000132)
             0 file pointer to relocation table
             0 file pointer to line numbers
             0 number of relocations
             0 number of line numbers
      C0301040 flags
               Initialized Data
               COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo@H@@2HA)
               4 byte align
               Read Write
      
      gcc produces a ".data$__emutls_v.<symbol>" for the testcase with
      __declspec(thread) replaced with thread_local.
      
      llvm-svn: 195849
      3c8e147a
    • Chad Rosier's avatar
      75290c63
    • Rafael Espindola's avatar
      Use simple section names for COMDAT sections on COFF. · 2d30ae2b
      Rafael Espindola authored
      With this patch we use simple names for COMDAT sections (like .text or .bss).
      This matches the MSVC behavior.
      
      When merging it is the COMDAT symbol that is used to decide if two sections
      should be merged, so there is no point in building a fancy name.
      
      This survived a bootstrap on mingw32.
      
      llvm-svn: 195798
      2d30ae2b
  15. Nov 26, 2013
  16. Nov 25, 2013
    • Rafael Espindola's avatar
      Use -triple to fix the test on non-ELF hosts. · 009a390c
      Rafael Espindola authored
      llvm-svn: 195682
      009a390c
    • Rafael Espindola's avatar
      Don't use nopl in cpus that don't support it. · 1b8bfdaa
      Rafael Espindola authored
      Patch by Mikulas Patocka. I added the test. I checked that for cpu names that
      gas knows about, it also doesn't generate nopl.
      
      The modified cpus:
      i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta
              Crusoe, Microsoft VirtualBox - see
              https://bbs.archlinux.org/viewtopic.php?pid=775414
      k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs
      via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that
              Via c3 and c3-Nehemiah don't have nopl
      
      llvm-svn: 195679
      1b8bfdaa
    • David Peixotto's avatar
      ARM integrated assembler generates incorrect nop opcode · 7266731f
      David Peixotto authored
      This patch fixes a bug in the assembler that was causing bad code to
      be emitted.  When switching modes in an assembly file (e.g. arm to
      thumb mode) we would always emit the opcode from the original mode.
      
      Consider this small example:
      
      $ cat align.s
      .code 16
      foo:
        add r0, r0
      .align 3
        add r0, r0
      
      $ llvm-mc -triple armv7-none-linux align.s -filetype=obj -o t.o
      $ llvm-objdump -triple thumbv7 -d t.o
      Disassembly of section .text:
      foo:
             0:       00 44         add     r0, r0
             2:       00 f0 20 e3   blx #4195904
             6:       00 00         movs    r0, r0
             8:       00 44         add     r0, r0
      
      This shows that we have actually emitted an arm nop (e320f000)
      instead of a thumb nop. Unfortunately, this encodes to a thumb
      branch which causes bad things to happen when compiling assembly
      code with align directives.
      
      The fix is to notify the ARMAsmBackend when we switch mode. The
      MCMachOStreamer was already doing this correctly. This patch makes
      the same change for the MCElfStreamer.
      
      There is still a bug in the way nops are emitted for alignment
      because the MCAlignment fragment does not store the correct mode.
      The ARMAsmBackend will emit nops for the last mode it knew about. In
      the example above, we still generate an arm nop if we add a `.code
      32` to the end of the file.
      
      PR18019
      
      llvm-svn: 195677
      7266731f
    • Rafael Espindola's avatar
      Fix .comm and .lcomm on COFF. · edcf1ff7
      Rafael Espindola authored
      These should not use COMDATs. GNU as uses .bss for .lcomm and section 0 for
      .comm.
      
      Given
      
      static int a;
      int b;
      
      MSVC puts both in .bss. This patch then puts both .comm and .lcomm on .bss. With
      this change we agree with gas on .lcomm, are much closer on .comm and clang-cl
      matches msvc on the above example.
      
      llvm-svn: 195654
      edcf1ff7
Loading