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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/22/2010 05:06 PM, Gleb Natapov wrote:
Signed-off-by: Gleb Natapov<gleb@xxxxxxxxxx>
---
  lib/x86/processor.h |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

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));
  }

Is this really needed?  And isn't this done better by declaring 'u16 val'?


  static inline u16 str(void)
  {
      u16 val;
-    asm volatile ("str %0" : "=rm"(val));
+    asm volatile ("str %w0" : "=rm"(val));
      return val;
  }


This looks completely unneeded, since val is already a u16.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux