Name the variables based on which part of the immediate value is
extracted, as it was already done for R_RISCV_JAL. This makes it
much easier to compare the logic with the spec.
Also only take the lower 12 bits of RawInstr for R_RISCV_JAL.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I have to confess that the previous way of specifying the arguments to extractBits (before rG95b74d4db0686a8d55fdae1af4e985ea52b2c572) was slightly more convenient because we could just copy from the spec. I personally find this new variable naming more logical, but please let me know what you think. Ideally, we could either share this immediate handling with LLD or directly extract it from the instruction encoding that LLVM knows about anyway.
Comment Actions
LGTM! Thanks!
llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp | ||
---|---|---|
227–228 | It's better to change this in another commit. |
llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp | ||
---|---|---|
227–228 | You mean the change to RawInstr & 0xFFF in a separate commit? Will do. |
It's better to change this in another commit.