Remove support for direct Asm.js builds
Targeting Asm.js through wasm2js is still supported
PiperOrigin-RevId: 323078976
diff --git a/src/init.c b/src/init.c
index 77bb8da..4df87cd 100644
--- a/src/init.c
+++ b/src/init.c
@@ -68,7 +68,7 @@
};
static void init(void) {
-#if XNN_ARCH_ASMJS || XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
+#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
// Unlike most other architectures, on x86/x86-64 when floating-point instructions
// have no NaN arguments, but produce NaN output, the output NaN has sign bit set.
// We use it to distinguish x86/x86-64 from other architectures, by doing subtraction
@@ -2076,7 +2076,7 @@
};
#endif // XNN_NO_X32_OPERATORS
-#elif XNN_ARCH_WASM || XNN_ARCH_ASMJS
+#elif XNN_ARCH_WASM
/**************************** QU8 micro-kernels ****************************/
#ifndef XNN_NO_QU8_OPERATORS
init_flags |= XNN_INIT_FLAG_QU8;
diff --git a/src/memory.c b/src/memory.c
index 267c959..b2ec380 100644
--- a/src/memory.c
+++ b/src/memory.c
@@ -32,7 +32,7 @@
}
void* xnn_aligned_allocate(void* context, size_t alignment, size_t size) {
-#if XNN_ARCH_ASMJS || XNN_ARCH_WASM
+#if XNN_ARCH_WASM
assert(alignment <= 2 * sizeof(void*));
return malloc(size);
#elif defined(__ANDROID__)
diff --git a/src/xnnpack/allocator.h b/src/xnnpack/allocator.h
index 3194a11..05ea6d0 100644
--- a/src/xnnpack/allocator.h
+++ b/src/xnnpack/allocator.h
@@ -19,7 +19,7 @@
#include <xnnpack/params.h>
-#if XNN_ARCH_ASMJS || XNN_ARCH_WASM
+#if XNN_ARCH_WASM
#define XNN_ALLOCATION_ALIGNMENT 4
#elif (XNN_ARCH_X86 || XNN_ARCH_X86_64) && !XNN_PLATFORM_MOBILE
#define XNN_ALLOCATION_ALIGNMENT 64
diff --git a/src/xnnpack/common.h b/src/xnnpack/common.h
index 19b2a2f..81db1e8 100644
--- a/src/xnnpack/common.h
+++ b/src/xnnpack/common.h
@@ -45,12 +45,6 @@
#define XNN_ARCH_PPC64 0
#endif
-#if defined(__asmjs__)
- #define XNN_ARCH_ASMJS 1
-#else
- #define XNN_ARCH_ASMJS 0
-#endif
-
#if defined(__wasm__)
#if defined(__wasm_simd128__)
#define XNN_ARCH_WASMSIMD 1