[PATCH] D105528: [RuntimeDyldChecker] Support offset in decode_operand expr
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 6 22:42:13 PDT 2021
jrtc27 added a comment.
Why can't you just add a label for the instruction you want to test?
================
Comment at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp:568
unexpectedToken(Expr, Expr,
- "expected '(', '*', identifier, or number"), "");
----------------
Don't change formatting for code you didn't touch
================
Comment at: llvm/test/ExecutionEngine/JITLink/RISCV/ELF_pc_indirect.s:22
# jitlink-check: decode_operand(test_pcrel32, 1) = ((named_data - test_pcrel32) + 0x800) >> 12
+# jitlink-check: decode_operand(test_pcrel32+4, 2) = (named_data - test_pcrel32) - (((named_data - test_pcrel32 + 0x800) & 0xfffff000))
.globl test_pcrel32
----------------
This is just `(named_data - test_pcrel32) & 0xfff` sign-extended from 12 to 64 bits. The + 0x800 for the HI is to compensate for the sign extension for the LO, feeding it back into the LO calculation is backwards and results in circular reasoning.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105528/new/
https://reviews.llvm.org/D105528
More information about the llvm-commits
mailing list