@@ -2564,6 +2564,10 @@ Expression* TranslateToFuzzReader::_makeConcrete(Type type) {
25642564 }
25652565 if (type.isTuple ()) {
25662566 options.add (FeatureSet::Multivalue, &Self::makeTupleMake);
2567+ if (type == Types::getI64Pair ()) {
2568+ options.add (FeatureSet::WideArithmetic, &Self::makeWideIntAddSub);
2569+ options.add (FeatureSet::WideArithmetic, &Self::makeWideIntMul);
2570+ }
25672571 }
25682572 if (type.isRef ()) {
25692573 auto heapType = type.getHeapType ();
@@ -3246,6 +3250,26 @@ Expression* TranslateToFuzzReader::makeTupleMake(Type type) {
32463250 return builder.makeTupleMake (std::move (elements));
32473251}
32483252
3253+ Expression* TranslateToFuzzReader::makeWideIntAddSub (Type type) {
3254+ assert (wasm.features .hasWideArithmetic ());
3255+ assert (type == Types::getI64Pair ());
3256+ auto op = upTo (2 ) == 0 ? AddInt128 : SubInt128;
3257+ auto * leftLow = make (Type::i64 );
3258+ auto * leftHigh = make (Type::i64 );
3259+ auto * rightLow = make (Type::i64 );
3260+ auto * rightHigh = make (Type::i64 );
3261+ return builder.makeWideIntAddSub (op, leftLow, leftHigh, rightLow, rightHigh);
3262+ }
3263+
3264+ Expression* TranslateToFuzzReader::makeWideIntMul (Type type) {
3265+ assert (wasm.features .hasWideArithmetic ());
3266+ assert (type == Types::getI64Pair ());
3267+ auto op = upTo (2 ) == 0 ? MulWideSInt64 : MulWideUInt64;
3268+ auto * left = make (Type::i64 );
3269+ auto * right = make (Type::i64 );
3270+ return builder.makeWideIntMul (op, left, right);
3271+ }
3272+
32493273Expression* TranslateToFuzzReader::makeTupleExtract (Type type) {
32503274 // Tuples can require locals in binary format conversions.
32513275 if (!type.isDefaultable ()) {
0 commit comments