From: Wolfgang (Blub) Bumiller Date: Mon, 13 Aug 2012 13:25:14 +0000 (+0200) Subject: type_eq_instr[], type_ne_instr[] X-Git-Tag: 0.1-rc1~331^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=633561a730c4a21bca5c0819026aff76ed99a2ed;p=xonotic%2Fgmqcc.git type_eq_instr[], type_ne_instr[] --- diff --git a/gmqcc.h b/gmqcc.h index 26428b8..532065d 100644 --- 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 57f71ae..4d4f152 100644 --- 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) /***********************************************************************