Commit c28b95d9 authored by Glauber Costa's avatar Glauber Costa Committed by Ingo Molnar

x86: change asm constraint.

Our integration efforts broke a build with this function being used
with i386. Reason is "g" can put the operand in an imm32, which according
to The Book (tm), is invalid as the second operand.

This is actually a bug
in x86_64 too, since the x86_64 instruction set reference does not list
it as valid.

We probably didn't trigger this before due to the ammount of
registers available for 64-bit platforms. But that's just my guess.
Signed-off-by: default avatarGlauber Costa <gcosta@redhat.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 53938a68
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" \ asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" \
: "=&r" (flag), "=r" (roksum) \ : "=&r" (flag), "=r" (roksum) \
: "1" (addr), "g" ((long)(size)), \ : "1" (addr), "g" ((long)(size)), \
"g" (current_thread_info()->addr_limit.seg)); \ "rm" (current_thread_info()->addr_limit.seg)); \
flag; \ flag; \
}) })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment