Skip to contentSkip to conversation

Fix an inline asm constraint

PATCH New Jim Mattson 1 participant 1 message Aug 25, 2017 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix an inline asm constraint

An x86 move from memory to memory is illegal.

---
 lib/x86/desc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/x86/desc.c +1 -1
index a527291..ffa5e44 100644
@@ -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;
 }
 
Signature · 1 line
2.14.1.342.g6490525c54-goog