aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2004-07-10 01:59:12 +0000
committerRichard Henderson <rth@gcc.gnu.org>2004-07-09 18:59:12 -0700
commit78fbfc4bd9e492f69591978f4b15a869b3fa2c9e (patch)
treedc6aa8d928dfb58a2c2e40708e3e5e1953838c5e
parente4d3eef11d6ed460db6aa66fea489bd3e0c9f577 (diff)
downloadgcc-78fbfc4bd9e492f69591978f4b15a869b3fa2c9e.zip
gcc-78fbfc4bd9e492f69591978f4b15a869b3fa2c9e.tar.gz
gcc-78fbfc4bd9e492f69591978f4b15a869b3fa2c9e.tar.bz2
i386.c (init_cumulative_args): Set mmx/sse registers available for use only when TARGET_MMX/_SSE is set...
* config/i386/i386.c (init_cumulative_args): Set mmx/sse registers available for use only when TARGET_MMX/_SSE is set, and check for variable argument function if any register count is non-zero. (function_arg): Correctly suppress repeated warnings for passing SSE vectors are arguments without SSE enabled. (ix86_function_arg_boundary): Without SSE enabled, the use of what would be SSE register modes does no longer influence the alignment. From-SVN: r84431
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/i386/i386.c17
2 files changed, 20 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d99487d..a9ce92c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2004-07-09 Jan Beulich <jbeulich@novell.com>
+
+ * config/i386/i386.c (init_cumulative_args): Set mmx/sse registers
+ available for use only when TARGET_MMX/_SSE is set, and check for
+ variable argument function if any register count is non-zero.
+ (function_arg): Correctly suppress repeated warnings for passing SSE
+ vectors are arguments without SSE enabled.
+ (ix86_function_arg_boundary): Without SSE enabled, the use of what
+ would be SSE register modes does no longer influence the alignment.
+
2004-07-09 Richard Henderson <rth@redhat.com>
* builtins.c (std_gimplify_va_arg_expr): Deny ARGS_GROW_DOWNWARD.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a9ebf21..7d7312c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1921,8 +1921,10 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
cum->nregs = ix86_function_regparm (fntype, fndecl);
else
cum->nregs = ix86_regparm;
- cum->sse_nregs = SSE_REGPARM_MAX;
- cum->mmx_nregs = MMX_REGPARM_MAX;
+ if (TARGET_SSE)
+ cum->sse_nregs = SSE_REGPARM_MAX;
+ if (TARGET_MMX)
+ cum->mmx_nregs = MMX_REGPARM_MAX;
cum->warn_sse = true;
cum->warn_mmx = true;
cum->maybe_vaarg = false;
@@ -1937,13 +1939,12 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
}
}
-
/* Determine if this function has variable arguments. This is
indicated by the last argument being 'void_type_mode' if there
are no variable arguments. If there are variable arguments, then
- we won't pass anything in registers */
+ we won't pass anything in registers in 32-bit mode. */
- if (cum->nregs || !TARGET_MMX || !TARGET_SSE)
+ if (cum->nregs || cum->mmx_nregs || cum->sse_nregs)
{
for (param = (fntype) ? TYPE_ARG_TYPES (fntype) : 0;
param != 0; param = next_param)
@@ -2692,7 +2693,7 @@ function_arg (CUMULATIVE_ARGS *cum, /* current arg information */
case V2DFmode:
if (!type || !AGGREGATE_TYPE_P (type))
{
- if (!TARGET_SSE && !warnedmmx && cum->warn_sse)
+ if (!TARGET_SSE && !warnedsse && cum->warn_sse)
{
warnedsse = true;
warning ("SSE vector argument without SSE enabled "
@@ -2839,7 +2840,9 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
The handling here differs from field_alignment. ICC aligns MMX
arguments to 4 byte boundaries, while structure fields are aligned
to 8 byte boundaries. */
- if (!type)
+ if (!TARGET_SSE)
+ align = PARM_BOUNDARY;
+ else if (!type)
{
if (!SSE_REG_MODE_P (mode))
align = PARM_BOUNDARY;