diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2010-02-23 19:21:00 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-23 13:23:29 -0600 |
commit | 1d9000e8238ffc346b0a08f4c0619c4e5711a7dc (patch) | |
tree | 2158b67e6676519bc74ab0d73813972e9e85b725 /cpu-exec.c | |
parent | 3399e30f562df9f67ccad4d4f4367d31120f996f (diff) |
declare saved_env_reg as volatile
This ensures that the compiler does not move it away from
the "env = env1;" assignment. Fixes a miscompilation
on gcc 4.4, reported by Jay Foad.
Cc: <jay.foad@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index 184bddea31..5d6dd514ff 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -210,7 +210,7 @@ static void cpu_handle_debug_exception(CPUState *env) int cpu_exec(CPUState *env1) { - host_reg_t saved_env_reg; + volatile host_reg_t saved_env_reg; int ret, interrupt_request; TranslationBlock *tb; uint8_t *tc_ptr; |