This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: string concatenation in gas
- To: Geoff Berry <geoffb at bops dot com>
- Subject: Re: string concatenation in gas
- From: Timothy Wall <twall at domesolutions dot com>
- Date: Fri, 14 Apr 2000 17:57:03 -0400
- CC: binutils at sourceware dot cygnus dot com
- Organization: Dome Solutions
- References: <3D71CCC526F1D311A72600902773EC2104AD34@cascabella.bops.com>
I implemented a .eval/.asg for the tic54x target (which save evaluated
quantities as strings which then get interpreted by the assembler); I actually
had to have this functionality for that target's compatibility. Actually, I
think the ".break" was local to that target as well...
T.
Geoff Berry wrote:
> Nice try, but it still doesn't work. This expands to
>
> push rCOUNT
> push rCOUNT
> ...
>
> Any other ideas?
>
> -----Original Message-----
> From: Timothy Wall [mailto:twall@domesolutions.com]
> Sent: Friday, April 14, 2000 5:20 PM
> To: Geoff Berry
> Cc: binutils@sourceware.cygnus.com
> Subject: Re: string concatenation in gas
>
> You might be able to get by with a repeat loop calling the macro which does
> the
> concatenation, e.g.
>
> .MACRO PUSH REGNO
> push r\REGNO
> .ENDM
>
> .set START 0
> .set END 5
> .set COUNT, START
> .rept
> PUSH COUNT
> .set COUNT, COUNT + 1
> .break COUNT == END
> .endr
>
> Geoff Berry wrote:
>
> > .IRP doesn't evaluate strings either (at least I can't figure out how to
> > make it). For example, if I do:
> >
> > .IRP i, 0, 0+1, 0+1+1
> > push r\i
> > .ENDR
> >
> > This expands to:
> >
> > r0
> > r0+1
> > r0+1+1
> >
> > when I want
> >
> > r0
> > r1
> > r2
> >
> > I'm pretty much convinced that what I'm trying to do isn't possible with
> gas
> > (not that I really expect it to be).
> >
> > -----Original Message-----
> > From: Timothy Wall [mailto:twall@domesolutions.com]
> > Sent: Thursday, April 13, 2000 4:54 PM
> > To: binutils@sourceware.cygnus.com
> > Cc: geoffb@bops.com
> > Subject: Re: string concatenation in gas
> >
> > Geoff,
> >
> > What you really want is string evaluation. Look at ".irp" and see if
> > that does what you want.
> >
> > T.