|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-ia64-devel
[Xen-ia64-devel] [PATCH][GFW] fix unalignment ref with gcc 4.x
 
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>
 |  
- [Xen-ia64-devel] [PATCH][GFW] fix unalignment ref with gcc 4.x,
Kouya Shimura <=
 
 
 |  
  
 | 
    | 
  
  
    |   | 
    |