]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Implement PRFM (immediate). Fixes #335713.
authorJulian Seward <jseward@acm.org>
Thu, 30 Oct 2014 23:56:10 +0000 (23:56 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 30 Oct 2014 23:56:10 +0000 (23:56 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@2985

VEX/priv/guest_arm64_toIR.c

index acfdc023db2016062285cf48eb29ef435da09b85..b9032b80d2b0c603e46d136f9b7984fcb1b113aa 100644 (file)
@@ -6358,6 +6358,22 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn)
       return True;
    }
 
+   /* ------------------ PRFM (immediate) ------------------ */
+   /* 31           21    9 4
+      11 111 00110 imm12 n t   PRFM pfrop=Rt, [Xn|SP, #pimm]
+   */
+   if (INSN(31,22) == BITS10(1,1,1,1,1,0,0,1,1,0)) {
+      UInt imm12 = INSN(21,10);
+      UInt nn    = INSN(9,5);
+      UInt tt    = INSN(4,0);
+      /* Generating any IR here is pointless, except for documentation
+         purposes, as it will get optimised away later. */
+      IRTemp ea = newTemp(Ity_I64);
+      assign(ea, binop(Iop_Add64, getIReg64orSP(nn), mkU64(imm12 * 8)));
+      DIP("prfm prfop=%u, [%s, #%u]\n", tt, nameIReg64orSP(nn), imm12 * 8);
+      return True;
+   }
+
    vex_printf("ARM64 front end: load_store\n");
    return False;
 #  undef INSN