Skip to content
Commit dff38e3e authored by Andi Kleen's avatar Andi Kleen Committed by H. Peter Anvin
Browse files

x86: Use inline assembler instead of global register variable to get sp



LTO in gcc 4.6/47. has trouble with global register variables. They were used
to read the stack pointer. Use a simple inline assembler statement with
a mov instead.

This also helps LLVM/clang, which does not support global register
variables.

[ hpa: Ideally this should become a builtin in both gcc and clang. ]

v2: More general asm constraint. Fix description (Jan Beulich)

Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1382458079-24450-6-git-send-email-andi@firstfloor.org


Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent a2e7f0e3
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