]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
tests, and a bugfix
authorRudolf Polzer <divverent@xonotic.org>
Mon, 26 Aug 2013 09:08:36 +0000 (11:08 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 26 Aug 2013 09:08:36 +0000 (11:08 +0200)
ir.c
tests/vec_ops.qc
tests/vec_ops.tmpl

diff --git a/ir.c b/ir.c
index f73e5c025fe330d1ee3f66521f0bbf793de2adce..6aef760d584ae5e2d023e70cfda11d95f8bd05a5 100644 (file)
--- 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) {
index ac84ffcc7768b1cd9b794ea96b9fce55cf6c0ec2..509dc3a6a1c36a42fbf532ad1b63b2a44c4ce641 100644 (file)
@@ -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");
 }
index 7d8a501a45c6dcd96f5ff8116f0731174b6fea5a..79432325d3b52ae2032fca3d7a300074245c76c1 100644 (file)
@@ -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'