More macro processing weirdness

Andrew E. Mileski andrewm@netwinder.org
Thu Oct 12 12:14:00 GMT 2000


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/


More information about the Binutils mailing list