diff options
author | Gaetan Bahl <gaetan.bahl@nxp.com> | 2022-05-20 16:41:27 +0300 |
---|---|---|
committer | Gaetan Bahl <gaetan.bahl@nxp.com> | 2022-06-01 19:39:31 +0300 |
commit | 95a2926fb7bba1febe7c4db661209eb4db4711f6 (patch) | |
tree | d1afdef1c9bdc1508d7dba510278f54b258492b8 | |
parent | 5d5515ea5b01c82bbe559029255f528082c4fce1 (diff) |
neon: Fix divf only processing two inputs out of four
This solves an issue where two out of four input values are not processed
by passing the correct value of vec shift.
Fixes #33, #20.
Signed-off-by: Gaetan Bahl <gaetan.bahl@nxp.com>
-rw-r--r-- | orc/orcrules-neon.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/orc/orcrules-neon.c b/orc/orcrules-neon.c index aed2884..44802a5 100644 --- a/orc/orcrules-neon.c +++ b/orc/orcrules-neon.c @@ -2948,24 +2948,24 @@ orc_neon_rule_divf (OrcCompiler *p, void *user, OrcInstruction *insn) orc_neon64_emit_unary (p, "frecpe", 0x0ea1d800, tmpreg, p->vars[insn->src_args[1]], - p->insn_shift); + vec_shift); for(i = 0; i < NUM_ITERS_DIVF; i++) { orc_neon64_emit_binary (p, "frecps", 0x0e20fc00, tmpreg2, /* correction factor */ tmpreg, /* the last estimate */ p->vars[insn->src_args[1]], /* the original number */ - p->insn_shift); + vec_shift); orc_neon64_emit_binary (p, "fmul", 0x2e20dc00, tmpreg, /* revised estimate */ tmpreg, /* last estimate */ tmpreg2, /* correction factor */ - p->insn_shift); + vec_shift); } orc_neon64_emit_binary (p, "fmul", 0x2e20dc00, p->vars[insn->dest_args[0]], p->vars[insn->src_args[0]], - tmpreg, p->insn_shift); + tmpreg, vec_shift); } else { if (p->insn_shift <= vec_shift) { int i; |