[Tremor] question on asm syntax in arm_asm.h
Nicolas Pitre
nico at cam.org
Tue Feb 3 17:16:53 PST 2009
On Tue, 3 Feb 2009, Ethan Bordeaux wrote:
> I think it's working fine. However, I couldn't figure it out for
> lsp_loop_asm() - the problem is the branching instructions which have a
> different syntax between the two assemblers. I thought I understood how to
> translate the gcc operations (the value after the branch operation is an
> offset from the current instruction with every instruction taking the same
> amount of memory), but after closer inspection the branches seem to go to
> strange places, so now I'm not so sure. For instance if the last "beq
> 2f" is telling the processor to jump 31 opcodes after the current
> instruction it will end up outside the declared asm segment, which seems
> really weird to me.
Those are relative labels. What "2f" means is to branch (f)orward to
the next numerical label "2". Same for "1b", that means branching
(b)ackward to the previous label "1".
Nicolas
More information about the Tremor
mailing list