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

[Xen-devel] [PATCH] fix assembly to avoid new binutils warning


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Rik van Riel <riel@xxxxxxxxxx>
  • Date: Mon, 12 Sep 2005 15:25:35 -0400 (EDT)
  • Delivery-date: Mon, 12 Sep 2005 19:23:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Newer binutils is a bit stricter and errors out when you try
to use movl on a 16 bit word on x86_64.  Using just a "mov"
compiles fine and should result in the same code.

{standard input}: Assembler messages:
{standard input}:2138: Error: suffix or operands invalid for `mov'
{standard input}:2140: Error: suffix or operands invalid for `mov'
{standard input}:2142: Error: suffix or operands invalid for `mov'
{standard input}:2144: Error: suffix or operands invalid for `mov'

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

--- xen-unstable/xen/arch/x86/domain.c.binutils 2005-09-12 15:08:21.000000000 
-0400
+++ xen-unstable/xen/arch/x86/domain.c  2005-09-12 15:08:30.000000000 -0400
@@ -677,10 +677,10 @@ static void save_segments(struct vcpu *v
     if ( VMX_DOMAIN(v) )
         rdmsrl(MSR_SHADOW_GS_BASE, v->arch.arch_vmx.msr_content.shadow_gs);
 
-    __asm__ __volatile__ ( "movl %%ds,%0" : "=m" (regs->ds) );
-    __asm__ __volatile__ ( "movl %%es,%0" : "=m" (regs->es) );
-    __asm__ __volatile__ ( "movl %%fs,%0" : "=m" (regs->fs) );
-    __asm__ __volatile__ ( "movl %%gs,%0" : "=m" (regs->gs) );
+    __asm__ __volatile__ ( "mov %%ds,%0" : "=m" (regs->ds) );
+    __asm__ __volatile__ ( "mov %%es,%0" : "=m" (regs->es) );
+    __asm__ __volatile__ ( "mov %%fs,%0" : "=m" (regs->fs) );
+    __asm__ __volatile__ ( "mov %%gs,%0" : "=m" (regs->gs) );
 
     if ( regs->ds )
         dirty_segment_mask |= DIRTY_DS;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.