This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

string concatenation in gas


Is there any way to get string concatenation in gas?  Let's say I want to
write a macro that saves a range of registers (assuming push is a valid
instruction that takes a single register argument):

.MACRO	pushRegs	From,To
	push		r\From
	.IF \To-\From
	pushRegs	"(\From+1)",\To
	.ENDIF
.ENDM

This doesn't work because the \From value is not evaluated and I end up
with:

push	r(0+1)
push	r((0+1) + 1)
...

instead of

push	r1
push	r2
...

This kind of thing works in gasp, but I would like to avoid using gasp if
possible.

-- 
Geoff Berry

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]