From patchwork Tue Apr 13 22:23:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01/22] tcg-i386: Allocate call-saved registers first. Date: Tue, 13 Apr 2010 12:23:53 -0000 From: Richard Henderson X-Patchwork-Id: 51191 Message-Id: <37339e7292570104fa1a5839a84f0737b8aec3e6.1272479073.git.rth@twiddle.net> To: qemu-devel@nongnu.org Cc: aurelien@aurel32.net Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index e684b33..f5c24f7 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -36,16 +36,21 @@ static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { #endif static const int tcg_target_reg_alloc_order[] = { - TCG_REG_EAX, - TCG_REG_EDX, - TCG_REG_ECX, TCG_REG_EBX, TCG_REG_ESI, TCG_REG_EDI, TCG_REG_EBP, + TCG_REG_ECX, + TCG_REG_EDX, + TCG_REG_EAX, +}; + +static const int tcg_target_call_iarg_regs[3] = { + TCG_REG_EAX, + TCG_REG_EDX, + TCG_REG_ECX }; -static const int tcg_target_call_iarg_regs[3] = { TCG_REG_EAX, TCG_REG_EDX, TCG_REG_ECX }; static const int tcg_target_call_oarg_regs[2] = { TCG_REG_EAX, TCG_REG_EDX }; static uint8_t *tb_ret_addr;