From e8cc27df5b6adc7a88de48cac7444cab5822992e Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 3 Jul 2012 22:46:38 +0200 Subject: [PATCH] type_store_instr[] to get an INSTR_STORE_x by type --- gmqcc.h | 1 + ir.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+) 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) /*********************************************************************** -- 2.39.2