Skip to content

Commit 39407c3

Browse files
sipajonasnick
authored andcommitted
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 56a5d41 commit 39407c3

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
@@ -278,7 +278,7 @@ __asm__ __volatile__(
278278
"addq %%rsi,%%r8\n"
279279
/* r[4] = c */
280280
"movq %%r8,32(%%rdi)\n"
281-
: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3)
281+
: "+S"(a), "=&m"(tmp1), "=&m"(tmp2), "=&m"(tmp3)
282282
: "b"(b), "D"(r)
283283
: "%rax", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory"
284284
);
@@ -493,7 +493,7 @@ __asm__ __volatile__(
493493
"addq %%rsi,%%r8\n"
494494
/* r[4] = c */
495495
"movq %%r8,32(%%rdi)\n"
496-
: "+S"(a), "=m"(tmp1), "=m"(tmp2), "=m"(tmp3)
496+
: "+S"(a), "=&m"(tmp1), "=&m"(tmp2), "=&m"(tmp3)
497497
: "D"(r)
498498
: "%rax", "%rbx", "%rcx", "%rdx", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "cc", "memory"
499499
);

0 commit comments

Comments
 (0)