mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
tcg: Consolidate 3 bits into enum TCGTempKind
The temp_fixed, temp_global, temp_local bits are all related. Combine them into a single enumeration. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
4e18617555
commit
ee17db83d2
3 changed files with 92 additions and 62 deletions
|
@ -116,21 +116,21 @@ static TCGTemp *find_better_copy(TCGContext *s, TCGTemp *ts)
|
|||
TCGTemp *i;
|
||||
|
||||
/* If this is already a global, we can't do better. */
|
||||
if (ts->temp_global) {
|
||||
if (ts->kind >= TEMP_GLOBAL) {
|
||||
return ts;
|
||||
}
|
||||
|
||||
/* Search for a global first. */
|
||||
for (i = ts_info(ts)->next_copy; i != ts; i = ts_info(i)->next_copy) {
|
||||
if (i->temp_global) {
|
||||
if (i->kind >= TEMP_GLOBAL) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/* If it is a temp, search for a temp local. */
|
||||
if (!ts->temp_local) {
|
||||
if (ts->kind == TEMP_NORMAL) {
|
||||
for (i = ts_info(ts)->next_copy; i != ts; i = ts_info(i)->next_copy) {
|
||||
if (ts->temp_local) {
|
||||
if (i->kind >= TEMP_LOCAL) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue