The asm insert was using an "r" constraint, but that was only selecting a
compatible register by chance. SIMT will break that, so specify "Sg"
explicitly.
libgomp/ChangeLog:
* config/gcn/time.c (omp_get_wtime): Use "=Sg".
---
libgomp/config/gcn/time.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libgomp/config/gcn/time.c b/libgomp/config/gcn/time.c
index e30fb972428..96731545120 100644
--- a/libgomp/config/gcn/time.c
+++ b/libgomp/config/gcn/time.c
@@ -44,10 +44,10 @@ omp_get_wtime (void)
uint64_t clock;
#ifdef __RDNA3__
asm ("s_sendmsg_rtn_b64 %0 0x83 ;Get REALTIME\n\t"
- "s_waitcnt 0" : "=r" (clock));
+ "s_waitcnt 0" : "=Sg" (clock));
#else
asm ("s_memrealtime %0\n\t"
- "s_waitcnt 0" : "=r" (clock));
+ "s_waitcnt 0" : "=Sg" (clock));
#endif
return clock * RTC_TICKS;
}
--
2.54.0