diff mbox

[unit-tests,06/16] Specify correct operand length for ltr and str.

Message ID 1293030389-1143-7-git-send-email-gleb@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov Dec. 22, 2010, 3:06 p.m. UTC
None
diff mbox

Patch

diff --git a/lib/x86/processor.h b/lib/x86/processor.h
index c348808..c3ab109 100644
--- a/lib/x86/processor.h
+++ b/lib/x86/processor.h
@@ -193,13 +193,13 @@  static inline u16 sldt(void)
 
 static inline void ltr(unsigned val)
 {
-    asm volatile ("ltr %0" : : "rm"(val));
+    asm volatile ("ltr %w0" : : "rm"(val));
 }
 
 static inline u16 str(void)
 {
     u16 val;
-    asm volatile ("str %0" : "=rm"(val));
+    asm volatile ("str %w0" : "=rm"(val));
     return val;
 }