diff options
author | Chenghua Xu <paul.hua.gm@gmail.com> | 2018-11-07 08:35:54 +0000 |
---|---|---|
committer | Chenghua Xu <paulhua@gcc.gnu.org> | 2018-11-07 08:35:54 +0000 |
commit | 375899d9e47d03f3f2fe6aa6c854ddc855f94d76 (patch) | |
tree | 2999733cfb1a8bba26a48661ebf1723961f10a3f /gcc/config/mips/mips.h | |
parent | 8ae8bad7e558ce916c52e91a4e1879557f287bbc (diff) | |
download | gcc-375899d9e47d03f3f2fe6aa6c854ddc855f94d76.zip gcc-375899d9e47d03f3f2fe6aa6c854ddc855f94d76.tar.gz gcc-375899d9e47d03f3f2fe6aa6c854ddc855f94d76.tar.bz2 |
Add support for Loongson EXT instructions.
gcc/
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
__mips_loongson_ext.
(MIPS_ASE_LOONGSON_EXT_SPEC): New.
(BASE_DRIVER_SELF_SPECS): march=loongson3a implies
-mloongson-ext.
(ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
* config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
<u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
instead of TARGET_LOONGSON_3A.
* config/mips/mips.opt (-mloongson-ext): Add option.
* gcc/doc/invoke.texi (-mloongson-ext): Document.
gcc/testsuite/
* gcc.target/mips/mips.exp (mips_option_groups): Add
-mloongson-ext option.
(mips-dg-options): Add mips_option_dependency options
"-mmicromips" vs "-mno-loongson-ext",
From-SVN: r265863
Diffstat (limited to 'gcc/config/mips/mips.h')
-rw-r--r-- | gcc/config/mips/mips.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 27c0222..7237c8d 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -596,6 +596,12 @@ struct mips_cpu_info { builtin_define ("__mips_loongson_mmi"); \ } \ \ + /* Whether Loongson EXT modes are enabled. */ \ + if (TARGET_LOONGSON_EXT) \ + { \ + builtin_define ("__mips_loongson_ext"); \ + } \ + \ /* Historical Octeon macro. */ \ if (TARGET_OCTEON) \ builtin_define ("__OCTEON__"); \ @@ -881,7 +887,8 @@ struct mips_cpu_info { #define BASE_DRIVER_SELF_SPECS \ MIPS_ISA_NAN2008_SPEC, \ MIPS_ASE_DSP_SPEC, \ - MIPS_ASE_LOONGSON_MMI_SPEC + MIPS_ASE_LOONGSON_MMI_SPEC, \ + MIPS_ASE_LOONGSON_EXT_SPEC #define MIPS_ASE_DSP_SPEC \ "%{!mno-dsp: \ @@ -893,6 +900,10 @@ struct mips_cpu_info { "%{!mno-loongson-mmi: \ %{march=loongson2e|march=loongson2f|march=loongson3a: -mloongson-mmi}}" +#define MIPS_ASE_LOONGSON_EXT_SPEC \ + "%{!mno-loongson-ext: \ + %{march=loongson3a: -mloongson-ext}}" + #define DRIVER_SELF_SPECS \ MIPS_ISA_LEVEL_SPEC, \ BASE_DRIVER_SELF_SPECS @@ -1367,6 +1378,7 @@ struct mips_cpu_info { %{mginv} %{mno-ginv} \ %{mmsa} %{mno-msa} \ %{mloongson-mmi} %{mno-loongson-mmi} \ +%{mloongson-ext} %{mno-loongson-ext} \ %{msmartmips} %{mno-smartmips} \ %{mmt} %{mno-mt} \ %{mfix-rm7000} %{mno-fix-rm7000} \ |