From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26106 invoked by alias); 8 Nov 2011 10:17:12 -0000 Received: (qmail 26093 invoked by uid 22791); 8 Nov 2011 10:17:10 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_SB X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Nov 2011 10:16:56 +0000 Received: from nat-jpt.mentorg.com ([192.94.33.2] helo=PR1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RNijf-0001xQ-6b from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 08 Nov 2011 02:16:55 -0800 Received: from [127.0.0.1] ([172.16.63.104]) by PR1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 8 Nov 2011 19:16:53 +0900 Message-ID: <4EB90188.40009@codesourcery.com> Date: Tue, 08 Nov 2011 10:17:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH] arm reversible : References: <998639.46560.qm@web112516.mail.gq1.yahoo.com> <321260.58442.qm@web112504.mail.gq1.yahoo.com> <1316327455.23344.YahooMailNeo@web112509.mail.gq1.yahoo.com> <1316404058.27177.YahooMailNeo@web112502.mail.gq1.yahoo.com> <1318650316.91503.YahooMailNeo@web112508.mail.gq1.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00186.txt.bz2 On 11/08/2011 02:01 PM, oza Pawandeep wrote: > Yao >> This function is used to match opcode for instructions. Why don't > you use bit operation (AND and OR) and logic operation to match > instruction? Bit operation and logic operation are widely used in > gdb. It is efficient and easy to read. I suggest to replace > sbo_sbz by bit/logical operation when matching instruction. > > > Oza >> I am not sure what you meant by re-writting sbo_sbz function. > as there is already '&' and '!' and '>>' which all are bit operators. I suggested to remove sbo_sbz function, to decode instructions with macros bits/bit, and to match using if/else/switch etc. Please reference arm_get_next_pc_raw, arm_process_displaced_insn and thumb_process_displaced_insn to see how instructions are decoded and matched. -- Yao (齐尧)