Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,32 @@ jobs:
run: cmake --build out --target run-c-api-tests
- name: tests
run: cmake --build out --target run-tests
build-msvc-other-archs:
name: build (windows ${{ matrix.arch }}) (minimal tests)
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: x86
runner: windows-latest
cmake_arch: Win32
- arch: arm64
runner: windows-11-arm
cmake_arch: ARM64
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/checkout@v1
with:
submodules: true
- name: cmake
run: cmake -S . -B out -A ${{ matrix.cmake_arch }} -DWERROR=ON -Werror=dev -DCMAKE_ERROR_DEPRECATED=OFF -DWABT_RUN_TESTS_ARGS=address64
- name: build
run: cmake --build out
- name: tests
run: cmake --build out --target run-tests
emscripten:
name: emscripten
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/prebuilt/wasm2c_source_declarations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ R"w2c_template( if (__builtin_add_overflow(a, b, &ret))
)w2c_template"
R"w2c_template( TRAP(OOB);
)w2c_template"
R"w2c_template(#elif defined(_MSC_VER)
R"w2c_template(#elif defined(_MSC_VER) && defined(_M_X64)
)w2c_template"
R"w2c_template( if (_addcarry_u64(0, a, b, &ret))
)w2c_template"
Expand Down
2 changes: 1 addition & 1 deletion src/template/wasm2c.declarations.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/wasm2c/add.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/wasm2c/check-imports.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/wasm2c/export-names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/wasm2c/hello.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/wasm2c/minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
2 changes: 1 addition & 1 deletion test/wasm2c/tail-calls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static inline uint64_t checked_add_u64(uint64_t a, uint64_t b) {
#if __has_builtin(__builtin_add_overflow)
if (__builtin_add_overflow(a, b, &ret))
TRAP(OOB);
#elif defined(_MSC_VER)
#elif defined(_MSC_VER) && defined(_M_X64)
if (_addcarry_u64(0, a, b, &ret))
TRAP(OOB);
#else
Expand Down
Loading