@@ -124,8 +124,7 @@ static const int tcg_target_reg_alloc_order[] = {
TCG_REG_R12,
TCG_REG_R13,
TCG_REG_R14,
- /* XXX many insns can't be used with R0, so we better avoid it for now */
- /* TCG_REG_R0 */
+ TCG_REG_R0,
TCG_REG_R1,
TCG_REG_R2,
TCG_REG_R3,
@@ -1304,6 +1303,10 @@ void tcg_target_init(TCGContext *s)
tcg_regset_set_reg(s->reserved_regs, TCG_REG_R13);
/* another temporary */
tcg_regset_set_reg(s->reserved_regs, TCG_REG_R12);
+ /* XXX many insns can't be used with R0, so we better avoid it for now */
+ tcg_regset_set_reg(s->reserved_regs, TCG_REG_R0);
+ /* The stack pointer. */
+ tcg_regset_set_reg(s->reserved_regs, TCG_REG_R15);
tcg_add_target_add_op_defs(s390_op_defs);
}
Don't merely exclude them from the register allocation order. Signed-off-by: Richard Henderson <rth@twiddle.net> --- tcg/s390/tcg-target.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)