From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4P8-0008BB-4N for qemu-devel@nongnu.org; Thu, 15 Aug 2013 16:44:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA4Oz-0005gb-JD for qemu-devel@nongnu.org; Thu, 15 Aug 2013 16:44:22 -0400 Received: from mail-vb0-x233.google.com ([2607:f8b0:400c:c02::233]:39357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4Oz-0005gG-Ex for qemu-devel@nongnu.org; Thu, 15 Aug 2013 16:44:13 -0400 Received: by mail-vb0-f51.google.com with SMTP id x16so1037857vbf.10 for ; Thu, 15 Aug 2013 13:44:12 -0700 (PDT) Sender: Richard Henderson Message-ID: <520D3D98.80306@twiddle.net> Date: Thu, 15 Aug 2013 13:44:08 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1375726045-20797-1-git-send-email-rth@twiddle.net> <1375726045-20797-7-git-send-email-rth@twiddle.net> <20130815155446.GA29142@ohm.aurel32.net> In-Reply-To: <20130815155446.GA29142@ohm.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: Aurelien Jarno Cc: qemu-devel@nongnu.org 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. r~