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: How to check for MMX registers in function call?


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~


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