summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-09-26 12:11:14 +0200
committerWim Taymans <wtaymans@redhat.com>2014-09-26 12:12:42 +0200
commitdb35c03e71c1dab3545ca96f2481ae97bd12a833 (patch)
tree2c467d7e3ad86ac54c64ee38230d2f5e5359368f
parent7186fbaad7b2d5fe62781ae33196e00a35edc03a (diff)
compiler: update max_used_temp_reg before use
It should not be smaller than min_temp_reg or we will fail to search for a free register.
-rw-r--r--orc/orccompiler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/orc/orccompiler.c b/orc/orccompiler.c
index 12c6c11..46ae8fe 100644
--- a/orc/orccompiler.c
+++ b/orc/orccompiler.c
@@ -1177,6 +1177,9 @@ orc_compiler_get_constant_reg (OrcCompiler *compiler)
compiler->alloc_regs[compiler->constants[j].alloc_reg] = 1;
}
}
+ if (compiler->max_used_temp_reg < compiler->min_temp_reg)
+ compiler->max_used_temp_reg = compiler->min_temp_reg;
+
for(j=ORC_VEC_REG_BASE;j<=compiler->max_used_temp_reg;j++) {
compiler->alloc_regs[j] = 1;
}