Make alias defs and temps more obvious in dumps.

This commit is contained in:
Bill Currie 2012-12-11 12:26:48 +09:00
parent f358364ef2
commit b5a72320bb
2 changed files with 5 additions and 2 deletions

View file

@ -173,6 +173,7 @@ alias_def (def_t *def, type_t *type, int offset)
return alias;
}
ALLOC (16384, def_t, defs, alias);
alias->name = save_string (va ("[%s:%d]", def->name, offset));
alias->return_addr = __builtin_return_address (0);
alias->offset = offset;
alias->offset_reloc = 1;

View file

@ -122,8 +122,10 @@ operand_string (operand_t *op)
case op_label:
return op->o.label->name;
case op_temp:
while (op->o.tempop.alias)
op = op->o.tempop.alias;
if (op->o.tempop.alias)
return va ("<tmp %p:%d:%p:%d>", op, op->o.tempop.users,
op->o.tempop.alias,
op->o.tempop.alias->o.tempop.users);
return va ("<tmp %p:%d>", op, op->o.tempop.users);
}
return ("??");