提交 8c07de23 编写于 作者: C chrisphi

8201509: Zero: S390 31bit atomic_copy64 inline assembler is wrong

Summary: The inline assembler for the S390 (S390 and not _LP64) has src and dst reversed thereby corrupting data
Reviewed-by: shade
Contributed-by: NMartin Balao <mbalao@redhat.com>
上级 4ebc37e3
......@@ -50,10 +50,10 @@
: "Q"(*(volatile long*)src));
#elif defined(S390) && !defined(_LP64)
double tmp;
asm volatile ("ld %0, 0(%1)\n"
"std %0, 0(%2)\n"
: "=r"(tmp)
: "a"(src), "a"(dst));
asm volatile ("ld %0, %2\n"
"std %0, %1\n"
: "=&f"(tmp), "=Q"(*(volatile double*)dst)
: "Q"(*(volatile double*)src));
#else
*(jlong *) dst = *(jlong *) src;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册