This is the mail archive of the binutils@sources.redhat.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]

More macro processing weirdness


It seems expressions with whitespace padding are interpreted as
separate args.  This seems pretty strange to me.

This example has two identical expressions.  The first assembles fine,
but the second fails on Red Hat's x86 binutils-2.9.5.0.22-6.

	.macro  _OUTL   value, port
		movl    $(\value), %eax
		movw    $(\port), %dx
		outl    %eax, %dx
	.endm

	_OUTL	(0x80000000|(0<<16)|((18-11)<<11)|(0<<8)|(0x58&0xfc)), 0x0cf8
	_OUTL (0x80000000 | ( 0  << 16) | ((  18  - 11) << 11) | (  0  << 8) |
(  0x58  & 0xfc)), 0x0cf8

test.s: Assembler messages:
test.s:8: Error: too many positional arguments

--
Andrew E. Mileski - Software Engineer
Rebel.com  http://www.rebel.com/

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