Skip to content

Commit

Permalink
x86: use limited register constraint for setnz
Browse files Browse the repository at this point in the history
Impact: build fix with certain compilers

GCC can decide to use %dil when "r" is used, which is not valid for
setnz.

This bug was brought out by Stephen Rothwell's merging of the
branch tracer into linux-next.

[ Thanks to Uros Bizjak for recommending 'q' over 'Q' ]

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Nov 25, 2008
1 parent 86bbc2c commit 5cf02b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/boot/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static int kbd_pending(void)
{
u8 pending;
asm volatile("int $0x16; setnz %0"
: "=rm" (pending)
: "=qm" (pending)
: "a" (0x0100));
return pending;
}
Expand Down

0 comments on commit 5cf02b7

Please sign in to comment.