On 6/30/23 08:58, Song Gao wrote:
-void HELPER(vmskltz_b)(CPULoongArchState *env, uint32_t vd, uint32_t vj)
+void HELPER(vmskltz_b)(CPULoongArchState *env,
+                       uint32_t oprsz, uint32_t vd, uint32_t vj)
  {
-    uint16_t temp = 0;
+    int i, max;
+    uint16_t temp;
      VReg *Vd = &(env->fpr[vd].vreg);
      VReg *Vj = &(env->fpr[vj].vreg);
- temp = do_vmskltz_b(Vj->D(0));
-    temp |= (do_vmskltz_b(Vj->D(1)) << 8);
-    Vd->D(0) = temp;
-    Vd->D(1) = 0;
+    max = (oprsz == 16) ? 1 : 2;
+
+    for (i = 0; i < max; i++) {
+        temp = 0;
+        temp = do_vmskltz_b(Vj->D(2 * i));

void * and desc operands; loop over oprsz.


r~

Reply via email to