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

[Xen-changelog] Simplify utoa macro, make it identical with x86_64 version.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID bea58b594c4af6b34ce65e6db290884eb5bb463a
# Parent  012e133941fc08c1e7078ee3d49d6b0833e96d34
Simplify utoa macro, make it identical with x86_64 version.

Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 012e133941fc -r bea58b594c4a 
linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Mon Feb 20 16:42:54 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Mon Feb 20 16:49:35 2006
@@ -193,18 +193,14 @@
 /*
  * __xen_guest information
  */
-.macro bigutoa value
-       utoa (\value) >> 12
-       .ascii "000"
-.endm
 .macro utoa value
- .if (\value) >= 16
-       utoa (\value) >> 4
+ .if (\value) < 0 || (\value) >= 0x10
+       utoa (((\value)>>4)&0x0fffffff)
  .endif
- .if (\value) % 16 < 10
-  .byte '0' + (\value) % 16
+ .if ((\value) & 0xf) < 10
+  .byte '0' + ((\value) & 0xf)
  .else
-  .byte 'A' + (\value) % 16 - 10
+  .byte 'A' + ((\value) & 0xf) - 10
  .endif
 .endm
 
@@ -212,7 +208,7 @@
        .ascii  "GUEST_OS=linux,GUEST_VER=2.6"
        .ascii  ",XEN_VER=xen-3.0"
        .ascii  ",VIRT_BASE=0x"
-                bigutoa __PAGE_OFFSET
+               utoa __PAGE_OFFSET
        .ascii  ",HYPERCALL_PAGE=0x"
                utoa ((__PHYSICAL_START+HYPERCALL_PAGE_OFFSET)>>PAGE_SHIFT)
 #ifdef CONFIG_X86_PAE

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


 


Rackspace

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