Skip to content

Commit 2c8006c

Browse files
committed
Merge pull request #1773 from pguyot/w29/jit-aarch64
Just in time compilation with aarch64 target Continuation of: - #1770 - #1833 - #1834 - #1835 - #1840 - #1841 These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 0b58a74 + 49a40a2 commit 2c8006c

30 files changed

+5860
-65
lines changed

.github/workflows/build-and-test-macos.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ jobs:
4747
otp: "28"
4848
cmake_opts_other: "-DAVM_DISABLE_JIT=OFF"
4949

50+
- os: "macos-14"
51+
otp: "28"
52+
cmake_opts_other: "-DAVM_DISABLE_JIT=OFF"
53+
54+
- os: "macos-15"
55+
otp: "28"
56+
cmake_opts_other: "-DAVM_DISABLE_JIT=OFF"
57+
5058
steps:
5159
# Setup
5260
- name: "Checkout repo"

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
5656
if (NOT AVM_DISABLE_JIT)
5757
set(AVM_JIT_TARGET_ARCH ${CMAKE_SYSTEM_PROCESSOR})
5858
endif()
59+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm64|aarch64$")
60+
if (NOT AVM_DISABLE_JIT)
61+
set(AVM_JIT_TARGET_ARCH "aarch64")
62+
endif()
5963
else()
6064
if (NOT AVM_DISABLE_JIT)
6165
message("JIT is not supported on ${CMAKE_SYSTEM_PROCESSOR}")

libs/jit/include/jit.hrl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
-define(JIT_FORMAT_VERSION, 1).
2222

2323
-define(JIT_ARCH_X86_64, 1).
24+
-define(JIT_ARCH_AARCH64, 2).
2425

2526
-define(JIT_VARIANT_PIC, 1).
2627

libs/jit/src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ set(ERLANG_MODULES
2727
jit_precompile
2828
jit_stream_binary
2929
jit_stream_mmap
30+
jit_aarch64
31+
jit_aarch64_asm
3032
jit_x86_64
3133
jit_x86_64_asm
3234
)

0 commit comments

Comments
 (0)