diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-11 11:32:04 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-03-18 13:40:17 +0000 |
commit | 31ccca0778db85c159634478b4ec7997f6704860 (patch) | |
tree | 3d33fc3afd9d5ec95541e1bbe074a9cf8da12a0e /chromium/v8/src/wasm/wasm-opcodes.cc | |
parent | 248b70b82a40964d5594eb04feca0fa36716185d (diff) | |
download | qtwebengine-chromium-31ccca0778db85c159634478b4ec7997f6704860.tar.gz |
BASELINE: Update Chromium to 80.0.3987.136
Change-Id: I98e1649aafae85ba3a83e67af00bb27ef301db7b
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'chromium/v8/src/wasm/wasm-opcodes.cc')
-rw-r--r-- | chromium/v8/src/wasm/wasm-opcodes.cc | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/chromium/v8/src/wasm/wasm-opcodes.cc b/chromium/v8/src/wasm/wasm-opcodes.cc index 3bd76ae43b8..97a51973512 100644 --- a/chromium/v8/src/wasm/wasm-opcodes.cc +++ b/chromium/v8/src/wasm/wasm-opcodes.cc @@ -31,6 +31,7 @@ namespace wasm { #define CASE_I16x8_OP(name, str) CASE_OP(I16x8##name, "i16x8." str) #define CASE_I8x16_OP(name, str) CASE_OP(I8x16##name, "i8x16." str) #define CASE_S128_OP(name, str) CASE_OP(S128##name, "s128." str) +#define CASE_S64x2_OP(name, str) CASE_OP(S64x2##name, "s64x2." str) #define CASE_S32x4_OP(name, str) CASE_OP(S32x4##name, "s32x4." str) #define CASE_S16x8_OP(name, str) CASE_OP(S16x8##name, "s16x8." str) #define CASE_S8x16_OP(name, str) CASE_OP(S8x16##name, "s8x16." str) @@ -260,6 +261,7 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) { CASE_F32x4_OP(Le, "le") CASE_F32x4_OP(Gt, "gt") CASE_F32x4_OP(Ge, "ge") + CASE_CONVERT_OP(Convert, F64x2, I64x2, "i64", "convert") CASE_CONVERT_OP(Convert, F32x4, I32x4, "i32", "convert") CASE_CONVERT_OP(Convert, I32x4, F32x4, "f32", "convert") CASE_CONVERT_OP(Convert, I32x4, I16x8Low, "i32", "convert") @@ -321,6 +323,17 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) { CASE_F32x4_OP(Qfma, "qfma") CASE_F32x4_OP(Qfms, "qfms") + CASE_S8x16_OP(LoadSplat, "load_splat") + CASE_S16x8_OP(LoadSplat, "load_splat") + CASE_S32x4_OP(LoadSplat, "load_splat") + CASE_S64x2_OP(LoadSplat, "load_splat") + CASE_I16x8_OP(Load8x8S, "load8x8_s") + CASE_I16x8_OP(Load8x8U, "load8x8_u") + CASE_I32x4_OP(Load16x4S, "load16x4_s") + CASE_I32x4_OP(Load16x4U, "load16x4_u") + CASE_I64x2_OP(Load32x2S, "load32x2_s") + CASE_I64x2_OP(Load32x2U, "load32x2_u") + // Atomic operations. CASE_OP(AtomicNotify, "atomic.notify") CASE_INT_OP(AtomicWait, "atomic.wait") @@ -353,6 +366,7 @@ const char* WasmOpcodes::OpcodeName(WasmOpcode opcode) { #undef CASE_I16x8_OP #undef CASE_I8x16_OP #undef CASE_S128_OP +#undef CASE_S64x2_OP #undef CASE_S32x4_OP #undef CASE_S16x8_OP #undef CASE_S8x16_OP @@ -460,11 +474,11 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& sig) { bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmFeatures& enabled_features) { - if (!enabled_features.mv && sig->return_count() > 1) { + if (!enabled_features.has_mv() && sig->return_count() > 1) { return false; } for (auto type : sig->all()) { - if (!enabled_features.bigint && type == kWasmI64) { + if (!enabled_features.has_bigint() && type == kWasmI64) { return false; } @@ -495,64 +509,49 @@ constexpr const FunctionSig* kCachedSigs[] = { nullptr, FOREACH_SIGNATURE(DECLARE_SIG_ENTRY)}; #undef DECLARE_SIG_ENTRY -// gcc 4.7 - 4.9 has a bug which causes the constexpr attribute to get lost when -// passing functions (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52892). Hence -// encapsulate these constexpr functions in functors. -// TODO(clemensb): Remove this once we require gcc >= 5.0. - -struct GetShortOpcodeSigIndex { - constexpr WasmOpcodeSig operator()(byte opcode) const { +constexpr WasmOpcodeSig GetShortOpcodeSigIndex(byte opcode) { #define CASE(name, opc, sig) opcode == opc ? kSigEnum_##sig: return FOREACH_SIMPLE_OPCODE(CASE) FOREACH_SIMPLE_PROTOTYPE_OPCODE(CASE) kSigEnum_None; #undef CASE - } -}; +} -struct GetAsmJsOpcodeSigIndex { - constexpr WasmOpcodeSig operator()(byte opcode) const { +constexpr WasmOpcodeSig GetAsmJsOpcodeSigIndex(byte opcode) { #define CASE(name, opc, sig) opcode == opc ? kSigEnum_##sig: return FOREACH_ASMJS_COMPAT_OPCODE(CASE) kSigEnum_None; #undef CASE - } -}; +} -struct GetSimdOpcodeSigIndex { - constexpr WasmOpcodeSig operator()(byte opcode) const { +constexpr WasmOpcodeSig GetSimdOpcodeSigIndex(byte opcode) { #define CASE(name, opc, sig) opcode == (opc & 0xFF) ? kSigEnum_##sig: return FOREACH_SIMD_0_OPERAND_OPCODE(CASE) FOREACH_SIMD_MEM_OPCODE(CASE) kSigEnum_None; #undef CASE - } -}; +} -struct GetAtomicOpcodeSigIndex { - constexpr WasmOpcodeSig operator()(byte opcode) const { +constexpr WasmOpcodeSig GetAtomicOpcodeSigIndex(byte opcode) { #define CASE(name, opc, sig) opcode == (opc & 0xFF) ? kSigEnum_##sig: return FOREACH_ATOMIC_OPCODE(CASE) FOREACH_ATOMIC_0_OPERAND_OPCODE(CASE) kSigEnum_None; #undef CASE } -}; -struct GetNumericOpcodeSigIndex { - constexpr WasmOpcodeSig operator()(byte opcode) const { +constexpr WasmOpcodeSig GetNumericOpcodeSigIndex(byte opcode) { #define CASE(name, opc, sig) opcode == (opc & 0xFF) ? kSigEnum_##sig: return FOREACH_NUMERIC_OPCODE(CASE) kSigEnum_None; #undef CASE - } -}; +} constexpr std::array<WasmOpcodeSig, 256> kShortSigTable = - base::make_array<256>(GetShortOpcodeSigIndex{}); + base::make_array<256>(GetShortOpcodeSigIndex); constexpr std::array<WasmOpcodeSig, 256> kSimpleAsmjsExprSigTable = - base::make_array<256>(GetAsmJsOpcodeSigIndex{}); + base::make_array<256>(GetAsmJsOpcodeSigIndex); constexpr std::array<WasmOpcodeSig, 256> kSimdExprSigTable = - base::make_array<256>(GetSimdOpcodeSigIndex{}); + base::make_array<256>(GetSimdOpcodeSigIndex); constexpr std::array<WasmOpcodeSig, 256> kAtomicExprSigTable = - base::make_array<256>(GetAtomicOpcodeSigIndex{}); + base::make_array<256>(GetAtomicOpcodeSigIndex); constexpr std::array<WasmOpcodeSig, 256> kNumericExprSigTable = - base::make_array<256>(GetNumericOpcodeSigIndex{}); + base::make_array<256>(GetNumericOpcodeSigIndex); } // namespace |