From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBtnx-0007aR-R7 for qemu-devel@nongnu.org; Wed, 12 Sep 2012 16:45:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBtnu-0001AF-Pg for qemu-devel@nongnu.org; Wed, 12 Sep 2012 16:45:01 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:35449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBtnu-0001A2-JG for qemu-devel@nongnu.org; Wed, 12 Sep 2012 16:44:58 -0400 From: Stefan Weil Date: Wed, 12 Sep 2012 22:44:36 +0200 Message-Id: <1347482678-9458-3-git-send-email-sw@weilnetz.de> In-Reply-To: <1347482678-9458-1-git-send-email-sw@weilnetz.de> References: <1347482678-9458-1-git-send-email-sw@weilnetz.de> Subject: [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: Blue Swirl Cc: Stefan Weil , Alexander Graf , qemu-devel@nongnu.org, Aurelien Jarno , Richard Henderson 32 bit x86 hosts don't need registers for helper function arguments because they use the default stack based calling convention. Removing the registers allows simpler code for function tcg_target_get_call_iarg_regs_count. Signed-off-by: Stefan Weil --- tcg/i386/tcg-target.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 43b5572..d60bab8 100644 --- 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 }; @@ -117,11 +115,7 @@ static void patch_reloc(uint8_t *code_ptr, int type, /* maximum number of register used for input function arguments */ static inline int tcg_target_get_call_iarg_regs_count(int flags) { - if (TCG_TARGET_REG_BITS == 64) { - return ARRAY_SIZE(tcg_target_call_iarg_regs); - } - - return 0; + return ARRAY_SIZE(tcg_target_call_iarg_regs); } /* parse target specific constraints */ -- 1.7.10