On 09/19/2012 11:30 AM, Peter Maydell wrote: > ...but on the other hand that ought to work for PPC too, so > presumably my analysis is wrong somewhere.
It isn't. It's a target-xtensa bug. > OP: > ---- 0xd0079cff > movi_i32 tmp0,$0xd0079cff > movi_i32 tmp1,$0x2 > movi_i32 tmp2,$0x1 > movi_i32 tmp3,$advance_ccount > call tmp3,$0x0,$0,env,tmp2 > movi_i32 tmp2,$window_check > call tmp2,$0x0,$0,env,tmp0,tmp1 > and_i32 tmp0,ar9,ar8 > movi_i32 tmp1,$0x0 > brcond_i32 tmp0,tmp1,eq,$0x0 > movi_i32 tmp2,$0x0 > brcond_i32 LCOUNT,tmp2,eq,$0x1 > movi_i32 tmp2,$0x1 > sub_i32 LCOUNT,LCOUNT,tmp2 > movi_i32 tmp2,$0xd0079cf2 > mov_i32 pc,tmp2 > goto_tb $0x0 > exit_tb $0x4a116558 > set_label $0x1 > movi_i32 tmp2,$0xd0079d02 > mov_i32 pc,tmp2 > exit_tb $0x0 > set_label $0x0 > movi_i32 tmp2,$0xd0079d1a > mov_i32 pc,tmp2 > goto_tb $0x1 > exit_tb $0x4a116559 > movi_i32 tmp0,$0x0 > brcond_i32 LCOUNT,tmp0,eq,$0x2 > movi_i32 tmp0,$0x1 > sub_i32 LCOUNT,LCOUNT,tmp0 > movi_i32 tmp0,$0xd0079cf2 > mov_i32 pc,tmp0 > goto_tb $0x0 > exit_tb $0x4a116558 > set_label $0x2 > movi_i32 tmp0,$0xd0079d02 > mov_i32 pc,tmp0 > exit_tb $0x0 There are two instances of goto_tb $0 in here. And, amusingly, two checks for LCOUNT. Since there's no disassembler for xtensa, I'll leave it to the maintainer to track down from whence this mistake stems. r~