Received: from eggs.gnu.org ([2001:4830:134:3::10]:52470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSqi4-0007qG-6n for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSqi2-0006Ea-9H for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:28 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:43975) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSqi2-00069c-2G for qemu-devel@nongnu.org; Fri, 30 Nov 2018 16:52:26 -0500 Received: by mail-pg1-x543.google.com with SMTP id v28so3044248pgk.10 for ; Fri, 30 Nov 2018 13:52:25 -0800 (PST) From: Richard Henderson Date: Fri, 30 Nov 2018 13:52:06 -0800 Message-Id: <20181130215221.20554-2-richard.henderson@linaro.org> In-Reply-To: <20181130215221.20554-1-richard.henderson@linaro.org> References: <20181130215221.20554-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v3 01/16] tcg/i386: Always use %ebp for TCG_AREG0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org For x86_64, this can remove a REX prefix resulting in smaller code when manipulating globals of type i32, as we move them between backing store via cpu_env, aka TCG_AREG0. Reviewed-by: Alex Bennée Reviewed-by: Emilio G. Cota Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index 9fdf37f23c..7488c3d869 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -84,6 +84,8 @@ typedef enum { TCG_REG_RBP = TCG_REG_EBP, TCG_REG_RSI = TCG_REG_ESI, TCG_REG_RDI = TCG_REG_EDI, + + TCG_AREG0 = TCG_REG_EBP, } TCGReg; /* used for function call generation */ @@ -194,12 +196,6 @@ extern bool have_avx2; #define TCG_TARGET_extract_i64_valid(ofs, len) \ (((ofs) == 8 && (len) == 8) || ((ofs) + (len)) == 32) -#if TCG_TARGET_REG_BITS == 64 -# define TCG_AREG0 TCG_REG_R14 -#else -# define TCG_AREG0 TCG_REG_EBP -#endif - static inline void flush_icache_range(uintptr_t start, uintptr_t stop) { } -- 2.17.2