qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, qemu-stable@nongnu.org,
	afaerber@suse.de, Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH 01/13] cputlb: Fix regression with TCG interpreter (bug 1310324)
Date: Fri, 23 May 2014 17:20:45 +0200	[thread overview]
Message-ID: <1400858457-20391-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1400858457-20391-1-git-send-email-pbonzini@redhat.com>

From: Stefan Weil <sw@weilnetz.de>

Commit 0f842f8a246f2b5b51a11c13f933bf7a90ae8e96 replaced GETPC_EXT() which
was derived from GETPC() by GETRA_EXT() without fixing cputlb.c. A later
patch replaced GETRA_EXT() by GETRA() in exec/softmmu_template.h which
is included in cputlb.c.

The TCG interpreter failed because the values returned by GETRA() were no
longer explicitly set to 0. The redefinition of GETRA() introduced here
fixes this.

In addition, GETPC_ADJ which is also used in exec/softmmu_template.h is
set to 0. Both changes reduce the compiled code size for cputlb.c by more
than 100 bytes, so the normal TCG without interpreter also profits from
the reduced code size and slightly faster code.

Cc: qemu-stable@nongnu.org
Reported-by: Giovanni Mascellani <gio@debian.org>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 cputlb.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cputlb.c b/cputlb.c
index 7bd3573..214c945 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -331,8 +331,10 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr)
 }
 
 #define MMUSUFFIX _cmmu
-#undef GETPC
-#define GETPC() ((uintptr_t)0)
+#undef GETPC_ADJ
+#define GETPC_ADJ 0
+#undef GETRA
+#define GETRA() ((uintptr_t)0)
 #define SOFTMMU_CODE_ACCESS
 
 #define SHIFT 0
-- 
1.7.1

  reply	other threads:[~2014-05-23 15:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 15:20 [Qemu-devel] [PATCH 00/13] Cleanup load/store functions in headers and C files Paolo Bonzini
2014-05-23 15:20 ` Paolo Bonzini [this message]
2014-05-23 15:20 ` [Qemu-devel] [PATCH 02/13] nseries: clean up coding style Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 03/13] hw: use ld_p/st_p instead of ld_raw/st_raw Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 04/13] softmmu: start introducing SOFTMMU_CODE_ACCESS in softmmu_header.h Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 05/13] softmmu: move MMUSUFFIX under SOFTMMU_CODE_ACCESS Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 06/13] softmmu: move definition of CPU_MMU_INDEX to inclusion site, drop ACCESS_TYPE Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 07/13] softmmu: make do_unaligned_access a method of CPU Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 08/13] softmmu: move ALIGNED_ONLY to cpu.h Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 09/13] softmmu: commonize helper definitions Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 10/13] softmmu: move softmmu_template.h out of include/ Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 11/13] target-arm: move arm_*_code to a separate file Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 12/13] softmmu: introduce cpu_ldst.h Paolo Bonzini
2014-05-23 15:20 ` [Qemu-devel] [PATCH 13/13] softmmu: move all load/store functions to cpu_ldst.h Paolo Bonzini

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=1400858457-20391-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).