qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Igor Kovalenko" <igor.v.kovalenko@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] simplify storing temporaries in env structure regardless of host/target long size
Date: Tue, 12 Feb 2008 21:52:34 +0300	[thread overview]
Message-ID: <b2fa41d60802121052t457792fkddacd182a0517d85@mail.gmail.com> (raw)

[-- 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)

             reply	other threads:[~2008-02-12 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 18:52 Igor Kovalenko [this message]
2008-02-12 19:12 ` [Qemu-devel] [PATCH] simplify storing temporaries in env structure regardless of host/target long size Blue Swirl
2008-02-12 19:25   ` Igor Kovalenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2fa41d60802121052t457792fkddacd182a0517d85@mail.gmail.com \
    --to=igor.v.kovalenko@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).