message: test: Add regression test for i32.shr_s garbage high part stack value
diff: @@ -774,6 +774,21 @@ TEST(execute_numeric, i32_shr_s)
  EXPECT_RESULT(execute_binary_operation(Instr::i32_shr_s, 0x7fffffff, 63), int32_t(0));
  }
  +TEST(execute_numeric, i32_shr_s_stack_value)
  +{
  + /* wat2wasm
  + (func (result i64)
  + i32.const -1
  + i32.const 0
  + i32.shr_s ;; Must put 0xffffffff on the stack.
  + i64.extend_u/i32
  + )
  + */
  + const auto wasm = from_hex("0061736d010000000105016000017e030201000a0a010800417f410075ad0b");
  +
  + EXPECT_RESULT(execute(parse(wasm), 0, {}), 0xffffffff);
  +}
  +
  TEST(execute_numeric, i32_shr_u)
  {
  EXPECT_RESULT(execute_binary_operation(Instr::i32_shr_u, 84, 1), 42);
  