diff options
author | John Högberg <john@erlang.org> | 2023-04-14 15:59:44 +0200 |
---|---|---|
committer | John Högberg <john@erlang.org> | 2023-04-14 16:07:37 +0200 |
commit | c5b480ab26cd769be0eb3c87b9bb9f9dca3b0bcb (patch) | |
tree | b478d6b020464492cba937f0b9d0062edcab2777 | |
parent | f85036da43d38818ea16fc7f05d675c9513ddc1e (diff) | |
download | erlang-c5b480ab26cd769be0eb3c87b9bb9f9dca3b0bcb.tar.gz |
Update configure scripts
-rwxr-xr-x | erts/configure | 28 | ||||
-rwxr-xr-x | lib/erl_interface/configure | 6 |
2 files changed, 27 insertions, 7 deletions
diff --git a/erts/configure b/erts/configure index a84ffe4342..fbdb6baba8 100755 --- a/erts/configure +++ b/erts/configure @@ -13973,7 +13973,7 @@ int main (void) { - __asm__ __volatile__("isb sy" : : : "memory"); + __asm__ __volatile__("isb sy\n" : : : "memory"); ; return 0; @@ -14007,7 +14007,7 @@ int main (void) { - char data[512]; __asm__ __volatile__("dc cvau, %0" : "r" (data) : : "memory"); + char data[512]; __asm__ __volatile__("dc cvau, %0\n" :: "r" (data) : "memory"); ; return 0; @@ -14041,7 +14041,7 @@ int main (void) { - char data[512]; __asm__ __volatile__("ic ivau, %0" : "r" (data) : : "memory"); + char data[512]; __asm__ __volatile__("ic ivau, %0\n" :: "r" (data) : "memory"); ; return 0; @@ -24313,7 +24313,27 @@ then : JIT_ARCH=x86 ;; arm64) - JIT_ARCH=arm + case "$OPSYS" in + win32|darwin) + # These platforms have dedicated system calls for clearing + # instruction cache, and don't require us to manually issue + # instruction barriers on all threads. + JIT_ARCH=arm + ;; + *) + # We need to use `DC CVAU`, `IC IVAU`, and `ISB SY` to clear + # instruction cache. These have already been tested as part of + # ETHR_CHK_GCC_ATOMIC_OPS([]). + + if test "$ethr_arm_isb_sy_instr_val$ethr_arm_dc_cvau_instr_val$ethr_arm_ic_ivau_instr_val" = "111"; then + JIT_ARCH=arm + else + enable_jit=no + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: JIT disabled due to lack of cache-clearing instructions" >&5 +printf "%s\n" "$as_me: WARNING: JIT disabled due to lack of cache-clearing instructions" >&2;} + fi + ;; + esac ;; *) if test ${enable_jit} = yes; then diff --git a/lib/erl_interface/configure b/lib/erl_interface/configure index acfd569e30..049c3371fc 100755 --- a/lib/erl_interface/configure +++ b/lib/erl_interface/configure @@ -8718,7 +8718,7 @@ int main (void) { - __asm__ __volatile__("isb sy" : : : "memory"); + __asm__ __volatile__("isb sy\n" : : : "memory"); ; return 0; @@ -8752,7 +8752,7 @@ int main (void) { - char data[512]; __asm__ __volatile__("dc cvau, %0" : "r" (data) : : "memory"); + char data[512]; __asm__ __volatile__("dc cvau, %0\n" :: "r" (data) : "memory"); ; return 0; @@ -8786,7 +8786,7 @@ int main (void) { - char data[512]; __asm__ __volatile__("ic ivau, %0" : "r" (data) : : "memory"); + char data[512]; __asm__ __volatile__("ic ivau, %0\n" :: "r" (data) : "memory"); ; return 0; |