[PATCH] D80367: [RISCV][MC] Print absolute targets of branch instructions
Simon Cook via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 09:41:51 PDT 2020
simoncook added a comment.
In D80367#2049179 <https://reviews.llvm.org/D80367#2049179>, @MaskRay wrote:
> Why does RISC-V need `PrintRequiresAddr`?
The rationale behind this was that to do PC relative addressing the operand print method needs the current address, and that is only in LLVM today if the operand type is `OPERAND_PCREL`. The RISC-V backend uses custom values for these and is used in `verifyInstruction` in `RISCVInstrInfo` to verify immediates fit into fields. I added `PrintRequiresAddr` as a second way of getting that behaviour for backends which use OperandType/OperandNamespace for custom things, rather than only if the type is `MCOI::OPERAND_PCREL`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80367/new/
https://reviews.llvm.org/D80367
More information about the llvm-commits
mailing list