From patchwork Mon Oct 1 22:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trent Piepho X-Patchwork-Id: 29606 Received: (qmail 122806 invoked by alias); 1 Oct 2018 22:08:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 122775 invoked by uid 89); 1 Oct 2018 22:08:55 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:969 X-HELO: NAM02-CY1-obe.outbound.protection.outlook.com Received: from mail-cys01nam02on0104.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (104.47.37.104) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Oct 2018 22:08:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=impinj.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QK8AVO7HQCPvdhLa2VAbSlQbEpbbPuhgP4lly12V7z4=; b=lA8BoJiwVwcVrf7qezP0VKjYUMv/iV14ulTOCOsXImtZFu14UbP8uXR8piybK3HTrF9dPaQUZNGafuZUB7tSaMcIiVNngrwTRMMyxe5pBdDN9faRrDVp8qzasdWMl+RwZhzSmpSXlXTmoL7Vfem/Tcvo7jHv7yDXLYDLtl8PsSM= Received: from MWHPR0601MB3708.namprd06.prod.outlook.com (10.167.236.38) by MWHPR0601MB3705.namprd06.prod.outlook.com (10.167.236.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Mon, 1 Oct 2018 22:08:51 +0000 Received: from MWHPR0601MB3708.namprd06.prod.outlook.com ([fe80::f4ee:3633:74c0:ab4]) by MWHPR0601MB3708.namprd06.prod.outlook.com ([fe80::f4ee:3633:74c0:ab4%3]) with mapi id 15.20.1185.024; Mon, 1 Oct 2018 22:08:51 +0000 From: Trent Piepho To: "gdb-patches@sourceware.org" CC: Trent Piepho Subject: [PATCH v2 1/2] Record ARM THUMB2 PLD/PLI cache instructions Date: Mon, 1 Oct 2018 22:08:50 +0000 Message-ID: <20181001220826.10429-1-tpiepho@impinj.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=tpiepho@impinj.com; received-spf: None (protection.outlook.com: impinj.com does not designate permitted sender hosts) MIME-Version: 1.0 These weren't decoded correctly and trigger an unknown instruction error when recording. The ARM format was handled, but not the 32-bit THUMB2 format. Since they are only hints that may affect cache state, there is nothing to record. gdb/ChangeLog 2018-09-28 Trent Piepho PR gdb/23725 * gdb/arm-tdep.c (thumb2_record_ld_mem_hints): Decode thumb2 PLD/PLI --- gdb/arm-tdep.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index c3280ee211..90936ada8e 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -12683,6 +12683,14 @@ thumb2_record_ld_mem_hints (insn_decode_record *thumb2_insn_r) record_buf); return ARM_RECORD_SUCCESS; } + else + { + if (bits (thumb2_insn_r->arm_insn, 20, 22) == 0x1) + { + /* Handle PLD, PLI affect only caches, so nothing to record */ + return ARM_RECORD_SUCCESS; + } + } return ARM_RECORD_FAILURE; }