mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
type_store_instr[] to get an INSTR_STORE_x by type
This commit is contained in:
parent
97f34d9add
commit
e8cc27df5b
2 changed files with 16 additions and 0 deletions
1
gmqcc.h
1
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
|
||||
|
|
15
ir.c
15
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)
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in a new issue