summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-09-18 19:32:18 +0200
committerWim Taymans <wtaymans@redhat.com>2014-09-19 11:08:36 +0200
commit106dacc2620126dedb99d2b981ba2e5a7d4591f9 (patch)
treee51e7b05cd8f6424a012709f507b2c8f694469f9
parentfc397d3d342ff336a36f1b6c8cb5019f21c2c355 (diff)
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.
-rw-r--r--orc/orcexecutor.c6
1 files changed, 6 insertions, 0 deletions
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 */