This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: m68k call_value insn
- From: Andreas Schwab <schwab at suse dot de>
- To: Bernardo Innocenti <bernie at develer dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>,Richard Henderson <rth at redhat dot com>, Gunther Nikl <gni at gecko dot de>
- Date: Mon, 15 Sep 2003 09:55:10 +0200
- Subject: Re: m68k call_value insn
- References: <3F64F6A2.5030204@develer.com>
Bernardo Innocenti <bernie@develer.com> writes:
> Hello,
>
> it seems the call_value insn in the m68k back-end isn't
> really doing what its specification says:
>
> `call_value'
> Subroutine call instruction returning a value. Operand 0 is the
> hard register in which the value is returned. There are three more
> operands, the same as the three operands of the `call' instruction
> (but with numbers increased by one).
>
> Subroutines that return `BLKmode' objects use the `call' insn.
>
>
> The code in m68k.md seems to be ignoring operand 0, thus leaving the
> return value in %d0 (or %fp0 for floats), which is apparently invalid:
Since the register for the return value is fixed, there is no point in
looking at operand 0.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."