qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [Consult] tilegx: Is it a qemu's system bug?


From: Chen Gang
Subject: [Qemu-devel] [Consult] tilegx: Is it a qemu's system bug?
Date: Sat, 25 Apr 2015 23:12:02 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hello All:

I want to consult an issue I met below for the latest master branch, is
it a qemu's bug? (it is about ctz/cnttz instruction for tilegx)

  OP: 
   ld_i32 tmp0,env,$0xfffffffffffffffc
   movi_i32 tmp1,$0x0
   brcond_i32 tmp0,tmp1,ne,$L0
   movi_i64 tmp3,$0x0                    /* Initialize tmp3 */
   set_label $L1 
   shr_i64 tmp2,r2,tmp3
   movi_i64 tmp4,$0x1
   and_i64 tmp2,tmp2,tmp4
   movi_i64 tmp4,$0x1
   brcond_i64 tmp2,tmp4,eq,$L2
   movi_i64 tmp4,$0x1
   add_i64 tmp3,tmp3,tmp4
   movi_i64 tmp4,$0x40
   brcond_i64 tmp3,tmp4,ne,$L1
   set_label $L2 
   mov_i64 tmp4,tmp3
   set_label $L0 
   exit_tb $0x7ffff2690013
  
  OP after optimization and liveness analysis:
   ld_i32 tmp0,env,$0xfffffffffffffffc
   movi_i32 tmp1,$0x0
   brcond_i32 tmp0,tmp1,ne,$L0
   set_label $L1                         /* Skip tmp3 initialization */
   shr_i64 tmp2,r2,tmp3                  /* So I guess, qemu can not find tmp3 
in shr_i64, so report assertion */
   movi_i64 tmp4,$0x1
   and_i64 tmp2,tmp2,tmp4
   movi_i64 tmp4,$0x1
   brcond_i64 tmp2,tmp4,eq,$L2
   movi_i64 tmp4,$0x1
   add_i64 tmp3,tmp3,tmp4
   movi_i64 tmp4,$0x40
   brcond_i64 tmp3,tmp4,ne,$L1
   set_label $L2 
   set_label $L0 
   exit_tb $0x7ffff2690013
  
  /* begin: I add related printing log in tcg_reg_alloc_op() before assertion */
  opc == 12 /* ld_i32 */
  ===============ts->val_type: 1========================.
  opc == 5  /* movi_i32 */
  opc == 34 /* brcond_i32 */
  ===============ts->val_type: 1========================.
  ===============ts->val_type: 3========================.
  opc == 1  /* set_label */
  opc == 84 /* shr_i64 */
  ============opc = INDEX_op_shr_i64 ====================
  ===============ts->val_type: 2========================.
  ===============ts->val_type: 0========================.
  /* end:   I add related printing log in tcg_reg_alloc_op() before assertion */

  qemu-tilegx: /upstream/qemu/tcg/tcg.c:1982: tcg_reg_alloc_op: Assertion 
`ts->val_type == 1' failed.


Welcome any ideas, suggestions and completions.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed



reply via email to

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