[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 22:51:35 PST 2025
================
@@ -1046,6 +1046,20 @@ struct RISCVOperand final : public MCParsedAsmOperand {
isInt<26>(fixImmediateForRV32(Imm, isRV64Imm()));
}
+ bool isImm32() const {
+ int64_t Imm;
+ RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
+ if (!isImm())
+ return false;
+ bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
+ bool IsValid;
+ if (!IsConstantImm)
+ IsValid = RISCVAsmParser::classifySymbolRef(getImm(), VK);
+ else
+ IsValid = isInt<32>(Imm) || isUInt<32>(Imm);
----------------
topperc wrote:
Is this equivalent to `isInt<32>(fixImmediateForRV32(Imm, isRV64Imm()))` like we do for other immediates?
https://github.com/llvm/llvm-project/pull/124706
More information about the llvm-commits
mailing list