qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Bug in PPC TCG for rlwimi ?


From: Tom Musta
Subject: Re: [Qemu-devel] Bug in PPC TCG for rlwimi ?
Date: Tue, 13 May 2014 16:32:36 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]