Skip to content

Commit 350b4bd

Browse files
committed
Mark stack variables as early clobber for technical correctness
In the field 5x52 asm for x86_64, stack variables are provided as outputs. The existing inputs are all forcibly allocated to registers, so cannot coincide, but mark them as early clobber anyway to make this clearer.
1 parent 0c729ba commit 350b4bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/field_5x52_asm_impl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ __asm__ __volatile__(
280280
"addq %%rsi,%%r8\n"
281281
/* r[4] = c */
282282
"movq %%r8,32(%%rdi)\n"
283-
: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3)
283+
: "+S"(a), "=&m"(tmp1), "=&m"(tmp2), "=&m"(tmp3)
284284
: "b"(b), "D"(r)
285285
: "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory"
286286
);
@@ -495,7 +495,7 @@ __asm__ __volatile__(
495495
"addq %%rsi,%%r8\n"
496496
/* r[4] = c */
497497
"movq %%r8,32(%%rdi)\n"
498-
: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3)
498+
: "+S"(a), "=&m"(tmp1), "=&m"(tmp2), "=&m"(tmp3)
499499
: "D"(r)
500500
: "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory"
501501
);

0 commit comments

Comments
 (0)