m68k: Fix assembler constraint to prevent overeager gcc optimisation
Passing the address of a variable as an operand to an asm statement doesn't mark the value of this variable as used, so gcc may optimize its initialisation away. Fix this by using the "m" constraint instead. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: stable@vger.kernel.org
This commit is contained in:

committed by
Geert Uytterhoeven

parent
c808d3d839
commit
2a3535069e
@@ -189,8 +189,8 @@ void flush_thread(void)
|
||||
current->thread.fs = __USER_DS;
|
||||
if (!FPU_IS_EMU)
|
||||
asm volatile (".chip 68k/68881\n\t"
|
||||
"frestore %0@\n\t"
|
||||
".chip 68k" : : "a" (&zero));
|
||||
"frestore %0\n\t"
|
||||
".chip 68k" : : "m" (zero));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user