This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

more than 10 operands in `asm'


Hope this isn't a FAQ...

I suppose we've all seen the "more than 10 operands in `asm'" error
message from time to time.

How about upping the limit from 10 to something more reasonable?

On Alpha we have 32 each of integer and float registers.  On ARM we
can run out with a single instruction!:

     U32 a,b,c,d,e,f,g,h,i, *p;

     asm ( "ldmia %0!, { %2,%3,%4,%5,%6,%7,%8,%9,%10 }"
         : "=r"(p)
         : "0"(p), "r"(a), "r"(b), "r"(c), "r"(d), "r"(e), "r"(f), "r"(g)
           , "r"(h), "r"(i)
         : "memory"
         );

A limit of 10 often restricts inline ASM to trivial snippets of code,
especially as in & out registers get counted twice.  The patch is
probably a one-liner somewhere.

Rob.


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