qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4485] Fix TCG alignment problems on Sparc64 host
@ 2008-05-18  7:49 Blue Swirl
  2008-05-18 18:18 ` Fabrice Bellard
  0 siblings, 1 reply; 2+ messages in thread
From: Blue Swirl @ 2008-05-18  7:49 UTC (permalink / raw)
  To: qemu-devel

Revision: 4485
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4485
Author:   blueswir1
Date:     2008-05-18 07:49:05 +0000 (Sun, 18 May 2008)

Log Message:
-----------
Fix TCG alignment problems on Sparc64 host

Modified Paths:
--------------
    trunk/tcg/tcg.h

Modified: trunk/tcg/tcg.h
===================================================================
--- trunk/tcg/tcg.h	2008-05-18 06:40:16 UTC (rev 4484)
+++ trunk/tcg/tcg.h	2008-05-18 07:49:05 UTC (rev 4485)
@@ -71,7 +71,7 @@
 } TCGRelocation; 
 
 typedef struct TCGLabel {
-    int has_value;
+    long has_value; // long instead of int to enforce alignment
     union {
         tcg_target_ulong value;
         TCGRelocation *first_reloc;
@@ -80,7 +80,7 @@
 
 typedef struct TCGPool {
     struct TCGPool *next;
-    int size;
+    long size; // long instead of int to enforce alignment
     uint8_t data[0];
 } TCGPool;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [4485] Fix TCG alignment problems on Sparc64 host
  2008-05-18  7:49 [Qemu-devel] [4485] Fix TCG alignment problems on Sparc64 host Blue Swirl
@ 2008-05-18 18:18 ` Fabrice Bellard
  0 siblings, 0 replies; 2+ messages in thread
From: Fabrice Bellard @ 2008-05-18 18:18 UTC (permalink / raw)
  To: blauwirbel; +Cc: qemu-devel

I don't understand why TCGLabel needs further alignment. For TCGPool,
the correct fix is either to use the gcc alignment attributes or to
change the type of data to long.

Regards,

Fabrice.

Blue Swirl wrote:
> Revision: 4485
>           http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4485
> Author:   blueswir1
> Date:     2008-05-18 07:49:05 +0000 (Sun, 18 May 2008)
> 
> Log Message:
> -----------
> Fix TCG alignment problems on Sparc64 host
> 
> Modified Paths:
> --------------
>     trunk/tcg/tcg.h
> 
> Modified: trunk/tcg/tcg.h
> ===================================================================
> --- trunk/tcg/tcg.h	2008-05-18 06:40:16 UTC (rev 4484)
> +++ trunk/tcg/tcg.h	2008-05-18 07:49:05 UTC (rev 4485)
> @@ -71,7 +71,7 @@
>  } TCGRelocation; 
>  
>  typedef struct TCGLabel {
> -    int has_value;
> +    long has_value; // long instead of int to enforce alignment
>      union {
>          tcg_target_ulong value;
>          TCGRelocation *first_reloc;
> @@ -80,7 +80,7 @@
>  
>  typedef struct TCGPool {
>      struct TCGPool *next;
> -    int size;
> +    long size; // long instead of int to enforce alignment
>      uint8_t data[0];
>  } TCGPool;
>  
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-18 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-18  7:49 [Qemu-devel] [4485] Fix TCG alignment problems on Sparc64 host Blue Swirl
2008-05-18 18:18 ` Fabrice Bellard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).