From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Richard Henderson <rth@twiddle.net>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
patches@linaro.org
Subject: [Qemu-devel] [PATCH v2 2/3] target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only
Date: Tue, 2 Sep 2014 12:52:43 +0100 [thread overview]
Message-ID: <1409658764-28113-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1409658764-28113-1-git-send-email-peter.maydell@linaro.org>
The address_mask() and asi_address_mask() functions are only used in
TARGET_SPARC64 configs, so guard with ifdefs to avoid warnings about
unused functions in 32-bit builds.
Since the main reason these functions were marked 'inline' was to
suppress unused-function warnings with gcc, we remove the 'inline'
as no longer necessary.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target-sparc/ldst_helper.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index 1a62e19..2d028a5 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -250,7 +250,8 @@ static void replace_tlb_1bit_lru(SparcTLBEntry *tlb,
#endif
-static inline target_ulong address_mask(CPUSPARCState *env1, target_ulong addr)
+#if defined(TARGET_SPARC64) || defined(CONFIG_USER_ONLY)
+static target_ulong address_mask(CPUSPARCState *env1, target_ulong addr)
{
#ifdef TARGET_SPARC64
if (AM_CHECK(env1)) {
@@ -259,6 +260,7 @@ static inline target_ulong address_mask(CPUSPARCState *env1, target_ulong addr)
#endif
return addr;
}
+#endif
/* returns true if access using this ASI is to have address translated by MMU
otherwise access is to raw physical address */
@@ -287,8 +289,9 @@ static inline int is_translating_asi(int asi)
#endif
}
-static inline target_ulong asi_address_mask(CPUSPARCState *env,
- int asi, target_ulong addr)
+#ifdef TARGET_SPARC64
+static target_ulong asi_address_mask(CPUSPARCState *env,
+ int asi, target_ulong addr)
{
if (is_translating_asi(asi)) {
return address_mask(env, addr);
@@ -296,6 +299,7 @@ static inline target_ulong asi_address_mask(CPUSPARCState *env,
return addr;
}
}
+#endif
void helper_check_align(CPUSPARCState *env, target_ulong addr, uint32_t align)
{
--
1.9.1
next prev parent reply other threads:[~2014-09-02 11:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 11:52 [Qemu-devel] [PATCH v2 0/3] target-sparc: fixed unused function warnings Peter Maydell
2014-09-02 11:52 ` [Qemu-devel] [PATCH v2 1/3] target-sparc: Remove unused gen_op_subi_cc and gen_op_addi_cc Peter Maydell
2014-09-02 11:52 ` Peter Maydell [this message]
2014-09-03 8:49 ` [Qemu-devel] [PATCH v2 2/3] target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only Artyom Tarasenko
2014-09-03 15:09 ` Richard Henderson
2014-09-02 11:52 ` [Qemu-devel] [PATCH v2 3/3] target-sparc: is_translating_asi() is " Peter Maydell
2014-09-02 13:17 ` [Qemu-devel] [PATCH v2 0/3] target-sparc: fixed unused function warnings Richard Henderson
2014-09-02 13:35 ` Mark Cave-Ayland
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=1409658764-28113-3-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).