[Openmp-commits] [PATCH] D120519: [OpenMP][libomp] Fix register constraint for tpause and umwait
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 7 12:56:08 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6564a70415df: [OpenMP][libomp] Fix register constraint for tpause and umwait (authored by jlpeyton).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120519/new/
https://reviews.llvm.org/D120519
Files:
openmp/runtime/src/kmp.h
Index: openmp/runtime/src/kmp.h
===================================================================
--- openmp/runtime/src/kmp.h
+++ openmp/runtime/src/kmp.h
@@ -1334,7 +1334,10 @@
char flag;
__asm__ volatile("#tpause\n.byte 0x66, 0x0F, 0xAE, 0xF1\n"
"setb %0"
- : "=r"(flag)
+ // The "=q" restraint means any register accessible as rl
+ // in 32-bit mode: a, b, c, and d;
+ // in 64-bit mode: any integer register
+ : "=q"(flag)
: "a"(timeLo), "d"(timeHi), "c"(hint)
:);
return flag;
@@ -1361,7 +1364,10 @@
char flag;
__asm__ volatile("#umwait\n.byte 0xF2, 0x0F, 0xAE, 0xF1\n"
"setb %0"
- : "=r"(flag)
+ // The "=q" restraint means any register accessible as rl
+ // in 32-bit mode: a, b, c, and d;
+ // in 64-bit mode: any integer register
+ : "=q"(flag)
: "a"(timeLo), "d"(timeHi), "c"(hint)
:);
return flag;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120519.413604.patch
Type: text/x-patch
Size: 1142 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220307/de8752bd/attachment.bin>
More information about the Openmp-commits
mailing list