This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

filling delay slots with branches


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.





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]