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.
    Aborted
Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
			
			
This commit is contained in:
		
							parent
							
								
									211da99290
								
							
						
					
					
						commit
						e5138db510
					
				@ -1615,7 +1615,7 @@ static inline void temp_dead(TCGContext *s, int temp)
 | 
				
			|||||||
        if (ts->val_type == TEMP_VAL_REG) {
 | 
					        if (ts->val_type == TEMP_VAL_REG) {
 | 
				
			||||||
            s->reg_to_temp[ts->reg] = -1;
 | 
					            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;
 | 
					            ts->val_type = TEMP_VAL_MEM;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            ts->val_type = TEMP_VAL_DEAD;
 | 
					            ts->val_type = TEMP_VAL_DEAD;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user