From 7df1b5d4a7b32622adbb8f251af3b227ecfbd7fe Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 21 May 2021 00:49:10 +0300 Subject: [PATCH] =?UTF-8?q?vectorized=20=3D=20and=20=E2=89=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/arith.c | 20 ++++++++++++++++++-- src/h.h | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/arith.c b/src/arith.c index a61e5da4..664bd182 100644 --- a/src/arith.c +++ b/src/arith.c @@ -138,15 +138,31 @@ CMP(> , gt, 1) #undef ffnx B decp_c1(B t, B x); +#define CMP_IMPL(OP) \ + if (isF64(w)&isF64(x)) return m_i32(w.f OP x.f); \ + bool wa = isArr(w); \ + bool xa = isArr(x); \ + if (wa|xa) { \ + u8 we = wa? TI(w).elType : selfElType(w); \ + u8 xe = xa? TI(x).elType : selfElType(x); \ + if (we==el_i32 && xe==el_i32) { \ + i32* rp; B r = m_i32arrc(&rp, isArr(x)? x : w); usz ria=a(r)->ia; \ + if (!wa) { i32 wv=o2iu(w); i32* xp=i32any_ptr(x); for(usz i=0;i