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:
Alexa VanHattum
2023-03-21 15:16:25 -04:00
committed by GitHub
parent 59d46c2fec
commit 13be5618a7
6 changed files with 140 additions and 28 deletions

View File

@@ -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)