On 03/05/2013 08:00 PM, Alan Lehotsky wrote:
Am I correct in my understanding that you can't put a branch instruction in the 
delay slot of a branch instruction?

Semantically, the HW I'm looking at annuls the branch in the delay slot if the 
first branch is taken, but any other instructions are not annulled; but it 
appears that there's no way to describe this in the define_delay() and it looks 
to me like the delay-slot for the instruction in the delay slot won't get 
filled properly either.

e.g.
         cmpi $r1,0
        jeq  $1
            jlt  $2
              jmp  $3
                nop

would be a 3-way branch  on zero, neg or  (by elimination) positive values with 
 the indented instructions being
in a branch delay slot.
I'm not aware of any way to describe it to the current delay slot scheduler; I looked at it briefly eons ago as the PA allows branches in delay slots, but gave up -- for the PA at least the semantics weren't very useful.

jeff

Reply via email to