more than 10 operands in `asm'

Robert Harley
Wed Nov 4 02:44:00 GMT 1998

Yes, my example was silly (and I did have stm and changed it to ldm
just before posting for no particular reason - with brain switched off).

In "real code", I would frequently like to play with most of the regs
that ought to be available (12 on ARM: r0-r9, ip, lr).  But GCC barfs
long before then.  Five registers as inputs and outputs and you're

Sometimes a partial solution is to use: register abc asm("r5"); (even
imposes order for ldm/stm).

I do write separate ASM files but it would be nicer to have #ifdef bla
... #else ... #endif than to have bunches of files with different
builds on different machines.

I'm sure 10 was picked as an arbitrary number deemed suitable long ago
whereas 20 might be more suitable for ARM, 40 for Alpha etc. Or even
more if you allow for floating point regs.

Why have an arbitrary limitation that really blocks people and could
trivially be removed?


More information about the Gcc-bugs mailing list