From patchwork Mon Jun 25 20:35:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 934548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41F1F31N6Mz9s0W for ; Tue, 26 Jun 2018 06:37:10 +1000 (AEST) Received: from localhost ([::1]:49134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXYEV-0005gY-Tu for incoming@patchwork.ozlabs.org; Mon, 25 Jun 2018 16:37:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXYDs-0005gM-D1 for qemu-devel@nongnu.org; Mon, 25 Jun 2018 16:36:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXYDp-0000RS-8w for qemu-devel@nongnu.org; Mon, 25 Jun 2018 16:36:28 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:33277) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXYDo-0000R3-Vb for qemu-devel@nongnu.org; Mon, 25 Jun 2018 16:36:25 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MMWPG-1fWzjE0Whq-008IdY; Mon, 25 Jun 2018 22:36:22 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 25 Jun 2018 22:35:59 +0200 Message-Id: <20180625203559.21370-2-laurent@vivier.eu> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180625203559.21370-1-laurent@vivier.eu> References: <20180625203559.21370-1-laurent@vivier.eu> X-Provags-ID: V03:K1:yDkDtB1f8XEk/MUNq5EqCpps5fcfc1RYOafPbO2eWj/ABH1vLwo 49ffVr90oVSm7NusgnZmfDF4SwHa4ADkJ/gDHekuxvf3s/fvdP4aQ519LtkncokMCYfz/46 BsFf9rSTd0Hji+EhEwr92+G5IFNJ1CPtVwSUOpQLiuBKGXTBsxpYbVBG0yFD2IQonrrHgbi ZM1bH7YqhYTxgcfv7wa8g== X-UI-Out-Filterresults: notjunk:1; V01:K0:RRca+96JjPk=:acNBAek2+CY6HU6BE3pIjA igmCrxP67+7i9u5OYmJLu1WSyMsb3tR8PGEXYpi7Bff7otaDQhtojVJFVpSAxNqQ/l1UL8TPh 8PIjqthZ72trnoZBTSmp87aSl01U4X/40uKL2MgK85Aj8YKZY2evXDvSRGG+B+23YtF+6O/MC 3PTguA6//Y/SmFzX+uybxC2M0SKl7MbrgbJ/8++uNcfSWs+FTz9ypl4zw+GdR25ga6J0aaBlO +RFYda2IDOG0yJ3+FvPjp8aqJ6eKUFsAXbisuqOKaUTdUh0yPxkyW0NlODOyfYDWuu5Pkbygm a63YmE7B3n0939ZFx5Q3WNNpwvv5+NobzsqnDJ6yvML7cD2GnML1pYts/ldpeACd0tqm7pfNO QcQAnyXutpgVdcEmsXVWok2EpgmovixfeY3qKz3wDli3l/S3uP3Cx4I6sNzpSmpMu8OQw+2pL g50SZ7K3OO/ioETUUbqqkRNmlxkOaFS67mVdgh2ILQUgqNxLe0de9mTFCHAzYyvRV9uzH69t8 NYGekMt1SpGjWrrlqDFRxUirrxZ0pAfWJgk3HFyohw0hESvjaYgeXacdGrE6GmO2ruUJ/BhlL UG8//JohK8LLsdKUcPpnZBTOF8ROTm6iYPs3A9iaJlOZ0ea2WSxt6crNE6oK6fWVLYc+0AGq1 V2pt/qvYMw3sN3qrDC1X4dVAP2grwt3OWuEua8NFr5ALT4AHjRUccv4e9Sewe02mYPOw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.73 Subject: [Qemu-devel] [PATCH 1/1] target/m68k: correctly disassemble move16 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" "move16 %a0@+,%a1@" and "fmovel (cpid=3) %a0@-,%fpcr" share the same opcode. To fix that, backport the fix from binutils: 2005-11-10 Andreas Schwab * m68k-dis.c (print_insn_m68k): Only match FPU insns with coprocessor ID 1. Reported-by: Thomas Huth Signed-off-by: Laurent Vivier Tested-by: Thomas Huth --- disas/m68k.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/disas/m68k.c b/disas/m68k.c index 61b689ef3e..a687df437c 100644 --- a/disas/m68k.c +++ b/disas/m68k.c @@ -2017,6 +2017,20 @@ print_insn_m68k (bfd_vma memaddr, disassemble_info *info) } } + /* Don't match FPU insns with non-default coprocessor ID. */ + if (*d == '\0') + { + for (d = opc->args; *d; d += 2) + { + if (d[0] == 'I') + { + val = fetch_arg (buffer, 'd', 3, info); + if (val != 1) + break; + } + } + } + if (*d == '\0') if ((val = match_insn_m68k (memaddr, info, opc, & priv))) return val;