From 633561a730c4a21bca5c0819026aff76ed99a2ed Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Mon, 13 Aug 2012 15:25:14 +0200 Subject: [PATCH] type_eq_instr[], type_ne_instr[] --- gmqcc.h | 3 +++ ir.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) 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) /*********************************************************************** -- 2.39.2