]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
generate address of store_return values created with ir_value_out properly
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 11 Aug 2012 15:53:41 +0000 (17:53 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 11 Aug 2012 15:53:41 +0000 (17:53 +0200)
ir.c

diff --git a/ir.c b/ir.c
index f9e9fd25e0f9cb5017adc434deb5d8ae253c8d92..1f3823621c4dca4b1b180bacd909bb80aded0567 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -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;
 }