declare saved_env_reg as volatile
commit1d9000e8238ffc346b0a08f4c0619c4e5711a7dc
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 23 Feb 2010 18:21:00 +0000 (23 19:21 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 23 Feb 2010 19:23:29 +0000 (23 13:23 -0600)
tree2158b67e6676519bc74ab0d73813972e9e85b725
parent3399e30f562df9f67ccad4d4f4367d31120f996f
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>
cpu-exec.c