From 106dacc2620126dedb99d2b981ba2e5a7d4591f9 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 18 Sep 2014 19:32:18 +0200 Subject: executor: fully expand const vars into the temp register When loading a const in a register, always make it cover the full register so that it containts enough values to be used in x2 and x4 instructions. --- orc/orcexecutor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/orc/orcexecutor.c b/orc/orcexecutor.c index 6fe296d..21513f3 100644 --- a/orc/orcexecutor.c +++ b/orc/orcexecutor.c @@ -292,6 +292,12 @@ orc_executor_emulate (OrcExecutor *ex) /* FIXME hack */ load_constant (tmpspace[insn->src_args[k]], 8, var->value.i); + if (var->size == 1) + opcode_ex[j].shift = 3; + else if (var->size == 2) + opcode_ex[j].shift = 2; + else if (var->size == 4) + opcode_ex[j].shift = 1; } else if (var->vartype == ORC_VAR_TYPE_PARAM) { opcode_ex[j].src_ptrs[k] = tmpspace[insn->src_args[k]]; /* FIXME hack */ -- cgit v1.2.3