aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <uros@kss-loka.si>2005-06-19 01:26:50 -0700
committerRichard Henderson <rth@gcc.gnu.org>2005-06-19 01:26:50 -0700
commitaa941a60d7d6f3f8ebfa84731d89b701ff2527be (patch)
tree1d4bf51e9208a4ea8f1b2863b5e8700cb79d716c /gcc/config
parent99e6bdda90bc96029f692df81028dcdaa65e3dea (diff)
downloadgcc-aa941a60d7d6f3f8ebfa84731d89b701ff2527be.zip
gcc-aa941a60d7d6f3f8ebfa84731d89b701ff2527be.tar.gz
gcc-aa941a60d7d6f3f8ebfa84731d89b701ff2527be.tar.bz2
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
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6a5dbdf..d2484cd 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2047,8 +2047,13 @@ ix86_function_arg_regno_p (int regno)
int i;
if (!TARGET_64BIT)
return (regno < REGPARM_MAX
- || (TARGET_SSE && SSE_REGNO_P (regno) && !fixed_regs[regno]));
- if (SSE_REGNO_P (regno) && TARGET_SSE)
+ || (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;
/* RAX is used as hidden argument to va_arg functions. */
if (!regno)
@@ -3153,16 +3158,16 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
bool
ix86_function_value_regno_p (int regno)
{
- if (!TARGET_64BIT)
- {
- return ((regno) == 0
- || ((regno) == FIRST_FLOAT_REG && TARGET_FLOAT_RETURNS_IN_80387)
- || ((regno) == FIRST_MMX_REG && TARGET_MMX)
- || ((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));
+ 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;
+
+ return false;
}
/* Define how to find the value returned by a function.