From: Wolfgang (Blub) Bumiller Date: Tue, 18 Dec 2012 10:57:30 +0000 (+0100) Subject: Don't generate 'jump +1' instructions X-Git-Tag: 0.1.9~67 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;ds=sidebyside;h=6b4c89700b019cdaefec44934fffa8d2d10f16c1;p=xonotic%2Fgmqcc.git Don't generate 'jump +1' instructions --- diff --git a/ir.c b/ir.c index 9f6abb2..73f574e 100644 --- a/ir.c +++ b/ir.c @@ -2691,7 +2691,8 @@ tailcall: stmt.o1.s1 = (target->code_start) - vec_size(code_statements); stmt.o2.s1 = 0; stmt.o3.s1 = 0; - code_push_statement(&stmt, instr->context.line); + if (stmt.o1.s1 != 1) + code_push_statement(&stmt, instr->context.line); /* no further instructions can be in this block */ return true; @@ -2765,7 +2766,8 @@ tailcall: stmt.o1.s1 = (onfalse->code_start) - vec_size(code_statements); stmt.o2.s1 = 0; stmt.o3.s1 = 0; - code_push_statement(&stmt, instr->context.line); + if (stmt.o1.s1 != 1) + code_push_statement(&stmt, instr->context.line); return true; } /* if not, generate now */