This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: m68k call_value insn


Andreas Schwab wrote:
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.

I thought that pattern was meant to do something like this:


	jsr	%1
	move.l	%%d0,%0

--
 // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html




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