Commit aa941a60 by Uros Bizjak Committed by Richard Henderson

i386.c (ix86_function_arg_regno_p): Add MMX_REGNO_P for TARGET_MMX.

2005-06-16  Uros Bizjak  <uros@kss-loka.si>

        * config/i386/i386.c (ix86_function_arg_regno_p): Add MMX_REGNO_P
        for TARGET_MMX.  Use MMX_REGPARM_MAX and SSE_REGPARM_MAX for MMX
        and SSE registers to determine if regno is valid.
        (ix86_function_value_regno_p): Depend FIRST_FLOAT_REG on
        TARGET_FLOAT_RETURNS_IN_80387 also for TARGET_64BIT. Clean up.

From-SVN: r101179
parent 99e6bdda
2005-06-19 Uros Bizjak <uros@kss-loka.si>
* config/i386/i386.c (ix86_function_arg_regno_p): Add MMX_REGNO_P
for TARGET_MMX. Use MMX_REGPARM_MAX and SSE_REGPARM_MAX for MMX
and SSE registers to determine if regno is valid.
(ix86_function_value_regno_p): Depend FIRST_FLOAT_REG on
TARGET_FLOAT_RETURNS_IN_80387 also for TARGET_64BIT. Clean up.
2005-06-18 Richard Henderson <rth@redhat.com> 2005-06-18 Richard Henderson <rth@redhat.com>
* tree-complex.c (init_dont_simulate_again): Clear DONT_SIMULATE_AGAIN * tree-complex.c (init_dont_simulate_again): Clear DONT_SIMULATE_AGAIN
......
...@@ -2047,8 +2047,13 @@ ix86_function_arg_regno_p (int regno) ...@@ -2047,8 +2047,13 @@ ix86_function_arg_regno_p (int regno)
int i; int i;
if (!TARGET_64BIT) if (!TARGET_64BIT)
return (regno < REGPARM_MAX return (regno < REGPARM_MAX
|| (TARGET_SSE && SSE_REGNO_P (regno) && !fixed_regs[regno])); || (TARGET_MMX && MMX_REGNO_P (regno)
if (SSE_REGNO_P (regno) && TARGET_SSE) && (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; 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)
...@@ -3153,16 +3158,16 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type) ...@@ -3153,16 +3158,16 @@ 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 (!TARGET_64BIT) if (regno == 0
{ || (regno == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387)
return ((regno) == 0 || (regno == FIRST_SSE_REG && TARGET_SSE))
|| ((regno) == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387) return true;
|| ((regno) == FIRST_MMX_REG && TARGET_MMX)
|| ((regno) == FIRST_SSE_REG && TARGET_SSE)); if (!TARGET_64BIT
} && (regno == FIRST_MMX_REG && TARGET_MMX))
return ((regno) == 0 || (regno) == FIRST_FLOAT_REG return true;
|| ((regno) == FIRST_SSE_REG && TARGET_SSE)
|| ((regno) == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387)); 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