From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAFZH-0007gN-1V for qemu-devel@nongnu.org; Fri, 16 Aug 2013 04:39:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VAFZB-0004zQ-GK for qemu-devel@nongnu.org; Fri, 16 Aug 2013 04:39:34 -0400 Received: from hall.aurel32.net ([2001:470:1f0b:4a8::1]:34186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VAFVN-0003eu-0x for qemu-devel@nongnu.org; Fri, 16 Aug 2013 04:35:33 -0400 Date: Fri, 16 Aug 2013 10:35:15 +0200 From: Aurelien Jarno Message-ID: <20130816083515.GA4795@ohm.aurel32.net> References: <1375726045-20797-1-git-send-email-rth@twiddle.net> <1375726045-20797-7-git-send-email-rth@twiddle.net> <20130815155446.GA29142@ohm.aurel32.net> <520D3D98.80306@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <520D3D98.80306@twiddle.net> Subject: Re: [Qemu-devel] [PATCH for-next 6/8] tcg-i386: Use new return-argument ld/st helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Thu, Aug 15, 2013 at 01:44:08PM -0700, Richard Henderson wrote: > On 08/15/2013 08:54 AM, Aurelien Jarno wrote: > >> > # define GETRA() ((uintptr_t)__builtin_return_address(0)) > >> > -# define GETPC_LDST() ((uintptr_t)(GETRA() + 7 + \ > >> > - *(int32_t *)((void *)GETRA() + 3) - 1)) > >> > +/* The return address argument for ldst is passed directly. */ > >> > +# define GETPC_LDST() (abort(), 0) > > Why an abort here, while in the arm version, you adds support for > > not defining GETPC_LDST? > > > > GETPC_LDST is for the original helpers, when called from TCG. > > In the arm case, TCG still uses the original helpers, so GETPC_LDST is used. > > In the i386, TCG never uses the original helpers, so GETPC_LDST should never be > used. We could do like arm and completely drop the check, I suppose. Ok, I haven't looked in details at the arm patches (i am currently trying them), and I haven't really seen the difference. Then just ignore this comment. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net