On 04/25/2015 05:12 AM, Chen Gang wrote: > 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
You can't keep temporaries live across basic blocks. That is, across set_label, br, or brcond. In that case you'd have to use tcg_new_local_temp() instead. That said, you shouldn't open-code ctz but instead use a helper function and use ctz64(). r~