This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
filling delay slots with branches
- From: Alan Lehotsky <alehotsky at me dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 05 Mar 2013 22:00:48 -0500
- Subject: filling delay slots with branches
- Reply-to: apl at alum dot mit dot edu
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.