From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Peter Maydell <peter.maydell@linaro.org>,
Chris Metcalf <cmetcalf@ezchip.com>,
Riku Voipio <riku.voipio@iki.fi>,
"rth@twiddle.net" <rth@twiddle.net>,
"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-tilegx: Finish decoding the first TB block.
Date: Sat, 21 Feb 2015 15:16:45 +0800 [thread overview]
Message-ID: <54E830DD.4070708@sunrus.com.cn> (raw)
In-Reply-To: <54E7F5EB.60402@sunrus.com.cn>
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
next prev parent reply other threads:[~2015-02-21 7:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-21 3:05 [Qemu-devel] [PATCH] target-tilegx: Finish decoding the first TB block Chen Gang S
2015-02-21 7:16 ` Chen Gang S [this message]
2015-02-21 15:31 ` Chen Gang S
2015-02-21 16:02 ` Chen Gang S
2015-02-21 16:33 ` Richard Henderson
2015-02-22 0:25 ` Chen Gang S
2015-02-22 0:25 ` Chris Metcalf
2015-02-22 1:08 ` Chen Gang S
2015-02-22 4:42 ` Chen Gang S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E830DD.4070708@sunrus.com.cn \
--to=gang.chen@sunrus.com.cn \
--cc=cmetcalf@ezchip.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
--cc=walt@tilera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).