This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GASP really obsolete?
On Friday 14 June 2002 18:01, Nick Clifton wrote:
> Hi Frank,
>
> > Thank you for your patch. But it still isn't the working solution.
> > Imagine the following case where we have a loop:
> >
> > REPEAT /* begin loop */
> > IFZ varialbe_a, $0
> > CONT /* continue loop if a is zero */
> > ENDIF
> > IFZ variable_a, $1
> > BREAK /* abort loop if a is one */
> > ENDIF
> > /* do something with a */
> > ENDR
> >
> > We cannot implement REPEAT/CONT/BREAK/ENDR with
> > {push/pop}_macro_labels because we the IFZ statements had open an
> > additional layer of local labels which are unaccessible then from
> > CONT/BREAK.
>
> True, but you do not need the macro labels to implement REPEAT, CONT,
> BREAK and ENDR. You can just use ordinary local labels like this:
>
> .macro REPEAT
> 3:
> .endm
>
> .macro CONT
> b 3b
> .endm
>
> .macro BREAK
> b 4f
> .endm
>
> .macro ENDR
> 4:
> .endm
>
> (You do not need to break out of more than one enclosing loop at a
> time do you ?)
Yes, but I have nested loops.
Anyway, I deceided to rewrite the old code, about 1000 lines assembler, not
too much work. The reason is that I don't want to specify, that L4Linux (the
(project I talked about which depends on GASP) needs binutils less than
version abc or bintuils greater than version xyz.
Frank
--
Frank Mehnert
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## E-Mail: fm3@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/~fm3 ##