Skip to content

[RISCV] Add OperandType to loadfpimm. #114150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2024
Merged

[RISCV] Add OperandType to loadfpimm. #114150

merged 1 commit into from
Oct 30, 2024

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.
arrv-sc pushed a commit to arrv-sc/llvm-project that referenced this pull request May 15, 2025
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 a cherry-pick of c62130f)
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