~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to tcg/tcg.c

  • Committer: blueswir1
  • Date: 2008-03-11 21:01:02 UTC
  • Revision ID: git-v1:0954d0d9e242b4bc122eeaefb8825cc8f8eb3ab5
 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

Show diffs side-by-side

added added

removed removed

Lines of Context:
1212
1212
    tcg_regset_andnot(reg_ct, reg1, reg2);
1213
1213
 
1214
1214
    /* first try free registers */
1215
 
    for(i = 0; i < TCG_TARGET_NB_REGS; i++) {
 
1215
    for(i = 0; i < ARRAY_SIZE(tcg_target_reg_alloc_order); i++) {
1216
1216
        reg = tcg_target_reg_alloc_order[i];
1217
1217
        if (tcg_regset_test_reg(reg_ct, reg) && s->reg_to_temp[reg] == -1)
1218
1218
            return reg;
1219
1219
    }
1220
1220
 
1221
1221
    /* XXX: do better spill choice */
1222
 
    for(i = 0; i < TCG_TARGET_NB_REGS; i++) {
 
1222
    for(i = 0; i < ARRAY_SIZE(tcg_target_reg_alloc_order); i++) {
1223
1223
        reg = tcg_target_reg_alloc_order[i];
1224
1224
        if (tcg_regset_test_reg(reg_ct, reg)) {
1225
1225
            tcg_reg_free(s, reg);