]> Git Repo - qemu.git/commitdiff
tcg-i386: Tidy initialization of tcg_target_call_clobber_regs.
authorRichard Henderson <[email protected]>
Tue, 13 Apr 2010 22:26:17 +0000 (15:26 -0700)
committerAurelien Jarno <[email protected]>
Wed, 19 May 2010 06:46:10 +0000 (08:46 +0200)
Setting the registers one by one is easier to read, and gets
optimized by the compiler just the same.

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
tcg/i386/tcg-target.c

index 352e42724187b687531d8e05a47ec1316f3902c4..4e33b25ef8487f99eb1e3ea636fe91984f0ce3fd 100644 (file)
@@ -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);
 
This page took 0.029526 seconds and 4 git commands to generate.