Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuBd1-0008Ee-FL for qemu-devel@nongnu.org; Tue, 23 Mar 2010 17:27:11 -0400 Received: from [140.186.70.92] (port=56067 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuBcz-0008Dr-LR for qemu-devel@nongnu.org; Tue, 23 Mar 2010 17:27:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuBcx-0001eL-I3 for qemu-devel@nongnu.org; Tue, 23 Mar 2010 17:27:09 -0400 Received: from hall.aurel32.net ([88.191.82.174]:37123) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuBcx-0001eG-D2 for qemu-devel@nongnu.org; Tue, 23 Mar 2010 17:27:07 -0400 Date: Tue, 23 Mar 2010 22:27:06 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 2/4] tcg-hppa: Fix 64-bit argument ordering. Message-ID: <20100323212706.GB19086@hall.aurel32.net> References: <027d44173ad08343a293da9d00aad4c215b64449.1268754659.git.rth@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <027d44173ad08343a293da9d00aad4c215b64449.1268754659.git.rth@twiddle.net> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Sat, Feb 20, 2010 at 11:32:23AM -0800, Richard Henderson wrote: > Signed-off-by: Richard Henderson Thanks, applied. > --- > tcg/tcg.c | 12 +++++++++++- > 1 files changed, 11 insertions(+), 1 deletions(-) > > diff --git a/tcg/tcg.c b/tcg/tcg.c > index 1818868..d753149 100644 > --- a/tcg/tcg.c > +++ b/tcg/tcg.c > @@ -596,7 +596,17 @@ void tcg_gen_callN(TCGContext *s, TCGv_ptr func, unsigned int flags, > real_args++; > } > #endif > -#ifdef TCG_TARGET_WORDS_BIGENDIAN > + /* If stack grows up, then we will be placing successive > + arguments at lower addresses, which means we need to > + reverse the order compared to how we would normally > + treat either big or little-endian. For those arguments > + that will wind up in registers, this still works for > + HPPA (the only current STACK_GROWSUP target) since the > + argument registers are *also* allocated in decreasing > + order. If another such target is added, this logic may > + have to get more complicated to differentiate between > + stack arguments and register arguments. */ > +#if defined(TCG_TARGET_WORDS_BIGENDIAN) != defined(TCG_TARGET_STACK_GROWSUP) > *gen_opparam_ptr++ = args[i] + 1; > *gen_opparam_ptr++ = args[i]; > #else > -- > 1.6.6.1 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net