qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 3/3] target-sparc: is_translating_asi() is TARGET_SPARC64 only
Date: Tue, 24 Jun 2014 00:01:31 +0100	[thread overview]
Message-ID: <1403564491-15624-5-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1403564491-15624-1-git-send-email-peter.maydell@linaro.org>

Move the is_translating_asi() inside the TARGET_SPARC64 ifdef (and remove
the unimplemented 32-bit codepath), as it is only called from TARGET_SPARC64
code. This fixes a clang 3.4 unused-function warning.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-sparc/ldst_helper.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c
index f4be811..e0aee86 100644
--- a/target-sparc/ldst_helper.c
+++ b/target-sparc/ldst_helper.c
@@ -262,11 +262,12 @@ static inline target_ulong address_mask(CPUSPARCState *env1, target_ulong addr)
 }
 #endif
 
+#ifdef TARGET_SPARC64
 /* returns true if access using this ASI is to have address translated by MMU
    otherwise access is to raw physical address */
+/* TODO: check sparc32 bits */
 static inline int is_translating_asi(int asi)
 {
-#ifdef TARGET_SPARC64
     /* Ultrasparc IIi translating asi
        - note this list is defined by cpu implementation
     */
@@ -283,13 +284,8 @@ static inline int is_translating_asi(int asi)
     default:
         return 0;
     }
-#else
-    /* TODO: check sparc32 bits */
-    return 0;
-#endif
 }
 
-#ifdef TARGET_SPARC64
 static inline target_ulong asi_address_mask(CPUSPARCState *env,
                                             int asi, target_ulong addr)
 {
-- 
2.0.0

  parent reply	other threads:[~2014-06-23 23:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 23:01 [Qemu-devel] [PATCH 0/3] target-sparc: fixed unused function warnings Peter Maydell
2014-06-23 23:01 ` Peter Maydell
2014-06-23 23:01 ` [Qemu-devel] [PATCH 1/3] target-sparc: Remove unused gen_op_subi_cc and gen_op_addi_cc Peter Maydell
2014-06-23 23:01 ` [Qemu-devel] [PATCH 2/3] target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only Peter Maydell
2014-06-23 23:01 ` Peter Maydell [this message]
2014-06-24  4:24 ` [Qemu-devel] [PATCH 0/3] target-sparc: fixed unused function warnings Richard Henderson
2014-06-24  8:33   ` Peter Maydell

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=1403564491-15624-5-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=blauwirbel@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --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).