X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=ir.c;h=458d2cfe4723119f3bef90e9466df41f88835658;hb=66e6e6329fb19d8e67ac9b72d0a62dfb6db0cb24;hp=a2b6dcc140edf6acd11d5894f182253f606d969e;hpb=d09ab90f24204ad8e758108746783aee115708d8;p=xonotic%2Fgmqcc.git diff --git a/ir.c b/ir.c index a2b6dcc..458d2cf 100644 --- a/ir.c +++ b/ir.c @@ -2712,12 +2712,14 @@ tailcall: if (ontrue->generated) { stmt.opcode = INSTR_IF; stmt.o2.s1 = (ontrue->code_start) - vec_size(code_statements); - code_push_statement(&stmt, instr->context.line); + if (stmt.o2.s1 != 1) + code_push_statement(&stmt, instr->context.line); } if (onfalse->generated) { stmt.opcode = INSTR_IFNOT; stmt.o2.s1 = (onfalse->code_start) - vec_size(code_statements); - code_push_statement(&stmt, instr->context.line); + if (stmt.o2.s1 != 1) + code_push_statement(&stmt, instr->context.line); } if (!ontrue->generated) { if (onfalse->generated) { @@ -2741,7 +2743,8 @@ tailcall: ontrue = tmp; } stidx = vec_size(code_statements); - code_push_statement(&stmt, instr->context.line); + if (stmt.o2.s1 != 1) + code_push_statement(&stmt, instr->context.line); /* on false we jump, so add ontrue-path */ if (!gen_blocks_recursive(func, ontrue)) return false; @@ -3155,6 +3158,8 @@ static void gen_vector_defs(prog_section_def def, const char *name) if (!name || OPTS_FLAG(SINGLE_VECTOR_DEFS)) return; + def.type = TYPE_FLOAT; + len = strlen(name); component = (char*)mem_a(len+3); @@ -3181,6 +3186,8 @@ static void gen_vector_fields(prog_section_field fld, const char *name) if (!name || OPTS_FLAG(SINGLE_VECTOR_DEFS)) return; + def.type = TYPE_FLOAT; + len = strlen(name); component = (char*)mem_a(len+3);