will multi-register returns get fixed?

David Mosberger davidm@napali.hpl.hp.com
Fri Jun 6 21:02:00 GMT 2003


>>>>> On Fri, 6 Jun 2003 22:45:00 +0200 (CEST), Michael Matz <matz@suse.de> said:

  Michael> Hi, On Fri, 6 Jun 2003, David Mosberger wrote:

  >> However, I don't think the problem is fixed in general.  If I try
  >> to return a pair of 32-bit "long" values, I get:

  Michael> I suppose you mean a struct by value?  Well, the x86 ABI
  Michael> defines to return struct by value in caller-provided
  Michael> memory, to which a pointer is passed as first hidden
  Michael> parameter.  _Even_ if such struct is small enough to fit
  Michael> into one or two registers (e.g. even if it contains only
  Michael> one int).

Argh, that's bad.  I assume most RISC platforms would be affected,
too, though, right? (I'm pretty sure Alpha would be affected.)

So, on the platforms that _can_ return (small) structures in
registers, is this something that can be fixed?  Or do the GCC
developers just not care enough about this case?

	--david



More information about the Gcc mailing list