]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
type_eq_instr[], type_ne_instr[]
authorWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 13 Aug 2012 13:25:14 +0000 (15:25 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Mon, 13 Aug 2012 13:25:14 +0000 (15:25 +0200)
gmqcc.h
ir.c

diff --git a/gmqcc.h b/gmqcc.h
index 26428b82ac6c104063a0d80b5ae830f9ebbcc0fa..532065d9a668ef01f2f8969787d49ce4b69f9ae1 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -381,6 +381,9 @@ extern uint16_t type_store_instr[TYPE_COUNT];
  * are at a seperate place.
  */
 extern uint16_t type_storep_instr[TYPE_COUNT];
+/* other useful lists */
+extern uint16_t type_eq_instr[TYPE_COUNT];
+extern uint16_t type_ne_instr[TYPE_COUNT];
 
 typedef struct {
     uint32_t offset;      /* Offset in file of where data begins  */
diff --git a/ir.c b/ir.c
index 57f71ae376845ccb2ace458d285d9632f2151981..4d4f152258945ca27da6ec92b4eaa39ee9a66b37 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -74,6 +74,38 @@ uint16_t type_storep_instr[TYPE_COUNT] = {
     INSTR_STOREP_V, /* variant, should never be accessed */
 };
 
+uint16_t type_eq_instr[TYPE_COUNT] = {
+    INSTR_EQ_F, /* should use I when having integer support */
+    INSTR_EQ_S,
+    INSTR_EQ_F,
+    INSTR_EQ_V,
+    INSTR_EQ_E,
+    INSTR_EQ_E, /* FLD has no comparison */
+    INSTR_EQ_FNC,
+    INSTR_EQ_E, /* should use I */
+#if 0
+    INSTR_EQ_I,
+#endif
+
+    INSTR_EQ_V, /* variant, should never be accessed */
+};
+
+uint16_t type_ne_instr[TYPE_COUNT] = {
+    INSTR_NE_F, /* should use I when having integer support */
+    INSTR_NE_S,
+    INSTR_NE_F,
+    INSTR_NE_V,
+    INSTR_NE_E,
+    INSTR_NE_E, /* FLD has no comparison */
+    INSTR_NE_FNC,
+    INSTR_NE_E, /* should use I */
+#if 0
+    INSTR_NE_I,
+#endif
+
+    INSTR_NE_V, /* variant, should never be accessed */
+};
+
 MEM_VEC_FUNCTIONS(ir_value_vector, ir_value*, v)
 
 /***********************************************************************