From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116926 invoked by alias); 12 Apr 2016 09:27:10 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 116906 invoked by uid 89); 12 Apr 2016 09:27:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=bothers, Though, Hx-languages-length:1684, Notes X-HELO: smtprelay.synopsys.com Received: from smtprelay.synopsys.com (HELO smtprelay.synopsys.com) (198.182.47.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 Apr 2016 09:27:06 +0000 Received: from dc8secmta1.synopsys.com (dc8secmta1.synopsys.com [10.13.218.200]) by smtprelay.synopsys.com (Postfix) with ESMTP id 1496C24E13CB; Tue, 12 Apr 2016 02:27:05 -0700 (PDT) Received: from dc8secmta1.internal.synopsys.com (dc8secmta1.internal.synopsys.com [127.0.0.1]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id 07DFD27113; Tue, 12 Apr 2016 02:27:05 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id D70C927102; Tue, 12 Apr 2016 02:27:04 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id C59372C4; Tue, 12 Apr 2016 02:27:04 -0700 (PDT) Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 40C1C2BD; Tue, 12 Apr 2016 02:27:04 -0700 (PDT) Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 12 Apr 2016 02:27:04 -0700 Received: from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099]) by DE02WEHTCB.internal.synopsys.com ([::1]) with mapi id 14.03.0195.001; Tue, 12 Apr 2016 11:20:39 +0200 From: Claudiu Zissulescu To: Andrew Burgess , "binutils@sourceware.org" CC: "Cupertino.Miranda@synopsys.com" , "noamca@mellanox.com" Subject: RE: [PATCH 1/3] opcodes/arc: Compute insn lengths in disassembler Date: Tue, 12 Apr 2016 09:27:00 -0000 Message-ID: <098ECE41A0A6114BB2A07F1EC238DE896617DE83@DE02WEMBXB.internal.synopsys.com> References: <1460027127-1121-1-git-send-email-andrew.burgess@embecosm.com> <1460027127-1121-2-git-send-email-andrew.burgess@embecosm.com> In-Reply-To: <1460027127-1121-2-git-send-email-andrew.burgess@embecosm.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2016-04/txt/msg00171.txt.bz2 Hi Andrew, =20 > The table is self-checking while being built, it only contains the > instructions for the current architecture being disassembled, and if > different instructions with the same major opcode have different > lengths, this will cause an error while the table is being filled. I still have some questions regarding your newly proposed way of decoding t= he instructions. What bothers me is the fact you relay on the existing enco= dings, but what is happening when we have extension instructions. For ARCom= pact the extension instructions may start from major 0x05 and end somewher= e at 0x0B, For ARCv2 the extension instructions start from 0x05 and ends at= 0x07. The official docs are stipulating those ones are 32-bit. Though, I'v= e seen custom instructions defined as short instructions(16-bit). How your = proposed patch is addressing the extension instructions (let us not take in= to account the short ones)? As far as I can see, we can actually say that all major larger than 0x0B fo= r ARCompact are 16-bit, and all major larger than 0x07 for ARCv2 are 16-bit= . Though some sanity testing needs to be done. Name conventions: MAJOR Notes 0x04 ARC 32-bit basecase instructions; 0x05 - 0x06 ARC 32-bit extension instructions; 0x07 User 32-bit extension instructions; 0x08 ARCompact: User 32-bit extension instructions; ARCv2: 16-bit instruct= ions 0x09 ARCompact: Market-specific extension instructions; ARCv2: 16-bit inst= ructions 0x0A ARCompact: Market-specific extension instructions; ARCv2: 16-bit inst= ructions 0x0B ARCompact: Market-specific extension instructions; ARCv2: 16-bit inst= ructions Thanks, Claudiu