From 37d8f61108e97d88d1422dd1e0efabef833b0f26 Mon Sep 17 00:00:00 2001 From: Chung-Ju Wu Date: Sun, 3 Jun 2018 03:26:56 +0000 Subject: [NDS32] Add -march=v3j. gcc/ * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J. * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J. * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking. * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J). From-SVN: r261123 --- gcc/config/nds32/nds32-opts.h | 1 + gcc/config/nds32/nds32.c | 4 +++- gcc/config/nds32/nds32.h | 1 + gcc/config/nds32/nds32.opt | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) (limited to 'gcc/config/nds32') diff --git a/gcc/config/nds32/nds32-opts.h b/gcc/config/nds32/nds32-opts.h index e75e75f..8d76196 100644 --- a/gcc/config/nds32/nds32-opts.h +++ b/gcc/config/nds32/nds32-opts.h @@ -29,6 +29,7 @@ enum nds32_arch_type { ARCH_V2, ARCH_V3, + ARCH_V3J, ARCH_V3M, ARCH_V3F, ARCH_V3S diff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c index a0b6443..85a2986 100644 --- a/gcc/config/nds32/nds32.c +++ b/gcc/config/nds32/nds32.c @@ -4087,7 +4087,9 @@ nds32_option_override (void) } if (TARGET_ISA_V3) { - /* Under V3 ISA, currently nothing should be strictly set. */ + /* If this is ARCH_V3J, we need to enable TARGET_REDUCED_REGS. */ + if (nds32_arch_option == ARCH_V3J) + target_flags |= MASK_REDUCED_REGS; } if (TARGET_ISA_V3M) { diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h index 84fae7d..9e36c8f 100644 --- a/gcc/config/nds32/nds32.h +++ b/gcc/config/nds32/nds32.h @@ -853,6 +853,7 @@ enum nds32_builtins #define TARGET_ISA_V3 \ (nds32_arch_option == ARCH_V3 \ + || nds32_arch_option == ARCH_V3J \ || nds32_arch_option == ARCH_V3F \ || nds32_arch_option == ARCH_V3S) #define TARGET_ISA_V3M (nds32_arch_option == ARCH_V3M) diff --git a/gcc/config/nds32/nds32.opt b/gcc/config/nds32/nds32.opt index 871ae1e..a9ffae1 100644 --- a/gcc/config/nds32/nds32.opt +++ b/gcc/config/nds32/nds32.opt @@ -177,6 +177,9 @@ EnumValue Enum(nds32_arch_type) String(v3) Value(ARCH_V3) EnumValue +Enum(nds32_arch_type) String(v3j) Value(ARCH_V3J) + +EnumValue Enum(nds32_arch_type) String(v3m) Value(ARCH_V3M) EnumValue -- cgit v1.1