mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-25 17:26:56 +00:00
tcg: Work around clang bug wrt enum ranges
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 Backports commit c8074023204e8e8a213399961ab56e2814aa6116 from qemu
This commit is contained in:
parent
7cb5f2fed8
commit
cf59e51811
|
@ -2107,9 +2107,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(s->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(s->tcg_target_call_clobber_regs, i)) {
|
||||
tcg_reg_free(s, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2280,9 +2280,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(s->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(s->tcg_target_call_clobber_regs, i)) {
|
||||
tcg_reg_free(s, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue