From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNYRv-0000xA-Jt for qemu-devel@nongnu.org; Mon, 16 Feb 2015 22:03:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNYRs-0000W2-9P for qemu-devel@nongnu.org; Mon, 16 Feb 2015 22:03:47 -0500 Received: from out114-136.biz.mail.alibaba.com ([205.204.114.136]:34707 helo=out21.biz.mail.alibaba.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNYRr-0000Vm-TD for qemu-devel@nongnu.org; Mon, 16 Feb 2015 22:03:44 -0500 Message-ID: <54E2B159.70302@sunrus.com.cn> Date: Tue, 17 Feb 2015 11:11:21 +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> <54E2AC0B.5080802@sunrus.com.cn> In-Reply-To: <54E2AC0B.5080802@sunrus.com.cn> 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 10:48, Chen Gang S wrote: > 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?). > Originally, I really wanted to print the disassembly code, although I knew it is optional (not necessary), just like all of you said (and originally, I was not quite sure DISASM_ONLY, either). Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed