vc4asm icon indicating copy to clipboard operation
vc4asm copied to clipboard

Concerns regarding documentation addendum about branch distance

Open LoekHabets opened this issue 1 year ago • 0 comments

When trying to use the dynamic semaphore acquisition snippet from the "Addendum to the Broadcom VideoCore IV documentation" page I encountered two problems. The first is this: mul24 ra31, r0, 3*8 cannot be encoded since 24 doesn't fit in the small immediates field, so an extra mov or ldi is needed before this line.

The second problem might be of my own doing, but so far it has appeared to me that it's only ever possible to make these 'rapid branches' if the conditions for the two branches are mutually exclusive. I've tried a few changes to the code provided in the documentation, but no matter what I do it simply crashes for me. Putting the second branch on the first line of each of the sub-blocks (and changing 3*8 to 4*8) fixes it for me. I have succesfully used a rapid branch with mutually exclusive conditions elsewhere, though.

LoekHabets avatar Feb 18 '24 17:02 LoekHabets