From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNY60-0001rZ-81 for qemu-devel@nongnu.org; Mon, 16 Feb 2015 21:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNY5v-000198-Di for qemu-devel@nongnu.org; Mon, 16 Feb 2015 21:41:08 -0500 Received: from out1134-209.mail.aliyun.com ([42.120.134.209]:6002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNY5v-00018l-2E for qemu-devel@nongnu.org; Mon, 16 Feb 2015 21:41:03 -0500 Message-ID: <54E2AC0B.5080802@sunrus.com.cn> Date: Tue, 17 Feb 2015 10:48:43 +0800 From: Chen Gang S MIME-Version: 1.0 References: <54DD17BC.5040006@sunrus.com.cn> <54DD180B.3080004@sunrus.com.cn> <54DE8DCA.6030302@sunrus.com.cn> <54DEBC3E.4000805@sunrus.com.cn> <54DEC303.6030502@ezchip.com> <54DF6F90.60406@sunrus.com.cn> <54E1669F.9090402@sunrus.com.cn> <54E20265.9040606@sunrus.com.cn> <54E2787A.7010101@sunrus.com.cn> <54E28743.4070805@ezchip.com> In-Reply-To: <54E28743.4070805@ezchip.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Metcalf , Peter Maydell Cc: Max Filippov , "rth@twiddle.net" , Riku Voipio , qemu-devel , "walt@tilera.com" On 2/17/15 08:11, Chris Metcalf wrote: > On 2/16/2015 6:46 PM, Peter Maydell wrote: >> On 17 February 2015 at 08:08, Chen Gang S wrote: >>> On 2/16/15 23:24, Max Filippov wrote: >>>> Disassembler is not a crucial part of QEMU target. >>> For me, it is necessary. We need disassemble target binary instructions >>> (recognize them), then translate them into tcg instructions which are >>> grouped by Translate Block. >> No, Max is correct. What QEMU calls the "disassembler" is just >> used for debug logging: it is code that goes from target binary >> instructions to printed display of assembly language instructions. >> This is completely separate code from the code in target-*/translate.c >> which decodes target binary instructions and emits TCG opcodes. >> That code is generally called the translator or the decoder, and >> it is always written from scratch specifically for QEMU. Don't >> try to reuse code from binutils there. > > The kernel disassembly that Chen Gang is looking at is basically just an > instruction recognizer; it doesn't even include text strings for opcodes, > for example. But my guess is that it is exactly the right starting building > block for decoding target binary instructions. > Excuse me, I am not quite familiar with the GPL license, so I guess we are misunderstanding with each other. - it is necessary to disassemble/decode target binary instructions. - I want to write the decoder in translate.c according to binutils/ kernel disassembler (also need consider about "BFD_RELOC" and "!__KERNEL__ && !__LIBC__"). - If I reference to binutils source code, I am not quite sure whether I break the license or not (is it illegal?). Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed