[PATCH] D114172: [ARM] implement support for ALU/LDR PC-relative group relocations
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 22 10:32:30 PST 2021
MaskRay accepted this revision.
MaskRay added a comment.
If it's easy, would also be good to have an error test in `arm-adr-err.s`
================
Comment at: lld/ELF/Arch/ARM.cpp:431
+ rem = val;
+ val &= (uint64_t)0xffffffU >> lz;
+ } while (group--);
----------------
================
Comment at: lld/ELF/Arch/ARM.cpp:444
+ opcode = 0x00400000;
+ val = ~val + 1;
}
----------------
================
Comment at: lld/ELF/Arch/ARM.cpp:453
+ }
+ if (check && imm > 0xffU)
+ error(getErrorLocation(loc) + "unencodeable immediate " + Twine(val).str() +
----------------
================
Comment at: lld/ELF/Arch/ARM.cpp:456
+ " for relocation " + toString(rel.type));
+ write32le(loc, (read32le(loc) & 0xff3ff000) | opcode | rot | (imm & 0xffU));
+}
----------------
================
Comment at: lld/ELF/Arch/ARM.cpp:470
+ opcode = 0x0;
+ val = ~val + 1;
+ }
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114172/new/
https://reviews.llvm.org/D114172
More information about the llvm-commits
mailing list