Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc/config/rs6000 avoid differences t...



details:   https://anonhg.NetBSD.org/src/rev/8c82d48366cf
branches:  trunk
changeset: 450510:8c82d48366cf
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Apr 16 07:36:55 2019 +0000

description:
avoid differences to linux64.h that aren't needed.
merge the rs6000_abi_name check for netbsd into the linux/freebsd section.

diffstat:

 external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h |  71 ++++++++++----------
 external/gpl3/gcc/dist/gcc/config/rs6000/sysv4.h    |   8 +--
 2 files changed, 37 insertions(+), 42 deletions(-)

diffs (146 lines):

diff -r d510f343523a -r 8c82d48366cf external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h
--- a/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h       Tue Apr 16 07:34:54 2019 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/rs6000/netbsd64.h       Tue Apr 16 07:36:55 2019 +0000
@@ -87,17 +87,6 @@
 
 #define ELFv2_ABI_CHECK (rs6000_elf_abi == 2)                   
 
-#undef CC1_OS_NETBSD_SPEC
-#define CC1_OS_NETBSD_SPEC \
-  NETBSD_CC1_AND_CC1PLUS_SPEC \
-  "%{!m32: %{!mrelocatable: %{!fno-pie: %{!fno-pic: \
-     %{!fpie: %{!fpic: \
-       %{!fPIE: %{!fPIC:-fPIC}}}}}}}}"
-/* %{!m32: %{!mcmodel*: -mcmodel=medium}}" */
-
-#undef CC1PLUS_SPEC
-#define CC1PLUS_SPEC CC1_OS_NETBSD_SPEC
-
 #undef SUBSUBTARGET_OVERRIDE_OPTIONS
 #define        SUBSUBTARGET_OVERRIDE_OPTIONS                           \
   do                                                           \
@@ -181,17 +170,6 @@
     }                                                          \
   while (0)
 
-#ifdef RS6000_BI_ARCH
-
-#if 0
-#undef OVERRIDE_OPTIONS
-#define        OVERRIDE_OPTIONS \
-  rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
-                          ? (char *) 0 : TARGET_CPU_DEFAULT)
-#endif
-
-#endif
-
 #undef ASM_DEFAULT_SPEC
 #undef ASM_SPEC
 #undef LINK_OS_NETBSD_SPEC
@@ -263,6 +241,22 @@
 
 #endif
 
+/* We use NetBSD libc _mcount for profiling.  */
+#define NO_PROFILE_COUNTERS 1
+#define PROFILE_HOOK(LABEL) \
+  do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
+
+/* PowerPC64 NetBSD word-aligns FP doubles when -malign-power is given.  */
+#undef  ADJUST_FIELD_ALIGN
+#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
+  (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED))            \
+   ? 128                                                               \
+   : (TARGET_64BIT                                                     \
+      && TARGET_ALIGN_NATURAL == 0                                     \
+      && TYPE_MODE (strip_array_types (TYPE)) == DFmode)               \
+   ? MIN ((COMPUTED), 32)                                              \
+   : (COMPUTED))
+
 /* PowerPC64 NetBSD increases natural record alignment to doubleword if
    the first field is an FP double, only if in power alignment mode.  */
 #undef  ROUND_TYPE_ALIGN
@@ -305,8 +299,8 @@
   (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
 
 /* NetBSD doesn't support saving and restoring 64-bit regs in a 32-bit
-   process.  XXXMRG?  */
-#define OS_MISSING_POWERPC64 !TARGET_64BIT
+   process.  */
+#define OS_MISSING_POWERPC64 (!TARGET_64BIT)
 
 #undef  TARGET_OS_CPP_BUILTINS
 #define TARGET_OS_CPP_BUILTINS()                       \
@@ -350,6 +344,17 @@
     }                                          \
   while (0)
 
+#undef CC1_OS_NETBSD_SPEC
+#define CC1_OS_NETBSD_SPEC \
+  NETBSD_CC1_AND_CC1PLUS_SPEC \
+  "%{!m32: %{!mrelocatable: %{!fno-pie: %{!fno-pic: \
+     %{!fpie: %{!fpic: \
+       %{!fPIE: %{!fPIC:-fPIC}}}}}}}}"
+/* %{!m32: %{!mcmodel*: -mcmodel=medium}}" */
+
+#undef CC1PLUS_SPEC
+#define CC1PLUS_SPEC CC1_OS_NETBSD_SPEC
+
 #undef  CPP_OS_DEFAULT_SPEC
 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_netbsd)"
 
@@ -382,17 +387,6 @@
 /* Use standard DWARF numbering for DWARF debugging information.  */
 #define RS6000_USE_DWARF_NUMBERING
 
-/* PowerPC64 NetBSD word-aligns FP doubles when -malign-power is given.  */
-#undef  ADJUST_FIELD_ALIGN
-#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \
-  (rs6000_special_adjust_field_align_p ((TYPE), (COMPUTED))            \
-   ? 128                                                                \
-   : (TARGET_64BIT                                                      \
-      && TARGET_ALIGN_NATURAL == 0                                      \
-      && TYPE_MODE (strip_array_types (TYPE)) == DFmode)               \
-   ? MIN ((COMPUTED), 32)                                               \
-   : (COMPUTED))
-
 #undef  TOC_SECTION_ASM_OP
 #define TOC_SECTION_ASM_OP \
   (TARGET_64BIT                                                \
@@ -601,4 +595,11 @@
 /* NetBSD ppc64 has 128-bit long double support.  */
 #undef RS6000_DEFAULT_LONG_DOUBLE_SIZE
 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
+
 #define POWERPC_NETBSD
+
+/* The IEEE 128-bit emulator is only built on Linux systems.  Flag that we
+   should enable the type handling for KFmode on VSX systems even if we are not
+   enabling the __float128 keyword.  */
+#undef TARGET_FLOAT128_ENABLE_TYPE
+#define TARGET_FLOAT128_ENABLE_TYPE 1
diff -r d510f343523a -r 8c82d48366cf external/gpl3/gcc/dist/gcc/config/rs6000/sysv4.h
--- a/external/gpl3/gcc/dist/gcc/config/rs6000/sysv4.h  Tue Apr 16 07:34:54 2019 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/rs6000/sysv4.h  Tue Apr 16 07:36:55 2019 +0000
@@ -87,6 +87,7 @@
   else if (!strcmp (rs6000_abi_name, "aixdesc"))                       \
     rs6000_current_abi = ABI_AIX;                                      \
   else if (!strcmp (rs6000_abi_name, "freebsd")                                \
+          || !strcmp (rs6000_abi_name, "netbsd")                       \
           || !strcmp (rs6000_abi_name, "linux"))                       \
     {                                                                  \
       if (TARGET_64BIT)                                                        \
@@ -94,13 +95,6 @@
       else                                                             \
        rs6000_current_abi = ABI_V4;                                    \
     }                                                                  \
-  else if (!strcmp (rs6000_abi_name, "netbsd"))                                \
-    {                                                                  \
-      if (TARGET_64BIT)                                                        \
-       rs6000_current_abi = ABI_AIX;                                   \
-      else                                                             \
-       rs6000_current_abi = ABI_V4;                                    \
-    }                                                                  \
   else if (!strcmp (rs6000_abi_name, "openbsd"))                       \
     rs6000_current_abi = ABI_V4;                                       \
   else if (!strcmp (rs6000_abi_name, "i960-old"))                      \



Home | Main Index | Thread Index | Old Index