Skip to content

Commit 7ea5e07

Browse files
committed
Fix inline asm in dscal: mark x, x1 as clobbered. Fixes #2408
The leaq instructions in dscal_kernel_inc_8 modify x and x1 so they must be declared as input/output constraints, otherwise the compiler may assume the corresponding registers are not modified.
1 parent cb6ef49 commit 7ea5e07

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

kernel/x86_64/dscal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ static void dscal_kernel_inc_8(BLASLONG n, FLOAT *alpha, FLOAT *x, BLASLONG inc_
136136
"jnz 1b \n\t"
137137

138138
:
139-
"+r" (n) // 0
139+
"+r" (n), // 0
140+
"+r" (x), // 1
141+
"+r" (x1) // 2
140142
:
141-
"r" (x), // 1
142-
"r" (x1), // 2
143143
"r" (alpha), // 3
144144
"r" (inc_x), // 4
145145
"r" (inc_x3) // 5

0 commit comments

Comments
 (0)