If I put the labels in the macro, then I will get a duplicate label (for 
the macro will be expanded out, and have multiple labels.

I have worked around this, by having the labels passed in, but would like 
to not have to do that.

Or is there something I am missing about scope on macros?

On Sunday, June 8, 2014 12:32:50 PM UTC-4, Charles Kerr wrote:
>
> I have been trying how to find a way to do a relative branch (from the 
> current instruction pointer) for a branch.
>
>
> I have something like this:
>
> .macro SETBIT
> .mparam reg,bit,lab,lab2
>         QBBC lab, BYTE_VALUE,bit
>         SET r30, 14
>         QBA lab2
> lab:
> CLR r30,14
> lab2:
>
>
>
>
> What I would like to do is on the first QBBC, provide a relative label (so 
> I don't have to pass a unique name to the macro.  The same for QBA lab2.
>
> On a PIC one can do a $+#, where $ is the current instruction pointer, and 
> the # is is the number of instructions to jump forward (or backward if 
> negative).  Is something like this possible?
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to