X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=ir.c;h=84455d56a2d48dc0b72bdd31e44e9a699521dfc7;hp=088d70ecee4ca8e20fd4a27492a8d0c4221b444e;hb=c62d88cb578c71568c120df7177ff87db349c7ac;hpb=aebab8b68a52d4beec4fa802c91c45a1648f4ed4 diff --git a/ir.c b/ir.c index 088d70e..84455d5 100644 --- a/ir.c +++ b/ir.c @@ -3151,14 +3151,14 @@ static bool gen_function_varargs_copy(ir_function *self) stmt.o3.s1 = 0; maxparams = numparams + self->max_varargs; for (i = numparams; i < maxparams; ++i) { - if (i <= 8) { + if (i < 8) { stmt.o1.u1 = OFS_PARM0 + 3*i; stmt.o2.u1 = ir_value_code_addr(self->locals[i]); code_push_statement(&stmt, self->context.line); continue; } - ext = i - 9; - if (ext >= vec_size(ir->extparams)) + ext = i - 8; + while (ext >= vec_size(ir->extparams)) ir_gen_extparam(ir); ep = ir->extparams[ext]; @@ -3292,6 +3292,8 @@ static void gen_vector_defs(prog_section_def def, const char *name) def.offset++; component[len-1]++; } + + mem_d(component); } static void gen_vector_fields(prog_section_field fld, const char *name) @@ -3320,6 +3322,8 @@ static void gen_vector_fields(prog_section_field fld, const char *name) fld.offset++; component[len-1]++; } + + mem_d(component); } static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool islocal) @@ -3329,8 +3333,6 @@ static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool isloc prog_section_def def; bool pushdef = opts.optimizeoff; - printf("STATUS: %s\n", (pushdef) ? "OFF" : "ON"); - def.type = global->vtype; def.offset = vec_size(code_globals); def.name = 0;