File tree Expand file tree Collapse file tree 3 files changed +58
-5
lines changed Expand file tree Collapse file tree 3 files changed +58
-5
lines changed Original file line number Diff line number Diff line change @@ -816,14 +816,15 @@ set(s390x_SOURCES
816816 ${GENERIC_TF_SOURCES}
817817)
818818
819- set (wasm32_SOURCES
820- ${GENERIC_TF_SOURCES}
821- ${GENERIC_SOURCES}
822- )
823- set (wasm64_SOURCES
819+
820+ set (wasm_SOURCES
821+ wasm/__c_longjmp.S
822+ wasm/__cpp_exceptions.S
824823 ${GENERIC_TF_SOURCES}
825824 ${GENERIC_SOURCES}
826825)
826+ set (wasm32_SOURCES ${wasm_SOURCES} )
827+ set (wasm64_SOURCES ${wasm_SOURCES} )
827828
828829set (ve_SOURCES
829830 ve/grow_stack.S
Original file line number Diff line number Diff line change 1+ //===-- __c_longjmp.S - Implement __c_longjmp -----------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ //===----------------------------------------------------------------------===//
8+ //
9+ // This file implements __c_longjmp which LLVM uses to implenmet setjmp/longjmp
10+ // when Wasm EH is enabled.
11+ //
12+ //===----------------------------------------------------------------------===//
13+
14+ #ifdef __wasm_exception_handling__
15+
16+ #ifdef __wasm64__
17+ #define PTR i64
18+ #else
19+ #define PTR i32
20+ #endif
21+
22+ .globl __c_longjmp
23+ .tagtype __c_longjmp PTR
24+ __c_longjmp:
25+
26+ #endif // !__wasm_exception_handling__
Original file line number Diff line number Diff line change 1+ //===-- __cpp_exception.S - Implement __cpp_exception ---------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ //===----------------------------------------------------------------------===//
8+ //
9+ // This file implements __cpp_exception which LLVM uses to implement exception
10+ // handling when Wasm EH is enabled.
11+ //
12+ //===----------------------------------------------------------------------===//
13+
14+ #ifdef __wasm_exception_handling__
15+
16+ #ifdef __wasm64__
17+ #define PTR i64
18+ #else
19+ #define PTR i32
20+ #endif
21+
22+ .globl __cpp_exception
23+ .tagtype __cpp_exception PTR
24+ __cpp_exception:
25+
26+ #endif // !__wasm_exception_handling__
You can’t perform that action at this time.
0 commit comments