Commit 87c509e0 by Andrew Burgess Committed by Joern Rennecke

arc-common.c (arc_handle_option): Add NPS400 support, setup defaults.

2016-04-28  Andrew Burgess  <andrew.burgess@embecosm.com>

        * common/config/arc/arc-common.c (arc_handle_option): Add NPS400
        support, setup defaults.
        * config/arc/arc-opts.h (enum processor_type): Add NPS400.
        * config/arc/arc.c (arc_init): Add NPS400 support.
        * config/arc/arc.h (CPP_SPEC): Add NPS400 defines.
        (TARGET_ARC700): NPS400 is also an ARC700.
        * config/arc/arc.opt: Add NPS400 options to -mcpu=.

From-SVN: r235584
parent 9759608c
2016-04-28 Andrew Burgess <andrew.burgess@embecosm.com>
* common/config/arc/arc-common.c (arc_handle_option): Add NPS400
support, setup defaults.
* config/arc/arc-opts.h (enum processor_type): Add NPS400.
* config/arc/arc.c (arc_init): Add NPS400 support.
* config/arc/arc.h (CPP_SPEC): Add NPS400 defines.
(TARGET_ARC700): NPS400 is also an ARC700.
* config/arc/arc.opt: Add NPS400 options to -mcpu=.
2016-04-28 Segher Boessenkool <segher@kernel.crashing.org> 2016-04-28 Segher Boessenkool <segher@kernel.crashing.org>
PR target/70668 PR target/70668
......
...@@ -83,6 +83,10 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -83,6 +83,10 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
switch (value) switch (value)
{ {
case PROCESSOR_NPS400:
if (! (opts_set->x_TARGET_CASE_VECTOR_PC_RELATIVE) )
opts->x_TARGET_CASE_VECTOR_PC_RELATIVE = 1;
/* Fall through */
case PROCESSOR_ARC600: case PROCESSOR_ARC600:
case PROCESSOR_ARC700: case PROCESSOR_ARC700:
if (! (opts_set->x_target_flags & MASK_BARREL_SHIFTER) ) if (! (opts_set->x_target_flags & MASK_BARREL_SHIFTER) )
......
...@@ -24,6 +24,7 @@ enum processor_type ...@@ -24,6 +24,7 @@ enum processor_type
PROCESSOR_ARC600, PROCESSOR_ARC600,
PROCESSOR_ARC601, PROCESSOR_ARC601,
PROCESSOR_ARC700, PROCESSOR_ARC700,
PROCESSOR_NPS400,
PROCESSOR_ARCEM, PROCESSOR_ARCEM,
PROCESSOR_ARCHS PROCESSOR_ARCHS
}; };
......
...@@ -690,6 +690,11 @@ arc_init (void) ...@@ -690,6 +690,11 @@ arc_init (void)
tune_dflt = TUNE_ARC700_4_2_STD; tune_dflt = TUNE_ARC700_4_2_STD;
break; break;
case PROCESSOR_NPS400:
arc_cpu_string = "NPS400";
tune_dflt = TUNE_ARC700_4_2_STD;
break;
case PROCESSOR_ARCEM: case PROCESSOR_ARCEM:
arc_cpu_string = "EM"; arc_cpu_string = "EM";
break; break;
......
...@@ -138,6 +138,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -138,6 +138,8 @@ along with GCC; see the file COPYING3. If not see
%{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \ %{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \
%{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \ %{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \
%{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \ %{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \
%{mcpu=NPS400:-D__NPS400__} \
%{mcpu=nps400:-D__NPS400__} \
" "
#define CC1_SPEC "\ #define CC1_SPEC "\
...@@ -305,7 +307,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -305,7 +307,8 @@ along with GCC; see the file COPYING3. If not see
#define TARGET_ARC600 (arc_cpu == PROCESSOR_ARC600) #define TARGET_ARC600 (arc_cpu == PROCESSOR_ARC600)
#define TARGET_ARC601 (arc_cpu == PROCESSOR_ARC601) #define TARGET_ARC601 (arc_cpu == PROCESSOR_ARC601)
#define TARGET_ARC700 (arc_cpu == PROCESSOR_ARC700) #define TARGET_ARC700 (arc_cpu == PROCESSOR_ARC700 \
|| arc_cpu == PROCESSOR_NPS400)
#define TARGET_EM (arc_cpu == PROCESSOR_ARCEM) #define TARGET_EM (arc_cpu == PROCESSOR_ARCEM)
#define TARGET_HS (arc_cpu == PROCESSOR_ARCHS) #define TARGET_HS (arc_cpu == PROCESSOR_ARCHS)
#define TARGET_V2 \ #define TARGET_V2 \
......
...@@ -189,6 +189,12 @@ EnumValue ...@@ -189,6 +189,12 @@ EnumValue
Enum(processor_type) String(arc700) Value(PROCESSOR_ARC700) Enum(processor_type) String(arc700) Value(PROCESSOR_ARC700)
EnumValue EnumValue
Enum(processor_type) String(nps400) Value(PROCESSOR_NPS400)
EnumValue
Enum(processor_type) String(NPS400) Value(PROCESSOR_NPS400)
EnumValue
Enum(processor_type) String(ARCEM) Value(PROCESSOR_ARCEM) Enum(processor_type) String(ARCEM) Value(PROCESSOR_ARCEM)
EnumValue EnumValue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment