提交 93fc4c9d 编写于 作者: S sgehwolf

8211387: [Zero] atomic_copy64: Use ldrexd for atomic reads on ARMv7

Reviewed-by: dholmes, aph
Contributed-by: NAndrew Haley <aph@redhat.com>
上级 6e5e9832
...@@ -54,6 +54,16 @@ ...@@ -54,6 +54,16 @@
"std %0, %1\n" "std %0, %1\n"
: "=&f"(tmp), "=Q"(*(volatile double*)dst) : "=&f"(tmp), "=Q"(*(volatile double*)dst)
: "Q"(*(volatile double*)src)); : "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 #else
*(jlong *) dst = *(jlong *) src; *(jlong *) dst = *(jlong *) src;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册