diff --git a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp index 0f1ad1668d016f922d1d24480fcbb499665a831a..e1a80d7df2c977ed4e8d3cec7b8da7790b548ec0 100644 --- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp +++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp @@ -54,6 +54,16 @@ "std %0, %1\n" : "=&f"(tmp), "=Q"(*(volatile double*)dst) : "Q"(*(volatile double*)src)); +#elif defined(__ARM_ARCH_7A__) + // Note that a ldrexd + clrex combination is only needed for + // correctness on the OS level (context-switches). In this + // case, clrex *may* be beneficial for performance. For now + // don't bother with clrex as this is Zero. + jlong tmp; + asm volatile ("ldrexd %0, [%1]\n" + : "=r"(tmp) + : "r"(src), "m"(src)); + *(jlong *) dst = tmp; #else *(jlong *) dst = *(jlong *) src; #endif