From: Tom Musta <tommusta@gmail.com>
To: Richard Henderson <rth@twiddle.net>,
Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Bug in PPC TCG for rlwimi ?
Date: Tue, 13 May 2014 16:32:36 -0500 [thread overview]
Message-ID: <53728F74.1000302@gmail.com> (raw)
In-Reply-To: <53728A80.1070107@twiddle.net>
On 5/13/2014 4:11 PM, Richard Henderson wrote:
> On 05/13/2014 02:09 PM, Peter Maydell wrote:
>> Dumping the TCG opcodes would probably help here (-d op)...
>
> Use -d op if you suspect a bug in the translator.
> Use -d op_opt if you suspect a bug in the out_asm.
>
>
> r~
>
It is big endian.
Here is the -d op output. What does the "mov_i32 tmp0,r4" op mean
when r4 is an i64?
IN:
0x00000fffa87a2ae4: rlwimi r4,r4,8,16,23
OP:
ld_i32 tmp0,env,$0xfffffffffffffffc
movi_i32 tmp1,$0x0
brcond_i32 tmp0,tmp1,ne,$0x0
---- 0xfffa87a2ae4
mov_i32 tmp0,r4
movi_i32 tmp1,$0x8
rotl_i32 tmp0,tmp0,tmp1
movi_i64 tmp3,$0xffffffff
and_i64 tmp2,tmp0,tmp3
movi_i64 tmp4,$0xff00
and_i64 tmp2,tmp2,tmp4
movi_i64 tmp4,$0xffffffffffff00ff
and_i64 tmp3,r4,tmp4
or_i64 r4,tmp2,tmp3
goto_tb $0x0
movi_i64 nip,$0xfffa87a2ae8
exit_tb $0xfffa88bdc30
set_label $0x0
exit_tb $0xfffa88bdc33
The op_opt output is this:
OP after optimization and liveness analysis:
ld_i32 tmp0,env,$0xfffffffffffffffc
movi_i32 tmp1,$0x0
brcond_i32 tmp0,tmp1,ne,$0x0
---- 0xfff7efa2ae4
mov_i32 tmp0,r4
movi_i32 tmp1,$0x8
rotl_i32 tmp0,tmp0,tmp1
nopn $0x2,$0x2
mov_i64 tmp2,tmp0
movi_i64 tmp4,$0xff00
and_i64 tmp2,tmp2,tmp4
movi_i64 tmp4,$0xffffffffffff00ff
and_i64 tmp3,r4,tmp4
or_i64 r4,tmp2,tmp3
goto_tb $0x0
movi_i64 nip,$0xfff7efa2ae8
exit_tb $0xfff7f0bdc30
set_label $0x0
exit_tb $0xfff7f0bdc33
end
OUT: [size=136]
0x603638c0: lwz r14,-4(r27)
0x603638c4: cmpwi cr7,r14,0
0x603638c8: bne- cr7,0x60363934
0x603638cc: lwz r14,32(r27)
0x603638d0: mr r15,r14
0x603638d4: rotlwi r15,r15,8
0x603638d8: andi. r15,r15,65280
0x603638dc: lis r0,-1
0x603638e0: ori r0,r0,255
0x603638e4: and r14,r14,r0
0x603638e8: or r14,r15,r14
0x603638ec: std r14,32(r27)
0x603638f0: .long 0x0
0x603638f4: .long 0x0
0x603638f8: .long 0x0
0x603638fc: .long 0x0
0x60363900: .long 0x0
0x60363904: .long 0x0
0x60363908: .long 0x0
next prev parent reply other threads:[~2014-05-13 21:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 20:56 [Qemu-devel] Bug in PPC TCG for rlwimi ? Tom Musta
2014-05-13 21:09 ` Peter Maydell
2014-05-13 21:11 ` Richard Henderson
2014-05-13 21:32 ` Tom Musta [this message]
2014-05-13 21:40 ` Richard Henderson
2014-05-13 21:59 ` Tom Musta
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=53728F74.1000302@gmail.com \
--to=tommusta@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).