llvm-project/llvm/lib/Target/ARM/MCTargetDesc
James Molloy b876c72bcc Fix for pr24346: arm asm label calculation error in sub
Some ARM instructions encode 32-bit immediates as a 8-bit integer (0-255)
and a 4-bit rotation (0-30, even) in its least significant 12 bits. The
original fixup, FK_Data_4, patches the instruction by the value bit-to-bit,
regardless of the encoding. For example, assuming the label L1 and L2 are
0x0 and 0x104 respectively, the following instruction:

  add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

would be assembled to the following, which adds 1 to r0, instead of 260:

  e2800104 add r0, r0, #4, 2 ; equivalently 1

The new fixup kind fixup_arm_mod_imm takes care of the encoding:

  e2800f41 add r0, r0, #260

Patch by Ting-Yuan Huang!

llvm-svn: 265122
2016-04-01 09:40:47 +00:00
..
ARMAddressingModes.h [ARM] Add ARMv8.2-A FP16 scalar instructions 2016-01-25 10:26:26 +00:00
ARMAsmBackend.cpp Fix for pr24346: arm asm label calculation error in sub 2016-04-01 09:40:47 +00:00
ARMAsmBackend.h Don't put classes in headers into anonymous namespaces. 2016-01-27 19:29:42 +00:00
ARMAsmBackendDarwin.h Don't put classes in headers into anonymous namespaces. 2016-01-27 19:29:42 +00:00
ARMAsmBackendELF.h Make more headers self-contained. 2016-01-27 18:03:37 +00:00
ARMAsmBackendWinCOFF.h Don't put classes in headers into anonymous namespaces. 2016-01-27 19:29:42 +00:00
ARMBaseInfo.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ARMELFObjectWriter.cpp [MC] Rename TLSDESC as it's not ARM specific. 2016-03-15 17:29:52 +00:00
ARMELFStreamer.cpp [ARM] Add ARMv8-M Baseline/Mainline LLVM targeting 2016-01-15 10:24:39 +00:00
ARMFixupKinds.h Fix for pr24346: arm asm label calculation error in sub 2016-04-01 09:40:47 +00:00
ARMMCAsmInfo.cpp ARMv7k: base ABI decision on v7k Arch rather than watchos OS. 2016-01-27 19:32:29 +00:00
ARMMCAsmInfo.h Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC. 2015-09-15 16:17:27 +00:00
ARMMCCodeEmitter.cpp Fix for pr24346: arm asm label calculation error in sub 2016-04-01 09:40:47 +00:00
ARMMCExpr.cpp MC: Add target hook to control symbol quoting 2015-06-09 00:31:39 +00:00
ARMMCExpr.h Fix pr24486. 2015-10-05 12:07:05 +00:00
ARMMCTargetDesc.cpp [ARM] Introduce subtarget features per ARM architecture. 2015-11-16 11:10:19 +00:00
ARMMCTargetDesc.h [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
ARMMachORelocationInfo.cpp Reflect the MC/MCDisassembler split on the include/ level. 2016-01-26 16:44:37 +00:00
ARMMachObjectWriter.cpp ARM: fix handling of movw/movt relocations with addend. 2016-02-23 20:20:23 +00:00
ARMTargetStreamer.cpp [ARM] Fix several state persistence bugs 2016-01-12 13:38:15 +00:00
ARMUnwindOpAsm.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ARMUnwindOpAsm.h
ARMWinCOFFObjectWriter.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
ARMWinCOFFStreamer.cpp [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
CMakeLists.txt
LLVMBuild.txt