From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP4BU-0000Kw-QQ for qemu-devel@nongnu.org; Sat, 21 Feb 2015 02:09:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YP4BR-0007sE-BE for qemu-devel@nongnu.org; Sat, 21 Feb 2015 02:09:04 -0500 Received: from out1134-251.mail.aliyun.com ([42.120.134.251]:29906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YP4BQ-0007rS-Uy for qemu-devel@nongnu.org; Sat, 21 Feb 2015 02:09:01 -0500 Message-ID: <54E830DD.4070708@sunrus.com.cn> Date: Sat, 21 Feb 2015 15:16:45 +0800 From: Chen Gang S MIME-Version: 1.0 References: <54E7F5EB.60402@sunrus.com.cn> In-Reply-To: <54E7F5EB.60402@sunrus.com.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-tilegx: Finish decoding the first TB block. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Chris Metcalf , Riku Voipio , "rth@twiddle.net" , "walt@tilera.com" Cc: qemu-devel On 2/21/15 11:05, Chen Gang S wrote: > At present finish decoding the first TB block: _start. Always let y1 and > x1 pipe at the last which may content jump instructions. > > The related disassembly code is below which is the same as the objdump: > > y0: 00000000500bfdb4 move r52, r54 > y2: 0208000007600000 ld r1, r54 > y1: 1c06400000000000 fnop > x0: 0000000051483000 fnop > x1: 180f86c600000000 addi r12, r54, -16 > x0: 00000000403f8336 andi r54, r12, -8 > x1: 286af00680000000 lnk r13 > y0: 00000000500bf005 move r5, r0 > y2: 03f8000007600000 st r54, r63 > y1: 040046c600000000 addi r12, r54, 8 > y0: 00000000500bfff7 move r55, r63 > y2: 03f8000004c00000 st r12, r63 > y1: 0400468100000000 addi r2, r52, 8 > x0: 0000000040110d86 addi r6, r54, 16 > x1: 07ffffe000000000 moveli r0, -1 > x0: 000000007ffff000 shl16insli r0, r0, -1 > x1: 000007e180000000 moveli r3, 0 > x0: 000000007ffa8000 shl16insli r0, r0, -88 > x1: 3800006180000000 shl16insli r3, r3, 0 > x0: 00000000500cd000 and r0, r0, r13 > x1: 3877406180000000 shl16insli r3, r3, 3816 > x0: 0000000010000fcc moveli r12, 0 > x1: 2806686180000000 add r3, r3, r13 > x0: 000000007000030c shl16insli r12, r12, 0 > x1: 000007e200000000 moveli r4, 0 > x0: 000000007039030c shl16insli r12, r12, 912 > x1: 3800008200000000 shl16insli r4, r4, 0 > x0: 00000000500cd30c and r12, r12, r13 > x1: 3881808200000000 shl16insli r4, r4, 4144 > x0: 00000000500cd104 and r4, r4, r13 > x1: 286a718000000000 jr r12 > Oh, sorry, it has no 'and' operation, it should be 'add' (3 places need be modified). It is a printing typo issue. [...] > + case 0x0000000050000000ULL: > + switch (TILEGX_CODE_X0_18(bundle)) { > + /* add Dest, SrcA, SrcB */ > + case 0x00000000000c0000ULL: > + rdest = (unsigned char)(bundle & TILEGX_DATA_REGISTER); > + rsrc = (unsigned char)((bundle >> 6) & TILEGX_DATA_REGISTER); > + rsrcb = (unsigned char)((bundle >> 12) & TILEGX_DATA_REGISTER); > + qemu_log("and r%d, r%d, r%d", rdest, rsrc, rsrcb); It should be print "add", not "and". Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed