sse: use register for loop counter
authorDavid Schleef <ds@schleef.org>
Sat, 12 Jun 2010 22:17:42 +0000 (15:17 -0700)
committerDavid Schleef <ds@schleef.org>
Sat, 12 Jun 2010 22:17:42 +0000 (15:17 -0700)
orc/orccompiler.c
orc/orcprogram-sse.c

index 90a9617..877f73d 100644 (file)
@@ -451,8 +451,13 @@ orc_compiler_global_reg_alloc (OrcCompiler *compiler)
     }
   }
 
-  if (compiler->alloc_loop_counter) {
+  if (compiler->alloc_loop_counter && !compiler->error) {
     compiler->loop_counter = orc_compiler_allocate_register (compiler, FALSE);
+    /* FIXME massive hack */
+    if (compiler->loop_counter == 0) {
+      compiler->error = FALSE;
+      compiler->result = ORC_COMPILE_RESULT_OK;
+    }
   }
 }
 
index e18c7ba..4cee42a 100644 (file)
@@ -164,8 +164,8 @@ orc_compiler_sse_init (OrcCompiler *compiler)
       break;
   }
 
-  compiler->unroll_shift = 0;
-  //compiler->alloc_loop_counter = TRUE;
+  compiler->unroll_shift = 1;
+  compiler->alloc_loop_counter = TRUE;
 
 }