cranelift: Added fp and, or, xor, not ops to interpreter. (#4999)

* cranelift: Added fp and, or, xor, not ops to interpreter.

* Formatting.

* Removed archtecture dependent test on float-bitops.
This commit is contained in:
Jun Ryung Ju
2022-10-07 10:24:45 +09:00
committed by GitHub
parent e95ffe4413
commit 39fbff92c3
3 changed files with 130 additions and 5 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])
binary_match!(&(self, other); [B, I8, I16, I32, I64, F32, F64])
}
fn or(self, other: Self) -> ValueResult<Self> {
binary_match!(|(&self, &other); [B, I8, I16, I32, I64])
binary_match!(|(self, other); [B, I8, I16, I32, I64, F32, F64])
}
fn xor(self, other: Self) -> ValueResult<Self> {
binary_match!(^(&self, &other); [I8, I16, I32, I64])
binary_match!(^(self, other); [I8, I16, I32, I64, F32, F64])
}
fn not(self) -> ValueResult<Self> {
unary_match!(!(&self); [B, I8, I16, I32, I64])
unary_match!(!(self); [B, I8, I16, I32, I64, F32, F64])
}
fn count_ones(self) -> ValueResult<Self> {