From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP6Gd-0001Pl-8F for qemu-devel@nongnu.org; Wed, 03 Sep 2014 04:50:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP6GX-0007aa-L9 for qemu-devel@nongnu.org; Wed, 03 Sep 2014 04:50:15 -0400 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:40868) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP6GX-0007Zo-98 for qemu-devel@nongnu.org; Wed, 03 Sep 2014 04:50:09 -0400 Received: by mail-lb0-f177.google.com with SMTP id z11so9041999lbi.22 for ; Wed, 03 Sep 2014 01:50:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1409658764-28113-3-git-send-email-peter.maydell@linaro.org> References: <1409658764-28113-1-git-send-email-peter.maydell@linaro.org> <1409658764-28113-3-git-send-email-peter.maydell@linaro.org> From: Artyom Tarasenko Date: Wed, 3 Sep 2014 10:49:47 +0200 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2 2/3] target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: patches@linaro.org, Mark Cave-Ayland , qemu-devel , Richard Henderson On Tue, Sep 2, 2014 at 1:52 PM, Peter Maydell wrote: > 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. I thought address_mask was inline because it's in the hot path. Wouldn't the removal hit performance? Artyom > Signed-off-by: Peter Maydell > --- > 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 > > -- Regards, Artyom Tarasenko linux/sparc and solaris/sparc under qemu blog: http://tyom.blogspot.com/search/label/qemu