On 26/5/24 21:42, Richard Henderson wrote:
VIS4 completes the set, adding missing signed 8-bit ops
and missing unsigned 16 and 32-bit ops.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  target/sparc/helper.h     |  12 +--
  target/sparc/insns.decode |   6 ++
  target/sparc/translate.c  |  12 +++
  target/sparc/vis_helper.c | 170 +++++++++++++++++++++++++++++---------
  4 files changed, 153 insertions(+), 47 deletions(-)


+uint64_t helper_fcmpeq16(uint64_t src1, uint64_t src2)
+{
+    uint64_t a = src1 ^ src2;
+    uint64_t m = 0x7fff7fff7fff7fffULL;
+    uint64_t c = ~(((a & m) + m) | a | m);
+
+    /* a...............b...............c...............d............... */
+    c |= c << 15;
+    /* ab..............bc..............cd..............d............... */
+    c |= c << 30;
+    /* abcd............bcd.............cd..............d............... */
+    return c >> 60;

Too optimized (or early) to process this :|

+}

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to