cpu: Move tcg_exit_req to the end of CPUState
authorRichard Henderson <rth@twiddle.net>
Fri, 14 Mar 2014 22:30:10 +0000 (15:30 -0700)
committerAndreas Färber <afaerber@suse.de>
Wed, 19 Mar 2014 21:11:19 +0000 (22:11 +0100)
Reverse an increase in the size of generated code.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
include/qom/cpu.h

index 06ee2636c3c9bf0d1b26b6d0947053b7dcba1f16..f99885a1371a4e7a9ea2ca054e79144f7558d35a 100644 (file)
@@ -227,7 +227,6 @@ struct CPUState {
     bool stop;
     bool stopped;
     volatile sig_atomic_t exit_request;
-    volatile sig_atomic_t tcg_exit_req;
     uint32_t interrupt_request;
     int singlestep_enabled;
     int64_t icount_extra;
@@ -272,6 +271,12 @@ struct CPUState {
     } icount_decr;
     uint32_t can_do_io;
     int32_t exception_index; /* used by m68k TCG */
+
+    /* Note that this is accessed at the start of every TB via a negative
+       offset from AREG0.  Leave this field at the end so as to make the
+       (absolute value) offset as small as possible.  This reduces code
+       size, especially for hosts without large memory offsets.  */
+    volatile sig_atomic_t tcg_exit_req;
 };
 
 QTAILQ_HEAD(CPUTailQ, CPUState);