qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] simplify storing temporaries in env structure regardless of host/target long size
@ 2008-02-12 18:52 Igor Kovalenko
  2008-02-12 19:12 ` Blue Swirl
  0 siblings, 1 reply; 3+ messages in thread
From: Igor Kovalenko @ 2008-02-12 18:52 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

This patch separates decision about storing temporaries in env
structure from target long size by introducing a macro
QEMU_TEMPORARY_IN_ENV
Makes it a bit easier to work around register allocation problems.
By default there is no change to generated code.

-- 
Kind regards,
Igor V. Kovalenko

[-- Attachment #2: qemu-temporary-in-env-macro.patch --]
[-- Type: application/octet-stream, Size: 1100 bytes --]

Index: target-i386/cpu.h
===================================================================
RCS file: /cvsroot/qemu/qemu/target-i386/cpu.h,v
retrieving revision 1.57
diff -u -p -r1.57 cpu.h
--- target-i386/cpu.h	3 Feb 2008 02:42:36 -0000	1.57
+++ target-i386/cpu.h	12 Feb 2008 18:43:07 -0000
@@ -467,7 +467,7 @@ typedef union {
 #define NB_MMU_MODES 2
 
 typedef struct CPUX86State {
-#if TARGET_LONG_BITS > HOST_LONG_BITS
+#if defined(QEMU_TEMPORARY_IN_ENV)
     /* temporaries if we cannot store them in host registers */
     target_ulong t0, t1, t2;
 #endif
Index: target-i386/exec.h
===================================================================
RCS file: /cvsroot/qemu/qemu/target-i386/exec.h,v
retrieving revision 1.41
diff -u -p -r1.41 exec.h
--- target-i386/exec.h	1 Feb 2008 10:50:09 -0000	1.41
+++ target-i386/exec.h	12 Feb 2008 18:43:07 -0000
@@ -33,6 +33,10 @@
 register struct CPUX86State *env asm(AREG0);
 
 #if TARGET_LONG_BITS > HOST_LONG_BITS
+#define QEMU_TEMPORARY_IN_ENV
+#endif
+
+#if defined(QEMU_TEMPORARY_IN_ENV)
 
 /* no registers can be used */
 #define T0 (env->t0)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-12 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12 18:52 [Qemu-devel] [PATCH] simplify storing temporaries in env structure regardless of host/target long size Igor Kovalenko
2008-02-12 19:12 ` Blue Swirl
2008-02-12 19:25   ` Igor Kovalenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).