From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC2KK-0007VK-Rt for qemu-devel@nongnu.org; Thu, 13 Sep 2012 01:51:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TC2KJ-000385-Sh for qemu-devel@nongnu.org; Thu, 13 Sep 2012 01:51:00 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:44396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC2KJ-00037w-M7 for qemu-devel@nongnu.org; Thu, 13 Sep 2012 01:50:59 -0400 Message-ID: <50517441.9060103@weilnetz.de> Date: Thu, 13 Sep 2012 07:50:57 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1347482678-9458-1-git-send-email-sw@weilnetz.de> <1347482678-9458-3-git-send-email-sw@weilnetz.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Blue Swirl , Richard Henderson , Alexander Graf , Aurelien Jarno , qemu-devel@nongnu.org Am 12.09.2012 23:18, schrieb Peter Maydell: > On 12 September 2012 21:44, Stefan Weil wrote: >> --- a/tcg/i386/tcg-target.c >> +++ b/tcg/i386/tcg-target.c >> @@ -75,9 +75,7 @@ static const int tcg_target_call_iarg_regs[] = { >> TCG_REG_R8, >> TCG_REG_R9, >> #else >> - TCG_REG_EAX, >> - TCG_REG_EDX, >> - TCG_REG_ECX >> + /* 32 bit mode uses stack based calling convention (GCC default). */ >> #endif >> }; > This makes the array zero-length for 32 bit targets, but functions > like tcg_out_tlb_load() and tcg_out_qemu_ld() still unconditionally > access elements in it... > > -- PMM Thanks for the hint. I'm afraid there are a lot more functions of that kind in i386/tcg-target.c. I could use conditional compilation for those accesses, but first I'd like to understand why this works at all. - sw