Skip to content

Commit

Permalink
Add macOS arm64 support and CI testing (#2406)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 authored Mar 26, 2024
1 parent ff03168 commit 356931a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
steps:
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/checkout@v1
Expand All @@ -43,7 +43,7 @@ jobs:
if: matrix.os == 'ubuntu-latest'
- name: install ninja (osx)
run: brew install ninja
if: matrix.os == 'macos-12'
if: matrix.os == 'macos-12' || matrix.os == 'macos-14'
- name: install ninja (win)
run: choco install ninja
if: matrix.os == 'windows-latest'
Expand Down
4 changes: 4 additions & 0 deletions src/prebuilt/wasm2c_simd_source_declarations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const char* s_simd_source_declarations = R"w2c_template(#if defined(__GNUC__) &&
)w2c_template"
R"w2c_template(#define SIMD_FORCE_READ(var) __asm__("" ::"x"(var));
)w2c_template"
R"w2c_template(#elif defined(__GNUC__) && defined(__aarch64__)
)w2c_template"
R"w2c_template(#define SIMD_FORCE_READ(var) __asm__("" ::"w"(var));
)w2c_template"
R"w2c_template(#else
)w2c_template"
R"w2c_template(#define SIMD_FORCE_READ(var)
Expand Down
2 changes: 2 additions & 0 deletions src/template/wasm2c_simd.declarations.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#if defined(__GNUC__) && defined(__x86_64__)
#define SIMD_FORCE_READ(var) __asm__("" ::"x"(var));
#elif defined(__GNUC__) && defined(__aarch64__)
#define SIMD_FORCE_READ(var) __asm__("" ::"w"(var));
#else
#define SIMD_FORCE_READ(var)
#endif
Expand Down

0 comments on commit 356931a

Please sign in to comment.