mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-20 18:52:28 +00:00
Give short values special treatment.
As a short value fits directly into a statement, it needs a fake def that holds its value in the def's offset in order for the value to be written to the statement.
This commit is contained in:
parent
c7adde8709
commit
a43946abf3
1 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,11 @@ get_value_def (ex_value_t *value, etype_t type)
|
|||
//FIXME share immediates
|
||||
def_t *def;
|
||||
|
||||
if (type == ev_short) {
|
||||
def = new_def (0, &type_short, 0, st_extern);
|
||||
def->offset = value->v.short_val;
|
||||
return def;
|
||||
}
|
||||
def = new_def (".imm", ev_types[type], pr.near_data, st_static);
|
||||
if (type == ev_string) {
|
||||
EMIT_STRING (def->space, D_STRUCT (string_t, def),
|
||||
|
|
Loading…
Reference in a new issue