Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dce8bf4e authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

x86, fpu: Use the proper asm constraint in use_xsave()



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: default avatarH. 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>
parent c3f8978e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}