aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2013-12-06 18:16:52 +0100
committerUros Bizjak <uros@gcc.gnu.org>2013-12-06 18:16:52 +0100
commit6b3d1113456722cb2b68a83d5ecdbca748a16055 (patch)
treec9941486eb9e86b69f4880985a27cf20afd489c7 /gcc/config/i386/i386.c
parent3fa2ccb43019e7989e0264da177337709a9dfba5 (diff)
downloadgcc-6b3d1113456722cb2b68a83d5ecdbca748a16055.zip
gcc-6b3d1113456722cb2b68a83d5ecdbca748a16055.tar.gz
gcc-6b3d1113456722cb2b68a83d5ecdbca748a16055.tar.bz2
re PR target/59405 (Incorrect FP<->MMX transition during call/ret)
PR target/59405 * config/i386/i386.c (type_natural_mode): Properly handle size 8 for !TARGET_64BIT. testsuite/ChangeLog: PR target/59405 * gcc.target/i386/pr59405.c: New test. From-SVN: r205753
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r--gcc/config/i386/i386.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 382f8fb..c742659 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -6172,7 +6172,8 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum)
}
return TYPE_MODE (type);
}
- else if ((size == 8 || size == 16) && !TARGET_SSE)
+ else if (((size == 8 && TARGET_64BIT) || size == 16)
+ && !TARGET_SSE)
{
static bool warnedsse;
@@ -6184,10 +6185,21 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum)
warning (0, "SSE vector argument without SSE "
"enabled changes the ABI");
}
- return mode;
}
- else
- return mode;
+ else if ((size == 8 && !TARGET_64BIT) && !TARGET_MMX)
+ {
+ static bool warnedmmx;
+
+ if (cum
+ && !warnedmmx
+ && cum->warn_mmx)
+ {
+ warnedmmx = true;
+ warning (0, "MMX vector argument without MMX "
+ "enabled changes the ABI");
+ }
+ }
+ return mode;
}
gcc_unreachable ();