[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/21] tcg-i386: Tidy initialization of tcg_target_c
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 02/21] tcg-i386: Tidy initialization of tcg_target_call_clobber_regs. |
Date: |
Tue, 13 Apr 2010 15:26:17 -0700 |
Setting the registers one by one is easier to read, and gets
optimized by the compiler just the same.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/i386/tcg-target.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index f5c24f7..359f81b 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -1365,11 +1365,12 @@ void tcg_target_init(TCGContext *s)
#endif
tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I32], 0, 0xff);
- tcg_regset_set32(tcg_target_call_clobber_regs, 0,
- (1 << TCG_REG_EAX) |
- (1 << TCG_REG_EDX) |
- (1 << TCG_REG_ECX));
-
+
+ tcg_regset_clear(tcg_target_call_clobber_regs);
+ tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_EAX);
+ tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_EDX);
+ tcg_regset_set_reg(tcg_target_call_clobber_regs, TCG_REG_ECX);
+
tcg_regset_clear(s->reserved_regs);
tcg_regset_set_reg(s->reserved_regs, TCG_REG_ESP);
--
1.6.2.5
[Qemu-devel] [PATCH 10/21] tcg-i386: Tidy immediate arithmetic operations., Richard Henderson, 2010/04/14
[Qemu-devel] [PATCH 06/21] tcg-i386: Tidy shift operations., Richard Henderson, 2010/04/14
[Qemu-devel] [PATCH 11/21] tcg-i386: Tidy non-immediate arithmetic operations., Richard Henderson, 2010/04/14
[Qemu-devel] [PATCH 09/21] tcg-i386: Tidy jumps., Richard Henderson, 2010/04/14