Commit 88c6f101 by Hui-May Chang Committed by Mike Stump

revert: i386.c (ix86_function_arg_regno_p): Put back the code before the…

revert: i386.c (ix86_function_arg_regno_p): Put back the code before the following patch under TARGET_MACHO.

2007-02-02  Hui-May Chang  <hm.chang@apple.com>

	Revert for x86 darwin:
	2005-06-19  Uros Bizjak  <uros@kss-loka.si>

	* config/i386/i386.c (ix86_function_arg_regno_p): Put back the
	code before the following patch under TARGET_MACHO.
	(ix86_function_value_regno_p): Likewise.

From-SVN: r121515
parent b4f7c767
2007-02-02 Hui-May Chang <hm.chang@apple.com>
Revert for x86 darwin:
2005-06-19 Uros Bizjak <uros@kss-loka.si>
* config/i386/i386.c (ix86_function_arg_regno_p): Put back the
code before the following patch under TARGET_MACHO.
(ix86_function_value_regno_p): Likewise.
2007-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2007-02-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fold-const.c (negate_expr_p, fold_negate_expr): Handle * fold-const.c (negate_expr_p, fold_negate_expr): Handle
......
...@@ -2902,15 +2902,29 @@ ix86_function_arg_regno_p (int regno) ...@@ -2902,15 +2902,29 @@ ix86_function_arg_regno_p (int regno)
{ {
int i; int i;
if (!TARGET_64BIT) if (!TARGET_64BIT)
return (regno < REGPARM_MAX {
|| (TARGET_MMX && MMX_REGNO_P (regno) if (TARGET_MACHO)
&& (regno < FIRST_MMX_REG + MMX_REGPARM_MAX)) return (regno < REGPARM_MAX
|| (TARGET_SSE && SSE_REGNO_P (regno) || (TARGET_SSE && SSE_REGNO_P (regno) && !fixed_regs[regno]));
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX))); else
return (regno < REGPARM_MAX
if (TARGET_SSE && SSE_REGNO_P (regno) || (TARGET_MMX && MMX_REGNO_P (regno)
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)) && (regno < FIRST_MMX_REG + MMX_REGPARM_MAX))
return true; || (TARGET_SSE && SSE_REGNO_P (regno)
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)));
}
if (TARGET_MACHO)
{
if (SSE_REGNO_P (regno) && TARGET_SSE)
return true;
}
else
{
if (TARGET_SSE && SSE_REGNO_P (regno)
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX))
return true;
}
/* RAX is used as hidden argument to va_arg functions. */ /* RAX is used as hidden argument to va_arg functions. */
if (!regno) if (!regno)
return true; return true;
...@@ -4014,16 +4028,31 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type) ...@@ -4014,16 +4028,31 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
bool bool
ix86_function_value_regno_p (int regno) ix86_function_value_regno_p (int regno)
{ {
if (regno == 0 if (TARGET_MACHO)
|| (regno == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387) {
|| (regno == FIRST_SSE_REG && TARGET_SSE)) if (!TARGET_64BIT)
return true; {
return ((regno) == 0
|| ((regno) == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387)
|| ((regno) == FIRST_SSE_REG && TARGET_SSE));
}
return ((regno) == 0 || (regno) == FIRST_FLOAT_REG
|| ((regno) == FIRST_SSE_REG && TARGET_SSE)
|| ((regno) == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387));
}
else
{
if (regno == 0
|| (regno == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387)
|| (regno == FIRST_SSE_REG && TARGET_SSE))
return true;
if (!TARGET_64BIT if (!TARGET_64BIT
&& (regno == FIRST_MMX_REG && TARGET_MMX)) && (regno == FIRST_MMX_REG && TARGET_MMX))
return true; return true;
return false; return false;
}
} }
/* Define how to find the value returned by a function. /* Define how to find the value returned by a function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment