Commit 80bb70a2 authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

[wasm] Remove Sign Extension flag, and helper functions

Change-Id: I607e9565e29b2159c1783cd58fb5a2e19c02b221
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1955524
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65365}
parent ac69dfa7
......@@ -3175,9 +3175,6 @@ class WasmFullDecoder : public WasmDecoder<validate> {
}
void BuildSimplePrototypeOperator(WasmOpcode opcode) {
if (WasmOpcodes::IsSignExtensionOpcode(opcode)) {
RET_ON_PROTOTYPE_OPCODE(se);
}
if (WasmOpcodes::IsAnyRefOpcode(opcode)) {
RET_ON_PROTOTYPE_OPCODE(anyref);
}
......
......@@ -20,8 +20,7 @@
#define FOREACH_WASM_SHIPPED_FEATURE_FLAG(V) \
V(bulk_memory, "bulk memory opcodes", true) \
V(sat_f2i_conversions, "saturating float conversion opcodes", true) \
V(se, "sign extension opcodes", true)
V(sat_f2i_conversions, "saturating float conversion opcodes", true)
#define FOREACH_WASM_FEATURE_FLAG(V) \
FOREACH_WASM_EXPERIMENTAL_FEATURE_FLAG(V) \
......
......@@ -422,19 +422,6 @@ bool WasmOpcodes::IsUnconditionalJump(WasmOpcode opcode) {
}
}
bool WasmOpcodes::IsSignExtensionOpcode(WasmOpcode opcode) {
switch (opcode) {
case kExprI32SExtendI8:
case kExprI32SExtendI16:
case kExprI64SExtendI8:
case kExprI64SExtendI16:
case kExprI64SExtendI32:
return true;
default:
return false;
}
}
bool WasmOpcodes::IsAnyRefOpcode(WasmOpcode opcode) {
switch (opcode) {
case kExprRefNull:
......
......@@ -220,15 +220,14 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures&);
V(I32ReinterpretF32, 0xbc, i_f) \
V(I64ReinterpretF64, 0xbd, l_d) \
V(F32ReinterpretI32, 0xbe, f_i) \
V(F64ReinterpretI64, 0xbf, d_l)
#define FOREACH_SIMPLE_PROTOTYPE_OPCODE(V) \
V(F64ReinterpretI64, 0xbf, d_l) \
V(I32SExtendI8, 0xc0, i_i) \
V(I32SExtendI16, 0xc1, i_i) \
V(I64SExtendI8, 0xc2, l_l) \
V(I64SExtendI16, 0xc3, l_l) \
V(I64SExtendI32, 0xc4, l_l) \
V(RefIsNull, 0xd1, i_r)
V(I64SExtendI32, 0xc4, l_l)
#define FOREACH_SIMPLE_PROTOTYPE_OPCODE(V) V(RefIsNull, 0xd1, i_r)
// For compatibility with Asm.js.
#define FOREACH_ASMJS_COMPAT_OPCODE(V) \
......@@ -669,7 +668,6 @@ class V8_EXPORT_PRIVATE WasmOpcodes {
static FunctionSig* AsmjsSignature(WasmOpcode opcode);
static bool IsPrefixOpcode(WasmOpcode opcode);
static bool IsControlOpcode(WasmOpcode opcode);
static bool IsSignExtensionOpcode(WasmOpcode opcode);
static bool IsAnyRefOpcode(WasmOpcode opcode);
static bool IsThrowingOpcode(WasmOpcode opcode);
// Check whether the given opcode always jumps, i.e. all instructions after
......
......@@ -11,7 +11,6 @@ namespace internal {
namespace wasm {
WASM_EXEC_TEST(I32SExtendI8) {
EXPERIMENTAL_FLAG_SCOPE(se);
WasmRunner<int32_t, int32_t> r(execution_tier);
BUILD(r, WASM_I32_SIGN_EXT_I8(WASM_GET_LOCAL(0)));
CHECK_EQ(0, r.Call(0));
......@@ -22,7 +21,6 @@ WASM_EXEC_TEST(I32SExtendI8) {
}
WASM_EXEC_TEST(I32SExtendI16) {
EXPERIMENTAL_FLAG_SCOPE(se);
WasmRunner<int32_t, int32_t> r(execution_tier);
BUILD(r, WASM_I32_SIGN_EXT_I16(WASM_GET_LOCAL(0)));
CHECK_EQ(0, r.Call(0));
......@@ -33,7 +31,6 @@ WASM_EXEC_TEST(I32SExtendI16) {
}
WASM_EXEC_TEST(I64SExtendI8) {
EXPERIMENTAL_FLAG_SCOPE(se);
WasmRunner<int64_t, int64_t> r(execution_tier);
BUILD(r, WASM_I64_SIGN_EXT_I8(WASM_GET_LOCAL(0)));
CHECK_EQ(0, r.Call(0));
......@@ -44,7 +41,6 @@ WASM_EXEC_TEST(I64SExtendI8) {
}
WASM_EXEC_TEST(I64SExtendI16) {
EXPERIMENTAL_FLAG_SCOPE(se);
WasmRunner<int64_t, int64_t> r(execution_tier);
BUILD(r, WASM_I64_SIGN_EXT_I16(WASM_GET_LOCAL(0)));
CHECK_EQ(0, r.Call(0));
......@@ -55,7 +51,6 @@ WASM_EXEC_TEST(I64SExtendI16) {
}
WASM_EXEC_TEST(I64SExtendI32) {
EXPERIMENTAL_FLAG_SCOPE(se);
WasmRunner<int64_t, int64_t> r(execution_tier);
BUILD(r, WASM_I64_SIGN_EXT_I32(WASM_GET_LOCAL(0)));
CHECK_EQ(0, r.Call(0));
......
......@@ -1347,7 +1347,6 @@ TEST_F(FunctionBodyDecoderTest, MacrosInt64) {
}
TEST_F(FunctionBodyDecoderTest, AllSimpleExpressions) {
WASM_FEATURE_SCOPE(se);
WASM_FEATURE_SCOPE(anyref);
// Test all simple expressions which are described by a signature.
#define DECODE_TEST(name, opcode, sig) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment