From: Rudolf Polzer Date: Mon, 26 Aug 2013 09:08:36 +0000 (+0200) Subject: tests, and a bugfix X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6de66b6b355578a19b7676180132f56610836fb0;p=xonotic%2Fgmqcc.git tests, and a bugfix --- diff --git a/ir.c b/ir.c index f73e5c0..6aef760 100644 --- a/ir.c +++ b/ir.c @@ -2812,7 +2812,7 @@ static bool gen_blocks_recursive(code_t *code, ir_function *func, ir_block *bloc code_push_statement(code, &stmt, instr->context.line); /* instruction generated */ - return true; + continue; } if (instr->opcode == VINSTR_BITOR_VV) { @@ -2831,7 +2831,7 @@ static bool gen_blocks_recursive(code_t *code, ir_function *func, ir_block *bloc code_push_statement(code, &stmt, instr->context.line); /* instruction generated */ - return true; + continue; } if (instr->opcode == VINSTR_BITAND_VF) { @@ -2848,7 +2848,7 @@ static bool gen_blocks_recursive(code_t *code, ir_function *func, ir_block *bloc code_push_statement(code, &stmt, instr->context.line); /* instruction generated */ - return true; + continue; } if (instr->opcode == VINSTR_BITOR_VF) { @@ -2865,7 +2865,7 @@ static bool gen_blocks_recursive(code_t *code, ir_function *func, ir_block *bloc code_push_statement(code, &stmt, instr->context.line); /* instruction generated */ - return true; + continue; } if (instr->opcode == VINSTR_COND) { diff --git a/tests/vec_ops.qc b/tests/vec_ops.qc index ac84ffc..509dc3a 100644 --- a/tests/vec_ops.qc +++ b/tests/vec_ops.qc @@ -4,4 +4,8 @@ void main(vector v) { print(vtos(v), "\n"); print(vtos(v / 2), "\n"); print(vtos(v), "\n"); + print(vtos(v | 16), "\n"); + print(vtos(v & 16), "\n"); + print(vtos(v | '25 42 51'), "\n"); + print(vtos(v & '25 42 51'), "\n"); } diff --git a/tests/vec_ops.tmpl b/tests/vec_ops.tmpl index 7d8a501..7943232 100644 --- a/tests/vec_ops.tmpl +++ b/tests/vec_ops.tmpl @@ -7,3 +7,7 @@ M: '8 16 32' M: '4 8 16' M: '2 4 8' M: '4 8 16' +M: '20 24 16' +M: '0 0 16' +M: '29 42 51' +M: '0 8 16'