x64: port load to ISLE (#3993)
This change moves the majority of the lowerings for CLIF's `load` instruction over to ISLE. To do so, it also migrates the previous mechanism for creating an `Amode` (`lower_to_amode`) to several ISLE rules (see `to_amode`).
This commit is contained in:
@@ -245,6 +245,14 @@ macro_rules! isle_prelude_methods {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn ty_int_bool_ref_64(&mut self, ty: Type) -> Option<Type> {
|
||||
match ty {
|
||||
I64 | B64 | R64 => Some(ty),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn ty_int_bool_128(&mut self, ty: Type) -> Option<Type> {
|
||||
match ty {
|
||||
@@ -441,6 +449,12 @@ macro_rules! isle_prelude_methods {
|
||||
fn lane_type(&mut self, ty: Type) -> Type {
|
||||
ty.lane_type()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn offset32_to_u32(&mut self, offset: Offset32) -> u32 {
|
||||
let offset: i32 = offset.into();
|
||||
offset as u32
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user