Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ unsigned ARMAsmBackend::adjustFixupValue(const MCAssembler &Asm,
// signed 16bit range.
if ((Kind == ARM::fixup_arm_movw_lo16 || Kind == ARM::fixup_arm_movt_hi16 ||
Kind == ARM::fixup_t2_movw_lo16 || Kind == ARM::fixup_t2_movt_hi16) &&
(Addend < minIntN(16) || Addend > maxIntN(16))) {
!IsResolved && (Addend < minIntN(16) || Addend > maxIntN(16))) {
Ctx.reportError(Fixup.getLoc(), "Relocation Not In Range");
return 0;
}
Expand Down
9 changes: 9 additions & 0 deletions llvm/test/MC/ARM/arm-movt-movw-absolute-pass.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@RUN: llvm-mc -triple armv7-eabi -filetype obj %s -o - | llvm-objdump -d --triple armv7-eabi - | FileCheck %s

a:
movw r1, #:lower16:b - a + 65536
movt r1, #:upper16:b - a + 65536
b:

@CHECK: 0: e3001008 movw r1, #0x8
@CHECK: 4: e3401001 movt r1, #0x1
Loading