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

* Re: [Qemu-devel] [PATCH] simplify storing temporaries in env structure regardless of host/target long size
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Blue Swirl @ 2008-02-12 19:12 UTC (permalink / raw)
  To: qemu-devel

On 2/12/08, Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote:
> 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.

I'd move env->t0/t1/t2 to CPU_COMMON and the T0/T1/T2 logic to
hostregs_helper.h.

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

* Re: [Qemu-devel] [PATCH] simplify storing temporaries in env structure regardless of host/target long size
  2008-02-12 19:12 ` Blue Swirl
@ 2008-02-12 19:25   ` Igor Kovalenko
  0 siblings, 0 replies; 3+ messages in thread
From: Igor Kovalenko @ 2008-02-12 19:25 UTC (permalink / raw)
  To: qemu-devel

On Feb 12, 2008 10:12 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
> On 2/12/08, Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote:
> > 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.
>
> I'd move env->t0/t1/t2 to CPU_COMMON and the T0/T1/T2 logic to
> hostregs_helper.h.
>

I don't think the hostregs_helper.h is supposed to be used for that.
It knows nothing about env.

-- 
Kind regards,
Igor V. Kovalenko

^ 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).