]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
type_storep_instr: in theory we could use type_store_instr + INSTR_STOREP_F - INSTR_S...
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index 035079f704ef62926f1111a166d39077d8b29723..0ba02deaa9d6740095ffccfdd71422cb5d25c2c5 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -77,7 +77,7 @@
  * This is a hack to silent clang regarding empty
  * body if statements.
  */
-#define GMQCC_SUPRESS_EMPTY_BODY do { } while (0)
+#define GMQCC_SUPPRESS_EMPTY_BODY do { } while (0)
 
 /*
  * Inline is not supported in < C90, however some compilers
@@ -371,6 +371,13 @@ enum {
 };
 
 extern size_t type_sizeof[TYPE_COUNT];
+extern uint16_t type_store_instr[TYPE_COUNT];
+/* could use type_store_instr + INSTR_STOREP_F - INSTR_STORE_F
+ * but this breaks when TYPE_INTEGER is added, since with the enhanced
+ * instruction set, the old ones are left untouched, thus the _I instructions
+ * are at a seperate place.
+ */
+extern uint16_t type_storep_instr[TYPE_COUNT];
 
 /*
  * Each paramater incerements by 3 since vector types hold
@@ -586,7 +593,7 @@ static const struct {
     { "EQ_V"      , 0, 4 },
     { "EQ_S"      , 0, 4 },
     { "EQ_E"      , 0, 4 },
-    { "ES_FNC"    , 0, 6 },
+    { "EQ_FNC"    , 0, 6 },
     { "NE_F"      , 0, 4 },
     { "NE_V"      , 0, 4 },
     { "NE_S"      , 0, 4 },
@@ -774,7 +781,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 {