[AArch64] Port atomic rmw to ISLE (#4021)
Also fix and extend the current implementation: - AtomicRMWOp::Clr != AtomicRmwOp::And, as the input needs to be inverted first. - Inputs to the cmp for the RMWLoop case are sign-extended when needed. - Lower Xchg to Swp. - Lower Sub to Add with a negated input. - Added more runtests. Copyright (c) 2022, Arm Limited.
This commit is contained in:
@@ -583,6 +583,13 @@ impl OperandSize {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bits(&self) -> u8 {
|
||||
match self {
|
||||
OperandSize::Size32 => 32,
|
||||
OperandSize::Size64 => 64,
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert from an integer type into the smallest size that fits.
|
||||
pub fn from_ty(ty: Type) -> OperandSize {
|
||||
debug_assert!(!ty.is_vector());
|
||||
|
||||
Reference in New Issue
Block a user