From: Wolfgang Bumiller Date: Tue, 3 Jul 2012 20:46:38 +0000 (+0200) Subject: type_store_instr[] to get an INSTR_STORE_x by type X-Git-Tag: 0.1-rc1~460 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=e8cc27df5b6adc7a88de48cac7444cab5822992e;p=xonotic%2Fgmqcc.git type_store_instr[] to get an INSTR_STORE_x by type --- diff --git a/gmqcc.h b/gmqcc.h index e814bce..6a56675 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -371,6 +371,7 @@ enum { }; extern size_t type_sizeof[TYPE_COUNT]; +extern uint16_t type_store_instr[TYPE_COUNT]; /* * Each paramater incerements by 3 since vector types hold diff --git a/ir.c b/ir.c index 1f0773f..48c4ccf 100644 --- a/ir.c +++ b/ir.c @@ -44,6 +44,21 @@ size_t type_sizeof[TYPE_COUNT] = { 3, /* TYPE_VARIANT */ }; +uint16_t type_store_instr[TYPE_COUNT] = { + INSTR_STORE_F, /* should use I when having integer support */ + INSTR_STORE_S, + INSTR_STORE_F, + INSTR_STORE_V, + INSTR_STORE_ENT, + INSTR_STORE_FLD, + INSTR_STORE_FNC, + INSTR_STORE_ENT, /* should use I */ +#if 0 + INSTR_STORE_ENT, /* integer type */ +#endif + INSTR_STORE_V, /* variant, should never be accessed */ +}; + MEM_VEC_FUNCTIONS(ir_value_vector, ir_value*, v) /***********************************************************************