Skip to content
  1. Nov 27, 2013
  2. Nov 26, 2013
  3. Nov 25, 2013
    • Rafael Espindola's avatar
      Do the string comparison in the constructor instead of once per nop. · a834e301
      Rafael Espindola authored
      Thanks to Roman Divacky for the suggestion.
      
      llvm-svn: 195684
      a834e301
    • 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
    • Bill Wendling's avatar
      Unrevert r195599 with testcase fix. · 9200bb08
      Bill Wendling authored
      I'm not sure how it was checking for the wrong values...
      PR18023.
      
      llvm-svn: 195670
      9200bb08
    • Tim Northover's avatar
      Fix indentation typo · d34094e5
      Tim Northover authored
      llvm-svn: 195660
      d34094e5
    • Tim Northover's avatar
      ARM: remove special cases for Darwin dynamic-no-pic mode. · db962e2c
      Tim Northover authored
      These are handled almost identically to static mode (and ELF's global address
      materialisation), except that a symbol may have "$non_lazy_ptr" appended. This
      can be handled by passing appropriate flags along with the instruction instead
      of using entirely separate pseudo-instructions.
      
      llvm-svn: 195655
      db962e2c
    • 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
    • Rafael Espindola's avatar
      Refactor to make the .bss, .data and .text sections available for other uses. · 3294e057
      Rafael Espindola authored
      No functionality change.
      
      llvm-svn: 195653
      3294e057
Loading