OSDN Git Service

tcg: align static_code_gen_buffer to CODE_GEN_ALIGN
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 29 Mar 2010 00:12:51 +0000 (02:12 +0200)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 1 Apr 2010 19:51:59 +0000 (21:51 +0200)
On ia64, the default memory alignement is not enough for a code
alignement. To fix that, force static_code_gen_buffer alignment
to CODE_GEN_ALIGN.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
exec.c

diff --git a/exec.c b/exec.c
index 6fd6613..04e74d2 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -498,7 +498,8 @@ static void tlb_unprotect_code_phys(CPUState *env, ram_addr_t ram_addr,
 #endif
 
 #ifdef USE_STATIC_CODE_GEN_BUFFER
-static uint8_t static_code_gen_buffer[DEFAULT_CODE_GEN_BUFFER_SIZE];
+static uint8_t static_code_gen_buffer[DEFAULT_CODE_GEN_BUFFER_SIZE]
+               __attribute__((aligned (CODE_GEN_ALIGN)));
 #endif
 
 static void code_gen_alloc(unsigned long tb_size)