Skip to content

Commit d505ca8

Browse files
committed
ext/mysql/cas_event_mutex: fix stxr register allocation
Apply earlyclobber constraint on stxr status operand to avoid warnings such as: /tmp/ccdYBT4m.s:2175: Warning: unpredictable: identical transfer and status registers --`stxr w0,x1,[x0]' /tmp/ccdYBT4m.s:2716: Warning: unpredictable: identical transfer and status registers --`stxr w0,x1,[x0]' /tmp/ccdYBT4m.s:4556: Warning: unpredictable: identical transfer and status registers --`stxr w3,x3,[x0]'
1 parent b15a0fa commit d505ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysql/cas_event_mutex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void lock_signal(void)
8484
uint32_t exResult;
8585

8686
__asm__ __volatile__ ("stxr %w[exResult], %[lockValue],[%[lockAddr]]"
87-
: [exResult] "=r" (exResult)
87+
: [exResult] "=&r" (exResult)
8888
: [lockAddr] "r" (lock), [lockValue] "r" (MUTEX_STATE_LOCKED)
8989
:"memory");
9090

0 commit comments

Comments
 (0)