diff --git a/src/arch/arm.rs b/src/arch/arm.rs index 312d063..3431947 100644 --- a/src/arch/arm.rs +++ b/src/arch/arm.rs @@ -3,7 +3,7 @@ use crate::{ arch::{Arch, LiftArch, LiftEnv, RegisterDesc}, flow::{FlowInfo, FlowKind, FlowTarget}, - ir::{Block, FrontendBuilder, IntCC, MemSize, Type, Value, Variable}, + ir::{Block, FrontendBuilder, I32, IntCC, MemSize, Type, Value, Variable}, }; use cranelift_entity::EntityRef; @@ -519,9 +519,9 @@ impl Arm { Operand::RegDerefPreindexOffset(base, off, add, wback) => { let base_reg = Self::map_reg(base); let base_v = cx.read_reg(base_reg); - let off_v = cx.fb.iconst(Type::i32(), off as i64); + let off_v = cx.fb.iconst(I32, off as i64); let addr = if add { - cx.fb.iadd(base_v, off_v, Type::i32()) + cx.fb.iadd(base_v, off_v, I32) } else { cx.fb.isub(base_v, off_v, Type::i32()) }; diff --git a/src/ir/ty.rs b/src/ir/ty.rs index da23a2d..6912fd5 100644 --- a/src/ir/ty.rs +++ b/src/ir/ty.rs @@ -449,3 +449,5 @@ impl fmt::Display for LaneType { } } } + +pub const I32: Type = Type::i32();