hanchenye-llvm-project/llvm/lib
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
..
Analysis [NVPTX] Infer __nvvm_reflect as nounwind, readnone 2016-03-31 21:29:57 +00:00
AsmParser Move the DebugEmissionKind enum from DIBuilder into DICompileUnit. 2016-03-31 23:56:58 +00:00
Bitcode Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id" 2016-04-01 05:33:11 +00:00
CodeGen Don't use an i64 return type with webkit_jscc 2016-04-01 02:51:21 +00:00
DebugInfo Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
ExecutionEngine More more change need as part of r264187 where ErrorOr<> was added 2016-03-23 21:20:16 +00:00
Fuzzer [libFuzzer] more docs 2016-03-29 23:07:36 +00:00
IR Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id" 2016-04-01 05:33:11 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LTO ThinLTO: move ObjCARCContractPass in the CodeGen pipeline 2016-04-01 08:22:59 +00:00
LibDriver Remove autoconf support 2016-01-26 21:29:08 +00:00
LineEditor Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
Linker [ThinLTO] Remove post-pass metadata linking support 2016-03-29 18:24:19 +00:00
MC Handle section vs global name conflict. 2016-03-28 20:36:28 +00:00
Object Object: Correctly read thin archives containing absolute paths. 2016-03-31 22:08:31 +00:00
ObjectYAML [lanai] Add Lanai backend. 2016-03-28 13:09:54 +00:00
Option Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
Passes [PM] Rename the CRTP mixin base classes for the new pass manager to 2016-03-11 10:33:22 +00:00
ProfileData [PGO] use emplace_back. NFC. 2016-03-31 17:39:33 +00:00
Support Fix S390 big endian detection 2016-04-01 05:12:24 +00:00
TableGen [TableGen] Fix typos in comments. NFC 2016-02-26 06:50:27 +00:00
Target Fix for pr24346: arm asm label calculation error in sub 2016-04-01 09:40:47 +00:00
Transforms Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id" 2016-04-01 05:33:11 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
LLVMBuild.txt Add LLVMBuild for ObjectYAML. 2016-03-01 21:29:33 +00:00