From aa741aba61d8b7b4f15403474ae0d1715b954be0 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Wed, 7 May 2014 09:20:11 +0000 Subject: [PATCH] Allow early-writeback for the cases stp d, d, [sp,#-imm]! stp s, s, [sp,#-imm]! as well as for the existing case stp q, q, [sp,#-imm]! git-svn-id: svn://svn.valgrind.org/vex/trunk@2854 --- VEX/priv/guest_arm64_toIR.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c index a8e077cf77..55ca7e24d1 100644 --- a/VEX/priv/guest_arm64_toIR.c +++ b/VEX/priv/guest_arm64_toIR.c @@ -3702,8 +3702,10 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn) } /* Normally rN would be updated after the transfer. However, in - the special case typifed by + the special cases typifed by stp q0, q1, [sp,#-512]! + stp d0, d1, [sp,#-512]! + stp s0, s1, [sp,#-512]! it is necessary to update SP before the transfer, (1) because Memcheck will otherwise complain about a write below the stack pointer, and (2) because the segfault @@ -3713,7 +3715,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn) address to the next page. */ Bool earlyWBack - = wBack && simm7 < 0 && szB == 16 + = wBack && simm7 < 0 && INSN(24,23) == BITS2(1,1) && nn == 31 && !isLD; if (wBack && earlyWBack) -- 2.47.2