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>
This commit is contained in:
parent
3399e30f56
commit
1d9000e823
@ -210,7 +210,7 @@ static void cpu_handle_debug_exception(CPUState *env)
|
|||||||
|
|
||||||
int cpu_exec(CPUState *env1)
|
int cpu_exec(CPUState *env1)
|
||||||
{
|
{
|
||||||
host_reg_t saved_env_reg;
|
volatile host_reg_t saved_env_reg;
|
||||||
int ret, interrupt_request;
|
int ret, interrupt_request;
|
||||||
TranslationBlock *tb;
|
TranslationBlock *tb;
|
||||||
uint8_t *tc_ptr;
|
uint8_t *tc_ptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user