summaryrefslogtreecommitdiff
path: root/js/src/wasm/WasmBinaryConstants.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-09-18 16:57:09 +0200
committerMoonchild <moonchild@palemoon.org>2023-09-18 16:57:09 +0200
commit7003ea7dc4e6164fc2451e4255da0cc1a7b4d22f (patch)
tree3a098fa1b2914b1c7cd6eea39fc0fc53ce3b9fa1 /js/src/wasm/WasmBinaryConstants.h
parent8635073418a294520172bf5b05d886b35e4bcdc3 (diff)
downloaduxp-7003ea7dc4e6164fc2451e4255da0cc1a7b4d22f.tar.gz
Issue #2307 - Part 3: Remove SIMD.js support
This gets rid of the SIMD-specific scalar types in JS. This considerably deviates from Mozilla's work because of our divergent path.
Diffstat (limited to 'js/src/wasm/WasmBinaryConstants.h')
-rw-r--r--js/src/wasm/WasmBinaryConstants.h100
1 files changed, 1 insertions, 99 deletions
diff --git a/js/src/wasm/WasmBinaryConstants.h b/js/src/wasm/WasmBinaryConstants.h
index 4a5ec36b3d..f662814c9e 100644
--- a/js/src/wasm/WasmBinaryConstants.h
+++ b/js/src/wasm/WasmBinaryConstants.h
@@ -1,6 +1,7 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* Copyright 2015 Mozilla Foundation
+ * Copyright 2023 Moonchild Productions
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +19,6 @@
#ifndef wasm_binary_h
#define wasm_binary_h
-#include "builtin/SIMD.h"
-
namespace js {
namespace wasm {
@@ -54,15 +53,6 @@ enum class TypeCode
F32 = 0x7d, // SLEB128(-0x03)
F64 = 0x7c, // SLEB128(-0x04)
- // Only emitted internally for asm.js, likely to get collapsed into I128
- I8x16 = 0x7b,
- I16x8 = 0x7a,
- I32x4 = 0x79,
- F32x4 = 0x78,
- B8x16 = 0x77,
- B16x8 = 0x76,
- B32x4 = 0x75,
-
// A function pointer with any signature
AnyFunc = 0x70, // SLEB128(-0x10)
@@ -81,18 +71,6 @@ enum class ValType
I64 = uint8_t(TypeCode::I64),
F32 = uint8_t(TypeCode::F32),
F64 = uint8_t(TypeCode::F64),
-
- // ------------------------------------------------------------------------
- // The rest of these types are currently only emitted internally when
- // compiling asm.js and are rejected by wasm validation.
-
- I8x16 = uint8_t(TypeCode::I8x16),
- I16x8 = uint8_t(TypeCode::I16x8),
- I32x4 = uint8_t(TypeCode::I32x4),
- F32x4 = uint8_t(TypeCode::F32x4),
- B8x16 = uint8_t(TypeCode::B8x16),
- B16x8 = uint8_t(TypeCode::B16x8),
- B32x4 = uint8_t(TypeCode::B32x4)
};
typedef Vector<ValType, 8, SystemAllocPolicy> ValTypeVector;
@@ -354,82 +332,6 @@ enum class Op
I32AtomicsStore,
I32AtomicsBinOp,
- // SIMD
-#define SIMD_OPCODE(TYPE, OP) TYPE##OP,
-#define _(OP) SIMD_OPCODE(I8x16, OP)
- FORALL_INT8X16_ASMJS_OP(_)
- I8x16Constructor,
- I8x16Const,
-#undef _
- // Unsigned I8x16 operations. These are the SIMD.Uint8x16 operations that
- // behave differently from their SIMD.Int8x16 counterparts.
- I8x16extractLaneU,
- I8x16addSaturateU,
- I8x16subSaturateU,
- I8x16shiftRightByScalarU,
- I8x16lessThanU,
- I8x16lessThanOrEqualU,
- I8x16greaterThanU,
- I8x16greaterThanOrEqualU,
-
-#define SIMD_OPCODE(TYPE, OP) TYPE##OP,
-#define _(OP) SIMD_OPCODE(I16x8, OP)
- FORALL_INT16X8_ASMJS_OP(_)
- I16x8Constructor,
- I16x8Const,
-#undef _
- // Unsigned I16x8 operations. These are the SIMD.Uint16x8 operations that
- // behave differently from their SIMD.Int16x8 counterparts.
- I16x8extractLaneU,
- I16x8addSaturateU,
- I16x8subSaturateU,
- I16x8shiftRightByScalarU,
- I16x8lessThanU,
- I16x8lessThanOrEqualU,
- I16x8greaterThanU,
- I16x8greaterThanOrEqualU,
-
-#define SIMD_OPCODE(TYPE, OP) TYPE##OP,
-#define _(OP) SIMD_OPCODE(I32x4, OP)
- FORALL_INT32X4_ASMJS_OP(_)
- I32x4Constructor,
- I32x4Const,
-#undef _
- // Unsigned I32x4 operations. These are the SIMD.Uint32x4 operations that
- // behave differently from their SIMD.Int32x4 counterparts.
- I32x4shiftRightByScalarU,
- I32x4lessThanU,
- I32x4lessThanOrEqualU,
- I32x4greaterThanU,
- I32x4greaterThanOrEqualU,
- I32x4fromFloat32x4U,
-#define _(OP) SIMD_OPCODE(F32x4, OP)
- FORALL_FLOAT32X4_ASMJS_OP(_)
- F32x4Constructor,
- F32x4Const,
-#undef _
-
-#define _(OP) SIMD_OPCODE(B8x16, OP)
- FORALL_BOOL_SIMD_OP(_)
- B8x16Constructor,
- B8x16Const,
-#undef _
-#undef OPCODE
-
-#define _(OP) SIMD_OPCODE(B16x8, OP)
- FORALL_BOOL_SIMD_OP(_)
- B16x8Constructor,
- B16x8Const,
-#undef _
-#undef OPCODE
-
-#define _(OP) SIMD_OPCODE(B32x4, OP)
- FORALL_BOOL_SIMD_OP(_)
- B32x4Constructor,
- B32x4Const,
-#undef _
-#undef OPCODE
-
Limit
};