Cranelift: ISLE: aarch64: fix imm12_from_negated_value for i32, i16 (#6078)
* Fix the semantics of imm12_from_negated_value, swapping to a partial term + rule * wrapping_neg
This commit is contained in:
@@ -38,6 +38,11 @@ macro_rules! isle_common_prelude_methods {
|
||||
x as u64
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn i64_neg(&mut self, x: i64) -> i64 {
|
||||
x.wrapping_neg()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn u64_add(&mut self, x: u64, y: u64) -> u64 {
|
||||
x.wrapping_add(y)
|
||||
|
||||
Reference in New Issue
Block a user