Commit 6e418c21 authored by Wim Taymans's avatar Wim Taymans

program-c: handle X2 and X4 with size < 2 variables

when the variable has a size < 2 it will have been declared as a simple
int8 or int16, when we use this in a X2 or X4 instruction, use the
variable directly instead of trying to use the x fields.
parent f6697e30
......@@ -503,16 +503,16 @@ c_get_name_int (char *name, OrcCompiler *p, OrcInstruction *insn, int var)
}
}
} else {
if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X2)) {
sprintf(name, "var%d.x2[%d]", var, p->unroll_index);
} else if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X4)) {
sprintf(name, "var%d.x4[%d]", var, p->unroll_index);
} else {
if (p->vars[var].size >= 2) {
sprintf(name, "var%d.i", var);
if (p->vars[var].size >= 2) {
if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X2)) {
sprintf(name, "var%d.x2[%d]", var, p->unroll_index);
} else if (insn && (insn->flags & ORC_INSTRUCTION_FLAG_X4)) {
sprintf(name, "var%d.x4[%d]", var, p->unroll_index);
} else {
sprintf(name, "var%d", var);
sprintf(name, "var%d.i", var);
}
} else {
sprintf(name, "var%d", var);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment