Skip to content

Commit 6ed4cc9

Browse files
authored
Add WebAssembly/Emscripten as a dedicated architecute and target
1 parent 319343a commit 6ed4cc9

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

getarch.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,20 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12321232
#else
12331233
#endif
12341234

1235+
#ifdef FORCE_WASM128_GENERIC
1236+
#define FORCE
1237+
#define ARCHITECTURE "WASM"
1238+
#define SUBARCHITECTURE "WASM128_GENERIC"
1239+
#define SUBDIRNAME "wasm"
1240+
#define ARCHCONFIG "-DWASM128_GENERIC " \
1241+
"-DL1_DATA_SIZE=32768 -DL1_DATA_LINESIZE=32 " \
1242+
"-DL2_SIZE=1048576 -DL2_LINESIZE=32 " \
1243+
"-DDTB_DEFAULT_ENTRIES=128 -DDTB_SIZE=4096 -DL2_ASSOCIATIVE=4 "
1244+
#define LIBNAME "wasm128"
1245+
#define CORENAME "WASM128_GENERIC"
1246+
#else
1247+
#endif
1248+
12351249
#ifdef FORCE_CORTEXA15
12361250
#define FORCE
12371251
#define ARCHITECTURE "ARM"
@@ -1949,6 +1963,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19491963
#define OPENBLAS_SUPPORTED
19501964
#endif
19511965

1966+
#ifdef __wasm__
1967+
#define OPENBLAS_SUPPORTED
1968+
#endif
1969+
19521970
#ifndef OPENBLAS_SUPPORTED
19531971
#error "This arch/CPU is not supported by OpenBLAS."
19541972
#endif

0 commit comments

Comments
 (0)