diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-05-19 04:51:55 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-05-27 12:52:41 -0700 |
commit | 9a427c2c3bbce8d365d78f7e09f45cd9c6553a13 (patch) | |
tree | c7c389ff0af4e503b758bc74b149aca36c6a44d2 | |
parent | d33f0aaa927d9acc1433e073aabfd72f4ac55945 (diff) | |
download | gcc-9a427c2c3bbce8d365d78f7e09f45cd9c6553a13.tar.gz |
Verify that x87/MMX/SSE/AVX is off for -miamcu
Intel MCU doesn't support x87/MMX/SSE/AVX. We should verify that they
aren't turned on when -miamcu is used.
* config/i386/i386.c (ix86_option_override_internal): Issue an
error if x87, MMX, SSE or AVX is turned on when -miamcu is used.
-rw-r--r-- | gcc/config/i386/i386.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d41ae7eb5b6..ffaf3b9f245 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3694,6 +3694,20 @@ ix86_option_override_internal (bool main_args_p, break; } + if (TARGET_IAMCU_P (opts->x_target_flags)) + { + /* Verify that x87/MMX/SSE/AVX is off for -miamcu. */ + if (TARGET_80387_P (opts->x_target_flags)) + sorry ("X87 FPU isn%'t supported in Intel MCU psABI"); + else if ((opts->x_ix86_isa_flags & (OPTION_MASK_ISA_MMX + | OPTION_MASK_ISA_SSE + | OPTION_MASK_ISA_AVX))) + sorry ("%s isn%'t supported in Intel MCU psABI", + TARGET_MMX_P (opts->x_ix86_isa_flags) + ? "MMX" + : TARGET_SSE_P (opts->x_ix86_isa_flags) ? "SSE" : "AVX"); + } + if (!strcmp (opts->x_ix86_arch_string, "generic")) error ("generic CPU can be used only for %stune=%s %s", prefix, suffix, sw); |