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