This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to check for MMX registers in function call?
- From: Richard Henderson <rth at redhat dot com>
- To: Uros Bizjak <uros dot bizjak at kss-loka dot si>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 10 Jun 2005 13:31:18 -0700
- Subject: Re: How to check for MMX registers in function call?
- References: <1118392736.42a951a07bf77@ssl.kss-loka.si>
On Fri, Jun 10, 2005 at 10:38:56AM +0200, Uros Bizjak wrote:
> To properly implement this switching scheme, I would like to ask, what is the
> proper way to check if MMX register is used as a parameter passing register in
> the call
CALL_INSN_FUNCTION_USAGE
> and how to check if MMX register is used to hold return value.
SET_DEST of the CALL.
> I would like to obtain the same information in function itself to
> properly set MODE_ENTRY and MODE_EXIT in LCM pass.
For MODE_EXIT, current_function_return_rtx.
For MODE_ENTRY, I think you have to walk DECL_ARGUMENTS of
current_function_decl looking at DECL_INCOMING_RTL. You might
be able to get away with something like
MODE_ENTRY = (current_function_args_info.maybe_vaarg
|| current_function_args_info.mmx_nregs == MMX_REGPARM_MAX
? I387 : MMX)
but I'm not sure that's the best thing to rely on.
r~