Skip to content

Commit

Permalink
tcg: Work around clang bug wrt enum ranges
Browse files Browse the repository at this point in the history
A subsequent patch patch will change the type of REG from int
to enum TCGReg, which provokes the following bug in clang:

  https://llvm.org/bugs/show_bug.cgi?id=16154

Signed-off-by: Richard Henderson <rth@twiddle.net>
  • Loading branch information
rth7680 committed Feb 8, 2016
1 parent 7ca4b75 commit c807402
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tcg/tcg.c
Expand Up @@ -2059,9 +2059,9 @@ static void tcg_reg_alloc_op(TCGContext *s,
} else {
if (def->flags & TCG_OPF_CALL_CLOBBER) {
/* XXX: permit generic clobber register list ? */
for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
if (tcg_regset_test_reg(tcg_target_call_clobber_regs, reg)) {
tcg_reg_free(s, reg);
for (i = 0; i < TCG_TARGET_NB_REGS; i++) {
if (tcg_regset_test_reg(tcg_target_call_clobber_regs, i)) {
tcg_reg_free(s, i);
}
}
}
Expand Down Expand Up @@ -2227,9 +2227,9 @@ static void tcg_reg_alloc_call(TCGContext *s, int nb_oargs, int nb_iargs,
}

/* clobber call registers */
for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
if (tcg_regset_test_reg(tcg_target_call_clobber_regs, reg)) {
tcg_reg_free(s, reg);
for (i = 0; i < TCG_TARGET_NB_REGS; i++) {
if (tcg_regset_test_reg(tcg_target_call_clobber_regs, i)) {
tcg_reg_free(s, i);
}
}

Expand Down

0 comments on commit c807402

Please sign in to comment.