From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson To: law@cygnus.com Cc: Marc Lehmann , egcs@cygnus.com Subject: Re: question regarding asm() Date: Thu, 16 Oct 1997 08:31:00 -0000 Message-id: <19971016013930.22185@dot.cygnus.com> References: <13876.876974734@hurl.cygnus.com> X-SW-Source: 1997-10/msg00643.html On Wed, Oct 15, 1997 at 10:05:34PM -0600, Jeffrey A Law wrote: > > > Clobber just means that GCC cannot make assumptions about the > > >register after the call, not before. > > > > That's what I expected, but the docs seems to sugest otherwise.. > Why do you think that? "The input operands are guaranteed not to use any of the clobbered registers, and neither will the output operands' addresses, so you can read and write the clobbered registers as many times as you like." That from 'info gcc "c ext" "extended asm"'. > However, on some ports, when there aren't enough registers, GCC can't do > this, Yeah, well, that's the breaks. > and in some cases it can't even tell you that it did something > wrong. This is especially important on machines with weird register > sets like the x86. Ouch. > This is _precisely_ why I've told folks in the past to avoid sucking > up all the registers for asms -- particularly Linux folk who seem to > write bigger asms than anyone. It would be nice, and probably solve some of these problems with the strange and wonderous asm blocks we write, if you could separately list regs clobbered at input/output/both. And while I'm wishing, more than 10 arguments, which is feasable when all that's needed are memory and immediate constraints. And being able to specify immediate inputs to file scope asm blocks so I can easily write assembly thunks that use offsetof to communicate with C structs. r~