How to determine Immediate Type in MachineOperand class?


Hi,
I would like to get the type of immediate value (integer) from MachineOperand Class. Currently the immediate value is being represented as int64_t.
int64_t ImmVal; // For MO_Immediate.

Is it possible to find out whether the immediate value is int8, 16, 32 etc?

Note: My target has a virtual Instruction set.

Thanks in advance,
-Sanjay
|


Hi,
I would like to get the type of immediate value (integer) from MachineOperand Class. Currently the immediate value is being represented as int64_t.
int64_t ImmVal; // For MO_Immediate.

Is it possible to find out whether the immediate value is int8, 16, 32 etc?

Note: My target has a virtual Instruction set.

Thanks in advance,
-Sanjay
|

  • |

It’s not possible. MachineOperand and TargetOperandInfo do not carry type information.

Evan