Create alias_operand ().

This commit is contained in:
Bill Currie 2012-11-15 15:52:30 +09:00
parent 095210893f
commit c1a5c1a7b2
2 changed files with 11 additions and 0 deletions

View file

@ -85,6 +85,7 @@ typedef struct sblock_s {
struct expr_s;
struct type_s;
operand_t *alias_operand (operand_t *op, etype_t type);
operand_t *temp_operand (struct type_s *type);
sblock_t *new_sblock (void);
statement_t *new_statement (const char *opcode, struct expr_s *expr);

View file

@ -352,6 +352,16 @@ temp_operand (type_t *type)
return op;
}
operand_t *
alias_operand (operand_t *op, etype_t type)
{
operand_t *alias = new_operand (op_alias);
alias->type = type;
alias->size = pr_type_size[type];
alias->o.alias = op;
return alias;
}
static operand_t *
short_operand (short short_val)
{