Skip to content

Conversation

@topperc
Copy link
Collaborator

@topperc topperc commented Oct 29, 2024

This is represented in the MachineInstr and MCInst as a 5-bit unsigned immediate so we use OPERAND_UIMM5. If someone needs to know for sure its an FLI constant in the future we can break it out to a new type.

This is represented in the MachineInstr and MCInst as a 5-bit
unsigned immediate so we use OPERAND_UIMM5. If someone needs to know
for sure its an FLI constant in the future we can break it out to
a new type.
@llvmbot
Copy link
Member

llvmbot commented Oct 29, 2024

@llvm/pr-subscribers-backend-risc-v

Author: Craig Topper (topperc)

Changes

This is represented in the MachineInstr and MCInst as a 5-bit unsigned immediate so we use OPERAND_UIMM5. If someone needs to know for sure its an FLI constant in the future we can break it out to a new type.


Full diff: https://github.com/llvm/llvm-project/pull/114150.diff

1 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td (+2)
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
index f62a7e1221122b..6e2d55e4df9f35 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZfa.td
@@ -35,6 +35,8 @@ def LoadFPImmOperand : AsmOperandClass {
 def loadfpimm : Operand<XLenVT> {
   let ParserMatchClass = LoadFPImmOperand;
   let PrintMethod = "printFPImmOperand";
+  let OperandType = "OPERAND_UIMM5";
+  let OperandNamespace = "RISCVOp";
 }
 
 def RTZArg : AsmOperandClass {

@topperc topperc merged commit c62130f into llvm:main Oct 30, 2024
10 checks passed
@topperc topperc deleted the pr/fli-imm branch October 30, 2024 02:42
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
This is represented in the MachineInstr and MCInst as a 5-bit unsigned
immediate so we use OPERAND_UIMM5. If someone needs to know for sure its
an FLI constant in the future we can break it out to a new type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants