This is the mail archive of the
mailing list for the GCC project.
Re: patch to add #pushdef, #popdef to cccp,cpplib
- To: Bill Currie <bcurrie at tssc dot co dot nz>
- Subject: Re: patch to add #pushdef, #popdef to cccp,cpplib
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 15 Jul 1998 20:28:50 -0600
- cc: Chuck Blake <cblake at lcs dot mit dot edu>, Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <35AD5BA1.5B32@tssc.co.nz>you write:
> Jeffrey A Law wrote:
> > Often they do not have a choice -- consider what's happened with asms
> > that have drifted into system include files. And in the process of
> > getting wider exposure, they have uncovered fundamental flaws in the
> > design of the asm extensions.
> This is pure curiosity: is an example of these flaws the problem with
> (eg) `asm ("foo %1,%0"::"r","r");' in C++ (parse error from the `::')?
I hadn't thought of that one :-)
There's no clean way to say things like:
* I need to clobber a register of a certain class (we can only clobber
* I need a particular value to appear in an input register at the
start of the asm, then the register is available as a scratch
register for the asm. You can fake this with a dummy output
operand, but there should be a cleaner way to describe this since
it's a very common operation.
* Fundamental incompatabilities between SMALL_REGISTER_CLASS machines
and clobbering specific registers.
* No way to expose what register classes correspond to constraint
letters for input/output operands.
* How do you describe to an asm-user how many registers they are
allowed to use in an asm. Sometimes it is not obvious that
a particular operand may need multiple registers (to satisfy
reloading). Thus it is hard for a user to write a correct asms.
There's more, but thats what's come up within the last year.
> Now, I'm not meaning to argue with you, but I thought the extended asm
> statements were pretty good. Mind you, getting the constraints and the
> operand modifiers (eg %k0) right is a PITA, especially when they're
> pooly documented. So really, just what are the fundamental flaws in the
> dedisng of the asm extensions? Maybe they can be fixed (yeah, right. I
> can imagine the caos).
asms are probably the best designed & implemented extension in the
compiler, yet we still have major problems with them.
Most of those problems can be fixed. We'll probably end up doing it
at some point.