+2017-02-09 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * config/arc/arc-c.def: Add __NPS400__ definition.
+ * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
+ (TARGET_NPS400): Define.
+
2017-02-09 Andrew Burgess <andrew.burgess@embecosm.com>
* config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
ARC_C_DEF ("__ARC600__", TARGET_ARC600)
ARC_C_DEF ("__ARC601__", TARGET_ARC601)
ARC_C_DEF ("__ARC700__", TARGET_ARC700)
+ARC_C_DEF ("__NPS400__", TARGET_NPS400)
ARC_C_DEF ("__ARCEM__", TARGET_EM)
ARC_C_DEF ("__ARCHS__", TARGET_HS)
ARC_C_DEF ("__ARC_ATOMIC__", TARGET_ATOMIC)
%{mmac-d16:-D__Xxmac_d16} %{mmac-24:-D__Xxmac_24} \
%{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \
%{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \
-%{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \
-%{mcpu=nps400:-D__NPS400__}"
+%{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc}"
#define CC1_SPEC "\
%{EB:%{EL:%emay not use both -EB and -EL}} \
&& (!TARGET_BARREL_SHIFTER))
#define TARGET_ARC700 (arc_selected_cpu->arch_info->arch_id \
== BASE_ARCH_700)
+/* An NPS400 is a specialisation of ARC700, so it is correct for NPS400
+ TARGET_ARC700 is true, and TARGET_NPS400 is true. */
+#define TARGET_NPS400 ((arc_selected_cpu->arch_info->arch_id \
+ == BASE_ARCH_700) \
+ && (arc_selected_cpu->processor \
+ == PROCESSOR_nps400))
#define TARGET_EM (arc_selected_cpu->arch_info->arch_id == BASE_ARCH_em)
#define TARGET_HS (arc_selected_cpu->arch_info->arch_id == BASE_ARCH_hs)
#define TARGET_V2 (TARGET_EM || TARGET_HS)