Skip to content

Commit b55c586

Browse files
authored
Fix missing clobber in x86/x86_64 blas_quickdivide inline assembly function (#2017)
* Fix missing clobber in blas_quickdivide assembly
1 parent 056917d commit b55c586

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common_x86.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
187187

188188
y = blas_quick_divide_table[y];
189189

190-
__asm__ __volatile__ ("mull %0" :"=d" (result) :"a"(x), "0" (y));
190+
__asm__ __volatile__ ("mull %0" :"=d" (result), "+a"(x): "0" (y));
191191

192192
return result;
193193
#endif

common_x86_64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
210210

211211
y = blas_quick_divide_table[y];
212212

213-
__asm__ __volatile__ ("mull %0" :"=d" (result) :"a"(x), "0" (y));
213+
__asm__ __volatile__ ("mull %0" :"=d" (result), "+a"(x) : "0" (y));
214214

215215
return result;
216216
}

0 commit comments

Comments
 (0)