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-ia64-devel

[Xen-ia64-devel] [PATCH][GFW] fix unalignment ref with gcc 4.x

To: tgingold@xxxxxxx
Subject: [Xen-ia64-devel] [PATCH][GFW] fix unalignment ref with gcc 4.x
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Mon, 15 Oct 2007 17:59:59 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 15 Oct 2007 02:00:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Tristan,

The attached patch fix unalignment reference with gcc 4.x.
I tested the binary built with gcc 4.1.1 works fine.

Thanks,
Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r 8ecccd88813c edk2-sparse/EdkXenPkg/Cpu/Itanium/Timer/Dxe/Timer.c
--- a/edk2-sparse/EdkXenPkg/Cpu/Itanium/Timer/Dxe/Timer.c       Thu Oct 11 
02:09:46 2007 +0200
+++ b/edk2-sparse/EdkXenPkg/Cpu/Itanium/Timer/Dxe/Timer.c       Mon Oct 15 
15:50:46 2007 +0900
@@ -421,15 +421,15 @@ VOID
 VOID
 check_regs (VOID)
 {
-       long save[SAVESZ / 8];
-       long rand[RANDSZ / 8];
+       long save[SAVESZ / 8] __attribute__ ((aligned (16)));
+       long rand[RANDSZ / 8] __attribute__ ((aligned (16)));
        long *r;
        int     i;
 
        for (i = 0; i < RANDSZ; i++)
          ((unsigned char*)rand)[i] = i ^ 0x59;
 
-       if (r = regcheck(save, rand)) {
+       if ((r = regcheck(save, rand))) {
          int reg = r - rand;
          asm volatile ("rsm psr.ic;; mov r2=%0; break 4" : : "r"(reg));
 #if 0
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>