Is the given instruction a constant value (`iconst`, `fconst`) that can be represented in 64 bits?
(func: &Function, inst: Inst)
| 103 | /// Is the given instruction a constant value (`iconst`, `fconst`) that can be |
| 104 | /// represented in 64 bits? |
| 105 | pub fn is_constant_64bit(func: &Function, inst: Inst) -> Option<u64> { |
| 106 | match &func.dfg.insts[inst] { |
| 107 | &InstructionData::UnaryImm { imm, .. } => Some(imm.bits() as u64), |
| 108 | &InstructionData::UnaryIeee16 { imm, .. } => Some(imm.bits() as u64), |
| 109 | &InstructionData::UnaryIeee32 { imm, .. } => Some(imm.bits() as u64), |
| 110 | &InstructionData::UnaryIeee64 { imm, .. } => Some(imm.bits()), |
| 111 | _ => None, |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | /// Get the address, offset, and access type from the given instruction, if any. |
| 116 | pub fn inst_addr_offset_type(func: &Function, inst: Inst) -> Option<(Value, Offset32, Type)> { |