Skip to content

Commit

Permalink
Remove dead arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyu-zc committed Nov 22, 2023
1 parent 1569565 commit d1a88b3
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/engine/V3Eval.v3
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,10 @@ component V3Eval {
def I64X2_SHL = do_vi_v_x2(_, _, V3Eval.I64_SHL);
def I64X2_SHR_U = do_vi_v_x2(_, _, I64_SHR_U);
def I64X2_SHR_S = do_vi_v_x2(_, _, V128_I64X2_SHR_S);
def I8X16_NARROW_I16X8_S = do_v128_narrow(_, _, 16, i16.view<u64>, I8_CONVERT_I16_SAT_S, u8.view<i8>, i8.min, i8.max);
def I8X16_NARROW_I16X8_U = do_v128_narrow(_, _, 16, i16.view<u64>, I8_CONVERT_I16_SAT_U, u8.view<u8>, u8.min, u8.max);
def I16X8_NARROW_I32X4_S = do_v128_narrow(_, _, 32, i32.view<u64>, I16_CONVERT_I32_SAT_S, u16.view<i16>, i16.min, i16.max);
def I16X8_NARROW_I32X4_U = do_v128_narrow(_, _, 32, i32.view<u64>, I16_CONVERT_I32_SAT_U, u16.view<u16>, u16.min, u16.max);
def I8X16_NARROW_I16X8_S = do_v128_narrow(_, _, 16, i16.view<u64>, I8_CONVERT_I16_SAT_S, u8.view<i8>);
def I8X16_NARROW_I16X8_U = do_v128_narrow(_, _, 16, i16.view<u64>, I8_CONVERT_I16_SAT_U, u8.view<u8>);
def I16X8_NARROW_I32X4_S = do_v128_narrow(_, _, 32, i32.view<u64>, I16_CONVERT_I32_SAT_S, u16.view<i16>);
def I16X8_NARROW_I32X4_U = do_v128_narrow(_, _, 32, i32.view<u64>, I16_CONVERT_I32_SAT_U, u16.view<u16>);
def F64X2_PROMOTE_LOW_F32X4 = do_v_v_x2_low(_, V128_F64_PROMOTE_LOW_F32);
def F32X4_DEMOTE_F64X2_ZERO = do_v_v_x4_high_zero(_, V128_F32_DEMOTE_F64);
def I32X4_TRUNC_SAT_F32X4_S = do_v_v_x4(_, V128_I32_TRUNC_F32_SAT_S);
Expand Down Expand Up @@ -1106,14 +1106,13 @@ convert: u64 -> T, extend: (T) -> Tw, convert_to_u: (Tw) -> Uw, f: (Tw, Tw) -> T
return res;
}
def do_v128_narrow<Tw, Tn, Un>(a: (u64, u64), b:(u64, u64), src_bits: byte,
convert: u64 -> Tw, narrow: (Tw) -> Tn, convert_to_u: (Tn) -> Un, min_Tn: Tn, max_Tn: Tn) -> (u64, u64) {
// Extend low and high lanes separately.
var low = do_v128_narrow0(a, src_bits, convert, narrow, convert_to_u, min_Tn, max_Tn);
var high = do_v128_narrow0(b, src_bits, convert, narrow, convert_to_u, min_Tn, max_Tn);
convert: u64 -> Tw, narrow: (Tw) -> Tn, convert_to_u: (Tn) -> Un) -> (u64, u64) {
var low = do_v128_narrow0(a, src_bits, convert, narrow, convert_to_u);
var high = do_v128_narrow0(b, src_bits, convert, narrow, convert_to_u);
return (low, high);
}
def do_v128_narrow0<Tw, Tn, Un>(src: (u64, u64), src_bits: byte,
convert: u64 -> Tw, narrow: (Tw) -> Tn, convert_to_u: (Tn) -> Un, min_Tn: Tn, max_Tn: Tn) -> u64 {
convert: u64 -> Tw, narrow: (Tw) -> Tn, convert_to_u: (Tn) -> Un) -> u64 {
var src_low = src.0, src_high = src.1;
var low = 0ul, high = 0ul;
var shift = byte.view(src_bits);
Expand Down

0 comments on commit d1a88b3

Please sign in to comment.