[RISCV][MC]Add support for Binary MCExpr
There is an issue: https://github.com/llvm/llvm-project/issues/64612 This issue happens because in RISCVMCCodeEmitter::getImmOpValue it only handles MCExpr kind Target and SymbolRef. When code with format like .+ comes in, it comes with MCExpr kind Binary, the fixupkind remains fixup_riscv_invalid and reports error. This patch make MCExpr kind Binary handled with the same way as MCExpr kind SymbolRef, so code with binary expression can get correct fixupkind and be used to generate more complex relocation. Differential Revision: https://reviews.llvm.org/D157694
parent
4b7a08f0
Please register or sign in to comment