From patchwork Mon Mar 21 19:27:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 716 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:05 -0000 Delivered-To: patches@linaro.org Received: by 10.220.28.198 with SMTP id n6cs150692vcc; Mon, 21 Mar 2011 12:27:03 -0700 (PDT) Received: by 10.14.123.205 with SMTP id v53mr1464629eeh.217.1300735622896; Mon, 21 Mar 2011 12:27:02 -0700 (PDT) Received: from mtagate3.uk.ibm.com (mtagate3.uk.ibm.com [194.196.100.163]) by mx.google.com with ESMTPS id w59si6798052eeh.38.2011.03.21.12.27.01 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 12:27:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning uweigand@de.ibm.com does not designate 194.196.100.163 as permitted sender) client-ip=194.196.100.163; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning uweigand@de.ibm.com does not designate 194.196.100.163 as permitted sender) smtp.mail=uweigand@de.ibm.com Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p2LJR1eP022480 for ; Mon, 21 Mar 2011 19:27:01 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2LJRRYp1921078 for ; Mon, 21 Mar 2011 19:27:27 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2LJR1FZ000983 for ; Mon, 21 Mar 2011 13:27:01 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p2LJR0fF000980 for ; Mon, 21 Mar 2011 13:27:00 -0600 Message-Id: <201103211927.p2LJR0fF000980@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 21 Mar 2011 20:27:00 +0100 Subject: [PATCH] vex: arm->IR: unhandled instruction SUB (SP minus immediate/register) To: patches@linaro.org Date: Mon, 21 Mar 2011 20:27:00 +0100 (CET) From: "Ulrich Weigand" X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 [https://bugs.kde.org/show_bug.cgi?id=269078] Index: VEX/priv/guest_arm_toIR.c =================================================================== --- VEX/priv/guest_arm_toIR.c (revision 2104) +++ VEX/priv/guest_arm_toIR.c (working copy) @@ -16010,8 +16010,8 @@ UInt rN = INSN0(3,0); UInt rD = INSN1(11,8); Bool valid = !isBadRegT(rN) && !isBadRegT(rD); - /* but allow "sub.w sp, sp, #constT" */ - if (!valid && !isRSB && rN == 13 && rD == 13) + /* but allow "sub.w reg, sp, #constT" */ + if (!valid && !isRSB && rN == 13 && rD != 15) valid = True; if (valid) { IRTemp argL = newTemp(Ity_I32); @@ -16163,9 +16163,9 @@ && rN == 13 && imm5 == 0 && how == 0) { valid = True; } - /* also allow "sub.w sp, sp, reg w/ no shift */ + /* also allow "sub.w reg, sp, reg w/ no shift */ if (!valid && INSN0(8,5) == BITS4(1,1,0,1) // add - && rD == 13 && rN == 13 && imm5 == 0 && how == 0) { + && rD != 15 && rN == 13 && imm5 == 0 && how == 0) { valid = True; } if (valid) {