Refactor x64::Insts that use an is_64 bool to use OperandSize.
This commit is contained in:
committed by
Andrew Brown
parent
3306408100
commit
7bd96c8e2f
@@ -1347,13 +1347,8 @@ impl OperandSize {
|
||||
}
|
||||
|
||||
// Check that the value of self is one of the allowed sizes.
|
||||
pub(crate) fn is_size(&self, sizes: &[Self]) -> bool {
|
||||
for val in sizes.iter() {
|
||||
if *self == *val {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
pub(crate) fn is_one_of(&self, sizes: &[Self]) -> bool {
|
||||
sizes.iter().any(|val| *self == *val)
|
||||
}
|
||||
|
||||
pub(crate) fn to_bytes(&self) -> u8 {
|
||||
|
||||
Reference in New Issue
Block a user