Skip to content

Commit

Permalink
x86, fpu: Use the proper asm constraint in use_xsave()
Browse files Browse the repository at this point in the history
The proper constraint for a receiving 8-bit variable is "=qm", not
"=g" which equals "=rim"; even though the "i" will never match, bugs
can and do happen due to the difference between "q" and "r".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1273135546-29690-2-git-send-email-avi@redhat.com>
  • Loading branch information
H. Peter Anvin committed May 10, 2010
1 parent c3f8978 commit dce8bf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static inline bool use_xsave(void)
alternative_io("mov $0, %0",
"mov $1, %0",
X86_FEATURE_XSAVE,
"=g"(has_xsave));
"=qm" (has_xsave));

return has_xsave;
}
Expand Down

0 comments on commit dce8bf4

Please sign in to comment.