[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 22:29:26 PST 2025
================
@@ -1056,6 +1056,15 @@ struct RISCVOperand final : public MCParsedAsmOperand {
isInt<26>(fixImmediateForRV32(Imm, isRV64Imm()));
}
+ bool isSImm32() const {
+ int64_t Imm;
+ RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
+ if (!isImm())
+ return false;
+ bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
+ return IsConstantImm && isInt<32>(Imm) && VK == RISCVMCExpr::VK_RISCV_None;
----------------
hchandel wrote:
I misunderstood previous comments regarding SImm32. Fixed it now. I have one question: This operand SImm32 also supports uimm32 constants, Is it ok to call it SImm (signed immediate)?
https://github.com/llvm/llvm-project/pull/124706
More information about the llvm-commits
mailing list