Bug 354274 - arm: unhandled instruction: 0xEBAD 0x0AC1 (sub.w sl, sp, r1, lsl #3)
Summary: arm: unhandled instruction: 0xEBAD 0x0AC1 (sub.w sl, sp, r1, lsl #3)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: 3.10 SVN
Platform: Android Other
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-23 18:33 UTC by dimitry
Modified: 2016-10-06 05:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dimitry 2015-10-23 18:33:34 UTC
This patch fixed the problem:

diff --git a/VEX/priv/guest_arm_toIR.c b/VEX/priv/guest_arm_toIR.c
index d2bcf16..54ccd07 100644
--- a/VEX/priv/guest_arm_toIR.c
+++ b/VEX/priv/guest_arm_toIR.c
@@ -19671,10 +19671,10 @@ DisResult disInstr_THUMB_WRK (
           && rD != 15 && rN == 13 && imm5 <= 3 && how == 0) {
          valid = True;
       }
-      /* also allow "sub.w reg, sp, reg   w/ no shift
+      /* also allow "sub.w reg, sp, reg   lsl #N for N=0,1,2 or 3
          (T1) "SUB (SP minus register) */
       if (!valid && INSN0(8,5) == BITS4(1,1,0,1) // sub
-          && rD != 15 && rN == 13 && imm5 == 0 && how == 0) {
+          && rD != 15 && rN == 13 && imm5 <= 3 && how == 0) {
          valid = True;
       }
       if (valid) {
Comment 1 Julian Seward 2016-10-06 05:26:49 UTC
Committed as vex r3257, and will be in 3.12.0.  Thanks for the patch.