[PATCH] D153494: Detect out of range jumps further than 2^32 bytes
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 22:02:44 PDT 2023
MaskRay added a comment.
`fixup-out-of-range-64-bit.s` may not be suitable as
- The test fails even without the patch.
- `.space 1<<32` is very slow for `MCELFStreamer`. I am unsure whether we want to add a special case for `-filetype=obj` when `-o /dev/null`.
If we a test, we can craft a unittest in `llvm/unittests/MC/`, this may however involve a lot of boilerplate and make future refactoring of `evaluateFixup` difficult...
I think just fixing the code without a test is fine, but am happy to hear from others.
================
Comment at: llvm/test/MC/AArch64/fixup-out-of-range-64-bit.s:9
+
+// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
+ b distant
----------------
`[[@LINE+1]]` is deprecated lit syntax. Use `[[#@LINE+1]]`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153494/new/
https://reviews.llvm.org/D153494
More information about the llvm-commits
mailing list