diff mbox

[kvm-unit-tests] Fix an inline asm constraint

Message ID 20170825211226.85246-1-jmattson@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jim Mattson Aug. 25, 2017, 9:12 p.m. UTC
An x86 move from memory to memory is illegal.

Signed-off-by: Jim Mattson <jmattson@google.com>
---
 lib/x86/desc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/lib/x86/desc.c b/lib/x86/desc.c
index a527291..ffa5e44 100644
--- a/lib/x86/desc.c
+++ b/lib/x86/desc.c
@@ -250,7 +250,7 @@  unsigned exception_error_code(void)
 {
     unsigned short error_code;
 
-    asm("mov %%gs:6, %0" : "=rm"(error_code));
+    asm("mov %%gs:6, %0" : "=r"(error_code));
     return error_code;
 }