WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [POWERPC][LIBFS] Fix build breakage in lo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [POWERPC][LIBFS] Fix build breakage in log2 assembly.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 22 Nov 2006 14:50:14 +0000
Delivery-date: Wed, 22 Nov 2006 06:49:56 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 60b60f75a2219c843277311c77f48285495affa7
# Parent  1d7d5d48fcdc2e73ce63e3aa8f6959e3669f9123
[POWERPC][LIBFS] Fix build breakage in log2 assembly.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 tools/libfsimage/ext2fs/fsys_ext2fs.c     |    9 ++++++++-
 tools/libfsimage/reiserfs/fsys_reiserfs.c |    9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff -r 1d7d5d48fcdc -r 60b60f75a221 tools/libfsimage/ext2fs/fsys_ext2fs.c
--- a/tools/libfsimage/ext2fs/fsys_ext2fs.c     Wed Nov 22 10:09:28 2006 +0000
+++ b/tools/libfsimage/ext2fs/fsys_ext2fs.c     Wed Nov 22 10:10:29 2006 +0000
@@ -278,12 +278,19 @@ ffz (unsigned long word)
 
 #elif defined(__powerpc__)
 
+#ifdef __powerpc64__
+#define PPC_CNTLZL "cntlzd"
+#else
+#define PPC_CNTLZL "cntlzw"
+#endif
+#define BITS_PER_LONG (sizeof(long) * 8)
+
 static __inline__ int
 __ilog2(unsigned long x)
 {
   int lz;
 
-  asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r" (x));
+  asm (PPC_CNTLZL " %0,%1" : "=r" (lz) : "r" (x));
   return BITS_PER_LONG - 1 - lz;
 }
 
diff -r 1d7d5d48fcdc -r 60b60f75a221 tools/libfsimage/reiserfs/fsys_reiserfs.c
--- a/tools/libfsimage/reiserfs/fsys_reiserfs.c Wed Nov 22 10:09:28 2006 +0000
+++ b/tools/libfsimage/reiserfs/fsys_reiserfs.c Wed Nov 22 10:10:29 2006 +0000
@@ -403,12 +403,19 @@ grub_log2 (unsigned long word)
 
 #elif defined(__powerpc__)
 
+#ifdef __powerpc64__
+#define PPC_CNTLZL "cntlzd"
+#else
+#define PPC_CNTLZL "cntlzw"
+#endif
+#define BITS_PER_LONG (sizeof(long) * 8)
+
 static __inline__ int
 __ilog2(unsigned long x)
 {
   int lz;
 
-  asm (PPC_CNTLZL "%0,%1" : "=r" (lz) : "r" (x));
+  asm (PPC_CNTLZL " %0,%1" : "=r" (lz) : "r" (x));
   return BITS_PER_LONG - 1 - lz;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [POWERPC][LIBFS] Fix build breakage in log2 assembly., Xen patchbot-unstable <=