diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-11 21:01:02 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-11 21:01:02 +0000 |
commit | 0954d0d9e242b4bc122eeaefb8825cc8f8eb3ab5 (patch) | |
tree | d4b52e90807872daee359220a7f1518a9eca4cbc /tcg/tcg.c | |
parent | db4a4ea4eee11c41aae835012ddd9559a055f4ce (diff) |
Remove blank elements in tcg_target_reg_alloc_order[] (Stuart Brady)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4039 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r-- | tcg/tcg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1212,14 +1212,14 @@ static int tcg_reg_alloc(TCGContext *s, TCGRegSet reg1, TCGRegSet reg2) tcg_regset_andnot(reg_ct, reg1, reg2); /* first try free registers */ - for(i = 0; i < TCG_TARGET_NB_REGS; i++) { + for(i = 0; i < ARRAY_SIZE(tcg_target_reg_alloc_order); i++) { reg = tcg_target_reg_alloc_order[i]; if (tcg_regset_test_reg(reg_ct, reg) && s->reg_to_temp[reg] == -1) return reg; } /* XXX: do better spill choice */ - for(i = 0; i < TCG_TARGET_NB_REGS; i++) { + for(i = 0; i < ARRAY_SIZE(tcg_target_reg_alloc_order); i++) { reg = tcg_target_reg_alloc_order[i]; if (tcg_regset_test_reg(reg_ct, reg)) { tcg_reg_free(s, reg); |