aboutsummaryrefslogtreecommitdiff
path: root/tcg/i386
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-04-13 15:26:17 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-05-19 08:46:10 +0200
commit4ab50ccf6124eb2920262445e8ce0b2e95a2c13b (patch)
tree2ba9237ba007e0df874ea894c1e5faee6f6fa3d8 /tcg/i386
parent6648e29608ce17f6109d5696fb01f056238e2628 (diff)
downloadqemu-4ab50ccf6124eb2920262445e8ce0b2e95a2c13b.zip
qemu-4ab50ccf6124eb2920262445e8ce0b2e95a2c13b.tar.gz
qemu-4ab50ccf6124eb2920262445e8ce0b2e95a2c13b.tar.bz2
tcg-i386: Tidy initialization of tcg_target_call_clobber_regs.
Setting the registers one by one is easier to read, and gets optimized by the compiler just the same. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/i386')
-rw-r--r--tcg/i386/tcg-target.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 352e427..4e33b25 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -1360,11 +1360,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);