https://bugs.kde.org/show_bug.cgi?id=438038

Julian Seward <jsew...@acm.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsew...@acm.org

--- Comment #3 from Julian Seward <jsew...@acm.org> ---
(In reply to ahashmi from comment #1)
> Created attachment 139231 [details]
> Adds arm64 v8.2 FCCMP, FCCMPE, FCMEQ, FCMGE and FCMGT instructions

Looks mostly fine.  Comments below.  
r+ provided the SIGILL-vs-assert thing is fixed.


In dis_AdvSIMD_fp_conditional_compare

+   else if (ty == 3) {
+      if ((archinfo->hwcaps & VEX_HWCAPS_ARM64_FP16) == 0)
+         return False;
+      ity  = Ity_F16;
+      irop = Iop_CmpF16;
+   }
+   else
+      vassert(0); /* ty = 2 => illegal encoding */

No .. ensure SIGILL is raised (decode failure) for any undecodable insns.
Never assert.


+   setFlags_COPY(nzcv_28x0);
+   DIP("fccmp%s %s, %s, #%u, %s\n", isCMPE ? "e" : "",
+       nameQRegLO(nn, ity), nameQRegLO(mm, ity), nzcv, nameCC(cond));
+   return True;

    return False;

This is a strange sequence.  The second return is unreachable.  (Maybe I
misread?)


+      if (e->Iex.Binop.op == Iop_CmpF64 || e->Iex.Binop.op == Iop_CmpF32 ||
+          e->Iex.Binop.op == Iop_CmpF16) {
+         HReg (*iselExpr)(ISelEnv*, IRExpr*);
+         ARM64Instr* (*VCmp)(HReg, HReg);

As a nit, in such situations I'd prefer if you set these both to NULL so as to
protect against future snafus .. I know it's redundant as the code stands.
Viz:

         HReg (*iselExpr)(ISelEnv*, IRExpr*) = NULL;
         ARM64Instr* (*VCmp)(HReg, HReg) = NULL;

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to