Add assertion when allocated preserved register is not saved in "fixed" frame prologue

This commit is contained in:
Dmitry Stogov 2023-01-26 12:49:23 +03:00
parent 761c50488e
commit 4fb50d85aa
2 changed files with 2 additions and 0 deletions

View File

@ -4780,6 +4780,7 @@ static void ir_calc_stack_frame_size(ir_ctx *ctx, ir_backend_data *data)
if (!IR_REGSET_IN(data->used_preserved_regs, ival->reg)
&& !IR_REGSET_IN(fixed_regset, ival->reg)
&& IR_REGSET_IN(IR_REGSET_PRESERVED, ival->reg)) {
IR_ASSERT(!ctx->fixed_save_regset && "NIY"); // TODO: Preserved reg and fixed frame conflict ???
IR_REGSET_INCL(data->used_preserved_regs, ival->reg);
additional_size += sizeof(void*);
}

View File

@ -7372,6 +7372,7 @@ static void ir_calc_stack_frame_size(ir_ctx *ctx, ir_backend_data *data)
if (!IR_REGSET_IN(data->used_preserved_regs, ival->reg)
&& !IR_REGSET_IN(fixed_regset, ival->reg)
&& IR_REGSET_IN(IR_REGSET_PRESERVED, ival->reg)) {
IR_ASSERT(!ctx->fixed_save_regset && "NIY"); // TODO: Preserved reg and fixed frame conflict ???
IR_REGSET_INCL(data->used_preserved_regs, ival->reg);
additional_size += sizeof(void*);
}