fuzzgen: Add bitops (#5040)

* cranelift: Implement some bitops for i128 values

* fuzzgen: Add bitops
This commit is contained in:
Afonso Bordado
2022-10-12 13:52:48 +01:00
committed by GitHub
parent bad71cde4a
commit 1d8f982fe5
2 changed files with 106 additions and 4 deletions

View File

@@ -662,19 +662,19 @@ impl Value for DataValue {
}
fn and(self, other: Self) -> ValueResult<Self> {
binary_match!(&(self, other); [B, I8, I16, I32, I64, F32, F64])
binary_match!(&(self, other); [B, I8, I16, I32, I64, I128, F32, F64])
}
fn or(self, other: Self) -> ValueResult<Self> {
binary_match!(|(self, other); [B, I8, I16, I32, I64, F32, F64])
binary_match!(|(self, other); [B, I8, I16, I32, I64, I128, F32, F64])
}
fn xor(self, other: Self) -> ValueResult<Self> {
binary_match!(^(self, other); [I8, I16, I32, I64, F32, F64])
binary_match!(^(self, other); [I8, I16, I32, I64, I128, F32, F64])
}
fn not(self) -> ValueResult<Self> {
unary_match!(!(self); [B, I8, I16, I32, I64, F32, F64])
unary_match!(!(self); [B, I8, I16, I32, I64, I128, F32, F64])
}
fn count_ones(self) -> ValueResult<Self> {