GASP really obsolete?
Frank Mehnert
fm3@os.inf.tu-dresden.de
Wed Jun 12 07:38:00 GMT 2002
On Wednesday 12 June 2002 15:59, you wrote:
> > IFNZ variable_a, $0
> > call handle_case_a_not_null
> > ELSE
> > call handle_case_a_is_null
> > ENDIF
> >
> > [...]
>
> Can you use local labels ? ie how about this:
Unfortunately, not.
> .macro IFNZ val1, val2
> cmpl \val1, \val2
> jnz 1f
> .endm
>
> .macro ELSE
> jmp 2f
> 1:
> .endm
>
> .macro ENDIF
> 2:
> .endm
>
> This assumes that you do not need the icount and ival counters outside
> of the macros, but I think that it should work.
What about nesting of IFNZ/ELSE/ENDIF?
IFNZ variable_a, $0
IFNZ variable_b, $1
call handle_case_b_is_not_one
ELSE
call handle_case_b_is_not_one
ENDIF
ENDIF
icount and ival has to be exported to handle excactly this case.
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 ##
More information about the Binutils
mailing list