mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
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: r121516
This commit is contained in:
committed by
Mike Stump
parent
19beae8ab5
commit
c98f628e70
@@ -1,3 +1,12 @@
|
||||
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 Simon Martin <simartin@users.sourceforge.net>
|
||||
|
||||
PR c++/28266
|
||||
|
||||
@@ -2660,15 +2660,29 @@ ix86_function_arg_regno_p (int regno)
|
||||
{
|
||||
int i;
|
||||
if (!TARGET_64BIT)
|
||||
return (regno < REGPARM_MAX
|
||||
|| (TARGET_MMX && MMX_REGNO_P (regno)
|
||||
&& (regno < FIRST_MMX_REG + MMX_REGPARM_MAX))
|
||||
|| (TARGET_SSE && SSE_REGNO_P (regno)
|
||||
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)));
|
||||
{
|
||||
if (TARGET_MACHO)
|
||||
return (regno < REGPARM_MAX
|
||||
|| (TARGET_SSE && SSE_REGNO_P (regno) && !fixed_regs[regno]));
|
||||
else
|
||||
return (regno < REGPARM_MAX
|
||||
|| (TARGET_MMX && MMX_REGNO_P (regno)
|
||||
&& (regno < FIRST_MMX_REG + MMX_REGPARM_MAX))
|
||||
|| (TARGET_SSE && SSE_REGNO_P (regno)
|
||||
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX)));
|
||||
}
|
||||
|
||||
if (TARGET_SSE && SSE_REGNO_P (regno)
|
||||
&& (regno < FIRST_SSE_REG + SSE_REGPARM_MAX))
|
||||
return true;
|
||||
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. */
|
||||
if (!regno)
|
||||
return true;
|
||||
@@ -3813,16 +3827,31 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
|
||||
bool
|
||||
ix86_function_value_regno_p (int regno)
|
||||
{
|
||||
if (regno == 0
|
||||
|| (regno == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387)
|
||||
|| (regno == FIRST_SSE_REG && TARGET_SSE))
|
||||
return true;
|
||||
if (TARGET_MACHO)
|
||||
{
|
||||
if (!TARGET_64BIT)
|
||||
{
|
||||
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
|
||||
&& (regno == FIRST_MMX_REG && TARGET_MMX))
|
||||
return true;
|
||||
if (!TARGET_64BIT
|
||||
&& (regno == FIRST_MMX_REG && TARGET_MMX))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Define how to find the value returned by a function.
|
||||
|
||||
Reference in New Issue
Block a user