From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, afaerber@suse.de
Subject: [Qemu-devel] [PATCH 04/13] softmmu: start introducing SOFTMMU_CODE_ACCESS in softmmu_header.h
Date: Fri, 23 May 2014 17:20:48 +0200 [thread overview]
Message-ID: <1400858457-20391-5-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1400858457-20391-1-git-send-email-pbonzini@redhat.com>
This preprocessor symbol is already used in softmmu_template.h. We
will use it to distinguish the two "fake" ACCESS_TYPEs
NB_MMU_MODES and NB_MMU_MODES + 1.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/exec/exec-all.h | 2 ++
| 8 +++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 8bc2eb6..88bbe52 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -351,6 +351,7 @@ uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
#define ACCESS_TYPE (NB_MMU_MODES + 1)
#define MEMSUFFIX _code
+#define SOFTMMU_CODE_ACCESS
#define DATA_SIZE 1
#include "exec/softmmu_header.h"
@@ -366,6 +367,7 @@ uint64_t helper_ldq_cmmu(CPUArchState *env, target_ulong addr, int mmu_idx);
#undef ACCESS_TYPE
#undef MEMSUFFIX
+#undef SOFTMMU_CODE_ACCESS
#endif
--git a/include/exec/softmmu_header.h b/include/exec/softmmu_header.h
index d8d9c81..087b2d4 100644
--- a/include/exec/softmmu_header.h
+++ b/include/exec/softmmu_header.h
@@ -72,7 +72,7 @@
#define RES_TYPE uint32_t
#endif
-#if ACCESS_TYPE == (NB_MMU_MODES + 1)
+#ifdef SOFTMMU_CODE_ACCESS
#define ADDR_READ addr_code
#else
#define ADDR_READ addr_read
@@ -124,7 +124,7 @@ glue(glue(cpu_lds, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr)
}
#endif
-#if ACCESS_TYPE != (NB_MMU_MODES + 1)
+#ifndef SOFTMMU_CODE_ACCESS
/* generic store macro */
@@ -148,9 +148,7 @@ glue(glue(cpu_st, SUFFIX), MEMSUFFIX)(CPUArchState *env, target_ulong ptr,
}
}
-#endif /* ACCESS_TYPE != (NB_MMU_MODES + 1) */
-#if ACCESS_TYPE != (NB_MMU_MODES + 1)
#if DATA_SIZE == 8
static inline float64 glue(cpu_ldfq, MEMSUFFIX)(CPUArchState *env,
@@ -200,7 +198,7 @@ static inline void glue(cpu_stfl, MEMSUFFIX)(CPUArchState *env,
}
#endif /* DATA_SIZE == 4 */
-#endif /* ACCESS_TYPE != (NB_MMU_MODES + 1) */
+#endif /* !SOFTMMU_CODE_ACCESS */
#undef RES_TYPE
#undef DATA_TYPE
--
1.7.1
next prev parent 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 ` [Qemu-devel] [PATCH 01/13] cputlb: Fix regression with TCG interpreter (bug 1310324) Paolo Bonzini
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 ` Paolo Bonzini [this message]
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-5-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=peter.maydell@linaro.org \
--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).