Better solution for the alignment problem
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 19 May 2008 16:32:18 +0000 (16:32 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 19 May 2008 16:32:18 +0000 (16:32 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4498 c046a42c-6fe2-441c-8c8c-71466251a162

tcg/tcg.h

index bca9a2c55ea17703094c13009d90e8a929bb567a..3a78a7faeed721772c5e020634432b940777e0ec 100644 (file)
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -71,7 +71,7 @@ typedef struct TCGRelocation {
 } TCGRelocation; 
 
 typedef struct TCGLabel {
-    long has_value; // long instead of int to enforce alignment
+    int has_value;
     union {
         tcg_target_ulong value;
         TCGRelocation *first_reloc;
@@ -80,8 +80,8 @@ typedef struct TCGLabel {
 
 typedef struct TCGPool {
     struct TCGPool *next;
-    long size; // long instead of int to enforce alignment
-    uint8_t data[0];
+    int size;
+    uint8_t data[0] __attribute__ ((aligned));
 } TCGPool;
 
 #define TCG_POOL_CHUNK_SIZE 32768