structured assembler for gnu as ?

nick clifton nickc@redhat.com
Tue Apr 9 15:33:00 GMT 2013


Hi Bill,

> Is there a standard implementation of "structured assembler" macros for gas?
> _if, _else, _endif, _do, _while and similar? (which in general would
> end up being converted to appropriate single branch instructions.)

I am not quite sure what you mean.  Perhaps you could provide an example 
of what you expect these macros would do.

The assembler does support conditional assembly via the .if, .else, 
.elseif and .endif pseudo ops.  Are these the sort of things that you 
are looking for ?

Loops are another matter.  There are no assembler pseudo ops that 
magically transform into target specific test and branch instructions. 
There is the .rept ... .endr sequence for replicating blocks of code, 
bit I doubt that that is what you want.

Cheers
   Nick




More information about the Binutils mailing list