1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/test/MC/AArch64/elf-reloc-addsubimm.s
Diana Picus 0020aa4a64 [AArch64] Fix encoding for lsl #12 in add/sub immediates
Whenever an add/sub immediate needs a fixup, we set that immediate field to zero,
which is correct, but we also set the shift bits to zero, which is not true for
instructions that use lsl #12. This patch makes sure that if lsl #12 was used,
it will appear in the encoding of the instruction.

Differential Revision: https://reviews.llvm.org/D23930

llvm-svn: 281898
2016-09-19 11:10:18 +00:00

14 lines
509 B
ArmAsm

// RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj %s -o - | \
// RUN: llvm-objdump -r -d - | FileCheck -check-prefix=OBJ %s
// OBJ-LABEL: Disassembly of section .text:
add x2, x3, #:lo12:some_label
// OBJ: [[addr:[0-9a-f]+]]: 62 00 00 91 add x2, x3, #0
// OBJ-NEXT: [[addr]]: R_AARCH64_ADD_ABS_LO12_NC some_label
add x2, x3, #:lo12:some_label, lsl #12
// OBJ: [[addr:[0-9a-f]+]]: 62 00 40 91 add x2, x3, #0, lsl #12
// OBJ-NEXT: [[addr]]: R_AARCH64_ADD_ABS_LO12_NC some_label