[fuzz] Fix issues with single-inst module generator (#4674)

* [fuzz] Fix signature of `i64.extend32_s` single-instruction test

This single-instruction test incorrectly attempted to convert an `i32`
to an `i64`; the correct signature is `i64 -> i64`. See the [WebAssembly
specification](https://webassembly.github.io/spec/core/bikeshed/#a7-index-of-instructions).

* [fuzz] Fix typo in single-instruction function generator

Previously, the `unary!` macro created functions that used two operands
instead of the expected one.
This commit is contained in:
Andrew Brown
2022-08-10 09:47:02 -07:00
committed by GitHub
parent 96a2ba70b4
commit 354daf5b93

View File

@@ -111,7 +111,7 @@ macro_rules! compare {
macro_rules! unary {
($inst:ident, $rust_ty:tt) => {
binary! { $inst, valtype!($rust_ty), valtype!($rust_ty) }
unary! { $inst, valtype!($rust_ty), valtype!($rust_ty) }
};
($inst:ident, $argument_ty:expr, $result_ty:expr) => {
SingleInstModule {
@@ -241,7 +241,7 @@ static INSTRUCTIONS: &[SingleInstModule] = &[
unary!(I32Extend16S, i32),
unary!(I64Extend8S, i64),
unary!(I64Extend16S, i64),
convert!(I64Extend32S, i32 -> i64),
convert!(I64Extend32S, i64 -> i64),
convert!(I32WrapI64, i64 -> i32),
convert!(I64ExtendI32S, i32 -> i64),
convert!(I64ExtendI32U, i32 -> i64),