]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
adding another storage type: store_return; when generating a CALL, the generator...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 29 Jun 2012 12:37:12 +0000 (14:37 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 29 Jun 2012 12:37:12 +0000 (14:37 +0200)
gmqcc.h
ir.c

diff --git a/gmqcc.h b/gmqcc.h
index 7fe6f13219581083035bfd56b8281d1cb9267053..7671799f4c735a85adfcf6fd81bba34653aeed80 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -774,7 +774,8 @@ _MEM_VEC_FUN_FIND(Tself, Twhat, mem)
 enum store_types {
     store_global,
     store_local,  /* local, assignable for now, should get promoted later */
-    store_value   /* unassignable */
+    store_value,  /* unassignable */
+    store_return  /* unassignable, at OFS_RETURN */
 };
 
 typedef struct {
diff --git a/ir.c b/ir.c
index 3621359e64c73f1d8a39a9f7c2542fd606d569f0..5b94e5b0e089a552166bc1405779441d404215ea 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -2184,6 +2184,8 @@ tailcall:
         if (instr->opcode >= INSTR_CALL0 && instr->opcode <= INSTR_CALL8) {
             /* Trivial call translation:
              * copy all params to OFS_PARM*
+             * if the output's storetype is not store_return,
+             * add append a STORE instruction!
              *
              * NOTES on how to do it better without much trouble:
              * -) The liferanges!