generate address of store_return values created with ir_value_out properly

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-08-11 17:53:41 +02:00
parent cf04b5ed01
commit 5f2a775d41

2
ir.c
View file

@ -529,6 +529,8 @@ void ir_value_code_setaddr(ir_value *self, int32_t gaddr)
int32_t ir_value_code_addr(const ir_value *self)
{
if (self->store == store_return)
return OFS_RETURN + self->code.addroffset;
return self->code.globaladdr + self->code.addroffset;
}