tcg: mark local temps as MEM in dead_temp()
PATCH 1/1 tcg: mark local temps as MEM in dead_temp()
In dead_temp, local temps should always be marked as back to memory, even if they have not been allocated (i.e. they are discared before cross a basic block).
It fixes the following assertion in target-xtensa:
qemu-system-xtensa: tcg/tcg.c:1665: temp_save: Assertion `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed.
AbortedReported-by Max Filippov <[email protected]>
Signed-off-by Aurelien Jarno <[email protected]>
--- tcg/tcg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tcg/tcg.c +1 -1
@@ -1615,7 +1615,7 @@ static inline void temp_dead(TCGContext *s, int temp)if (ts->val_type ==TEMP_VAL_REG ) { s->reg_to_temp[ts->reg] =-1 ; } -if (temp < s->nb_globals || (ts->temp_local && ts->mem_allocated)) { +if (temp < s->nb_globals || ts->temp_local) { ts->val_type =TEMP_VAL_MEM ; }else { ts->val_type =TEMP_VAL_DEAD ;
Signature · 1 line
1.7.10.4
Quoted 11 lines · Aurelien Jarno
In
dead_temp, local temps should always be marked as back to memory, even if they have not been allocated (i.e. they are discared before cross a basic block).It fixes the following assertion in target-xtensa:
qemu-system-xtensa: tcg/tcg.c:1665: temp_save: Assertion `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed. AbortedReported-by Max Filippov <[email protected]>Signed-off-by Aurelien Jarno <[email protected]>
Tested-by Max Filippov <[email protected]>
Signature · 2 lines
Thanks. -- Max
Quoted 7 lines · Max Filippov
Quoted 6 lines · Aurelien Jarno
In
dead_temp, local temps should always be marked as back to memory, even if they have not been allocated (i.e. they are discared before cross a basic block).It fixes the following assertion in target-xtensa:
Quoted 8 lines
Quoted 5 lines
qemu-system-xtensa: tcg/tcg.c:1665: temp_save: Assertion `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed. AbortedReported-by Max Filippov <[email protected]>Signed-off-by Aurelien Jarno <[email protected]>Tested-by Max Filippov <[email protected]>
Thanks for the test, I have applied the patch.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net