Fix OperandSize: need clamp-to-32-bit behavior in most cases, but true-width for shifts.

This commit is contained in:
Chris Fallin
2021-12-16 12:32:28 -08:00
parent 1323ae417e
commit fd171ca063
5 changed files with 178 additions and 162 deletions

View File

@@ -56,7 +56,16 @@ where
isle_prelude_methods!();
#[inline]
fn operand_size_of_type(&mut self, ty: Type) -> OperandSize {
fn operand_size_of_type_32_64(&mut self, ty: Type) -> OperandSize {
if ty.bits() == 64 {
OperandSize::Size64
} else {
OperandSize::Size32
}
}
#[inline]
fn raw_operand_size_of_type(&mut self, ty: Type) -> OperandSize {
OperandSize::from_ty(ty)
}