From: Aurelien Jarno <aurelien@aurel32.net>
To: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Cc: pbonzini@redhat.com, rth7680@gmail.com, leon.alrae@imgtec.com,
qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH v6 01/10] softmmu: add helper function to pass through retaddr
Date: Thu, 9 Jul 2015 17:28:26 +0200 [thread overview]
Message-ID: <20150709152826.GI11361@aurel32.net> (raw)
In-Reply-To: <20150707133103.11808.63205.stgit@PASHA-ISP.def.inno>
On 2015-07-07 16:31, Pavel Dovgalyuk wrote:
> This patch introduces several helpers to pass return address
> which points to the TB. Correct return address allows correct
> restoring of the guest PC and icount. These functions should be used when
> helpers embedded into TB invoke memory operations.
>
> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
>
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> ---
> include/exec/cpu_ldst_template.h | 59 +++++++++++++++++++++++++----
> include/exec/cpu_ldst_useronly_template.h | 25 ++++++++++++
> softmmu_template.h | 6 ---
> tcg/tcg.h | 23 +++++++++++
> 4 files changed, 99 insertions(+), 14 deletions(-)
>
With this patch some functions becomes unused. Given the softmmu code is
already quite complex, it might be a good idea to remove them. Here is a
patch to do that, you can add it to the series, or squash it into this
one.
From: Aurelien Jarno <aurelien@aurel32.net>
softmmu: remove now unused functions
Now that the cpu_ld/st_* function directly call helper_ret_ld/st, we can
drop the old helper_ld/st functions.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
include/exec/cpu_ldst.h | 19 -------------------
softmmu_template.h | 16 ----------------
2 files changed, 35 deletions(-)
diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h
index 1239c60..91c8ffb 100644
--- a/include/exec/cpu_ldst.h
+++ b/include/exec/cpu_ldst.h
@@ -113,25 +113,6 @@
/* The memory helpers for tcg-generated code need tcg_target_long etc. */
#include "tcg.h"
-uint8_t helper_ldb_mmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-uint16_t helper_ldw_mmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-uint32_t helper_ldl_mmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-uint64_t helper_ldq_mmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-
-void helper_stb_mmu(CPUArchState *env, target_ulong addr,
- uint8_t val, int mmu_idx);
-void helper_stw_mmu(CPUArchState *env, target_ulong addr,
- uint16_t val, int mmu_idx);
-void helper_stl_mmu(CPUArchState *env, target_ulong addr,
- uint32_t val, int mmu_idx);
-void helper_stq_mmu(CPUArchState *env, target_ulong addr,
- uint64_t val, int mmu_idx);
-
-uint8_t helper_ldb_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-uint16_t helper_ldw_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-uint32_t helper_ldl_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
-
#ifdef MMU_MODE0_SUFFIX
#define CPU_MMU_INDEX 0
#define MEMSUFFIX MMU_MODE0_SUFFIX
diff --git a/softmmu_template.h b/softmmu_template.h
index a4c1016..fb216c3 100644
--- a/softmmu_template.h
+++ b/softmmu_template.h
@@ -329,14 +329,6 @@ WORD_TYPE helper_be_ld_name(CPUArchState *env, target_ulong addr,
}
#endif /* DATA_SIZE > 1 */
-DATA_TYPE
-glue(glue(helper_ld, SUFFIX), MMUSUFFIX)(CPUArchState *env, target_ulong addr,
- int mmu_idx)
-{
- TCGMemOpIdx oi = make_memop_idx(SHIFT, mmu_idx);
- return helper_te_ld_name (env, addr, oi, GETRA());
-}
-
#ifndef SOFTMMU_CODE_ACCESS
/* Provide signed versions of the load routines as well. We can of course
@@ -534,14 +526,6 @@ void helper_be_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
}
#endif /* DATA_SIZE > 1 */
-void
-glue(glue(helper_st, SUFFIX), MMUSUFFIX)(CPUArchState *env, target_ulong addr,
- DATA_TYPE val, int mmu_idx)
-{
- TCGMemOpIdx oi = make_memop_idx(SHIFT, mmu_idx);
- helper_te_st_name(env, addr, val, oi, GETRA());
-}
-
#if DATA_SIZE == 1
/* Probe for whether the specified guest write access is permitted.
* If it is not permitted then an exception will be taken in the same
--
2.1.4
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2015-07-09 15:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 13:30 [Qemu-devel] [PATCH v6 00/10] Fix exceptions handling for MIPS, PowerPC, and i386 Pavel Dovgalyuk
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 01/10] softmmu: add helper function to pass through retaddr Pavel Dovgalyuk
2015-07-07 14:28 ` Richard Henderson
2015-07-09 15:28 ` Aurelien Jarno [this message]
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 02/10] cpu-exec: introduce loop exit with restore function Pavel Dovgalyuk
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 03/10] target-mips: improve exception handling Pavel Dovgalyuk
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 04/10] target-i386: introduce new raise_exception functions Pavel Dovgalyuk
2015-07-07 14:28 ` Richard Henderson
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 05/10] target-i386: exception handling for FPU instructions Pavel Dovgalyuk
2015-07-07 14:28 ` Richard Henderson
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 06/10] target-i386: exception handling for div instructions Pavel Dovgalyuk
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 07/10] target-i386: exception handling for memory helpers Pavel Dovgalyuk
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 08/10] target-i386: exception handling for seg_helper functions Pavel Dovgalyuk
2015-07-07 14:44 ` Richard Henderson
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 09/10] target-i386: exception handling for other helper functions Pavel Dovgalyuk
2015-07-07 15:08 ` Richard Henderson
2015-07-08 9:46 ` Pavel Dovgaluk
2015-07-09 6:54 ` Richard Henderson
2015-07-07 13:31 ` [Qemu-devel] [PATCH v6 10/10] target-ppc: exceptions handling in icount mode Pavel Dovgalyuk
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=20150709152826.GI11361@aurel32.net \
--to=aurelien@aurel32.net \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=agraf@suse.de \
--cc=leon.alrae@imgtec.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth7680@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.