Add some pdp11 target hook definitions for C++
authorPaul Koning <ni1d@arrl.net>
Fri, 5 Oct 2018 18:08:34 +0000 (14:08 -0400)
committerPaul Koning <pkoning@gcc.gnu.org>
Fri, 5 Oct 2018 18:08:34 +0000 (14:08 -0400)
    * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
    (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
    (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
    (pdp11_guard_type): New function.

From-SVN: r264883

gcc/ChangeLog
gcc/config/pdp11/pdp11.c

index 3ca3c1c28b6c8ddf66313eacf48f4136446a9404..49fce320d083a459e88529193322518be3efafc9 100644 (file)
@@ -1,3 +1,10 @@
+2018-10-05  Paul Koning  <ni1d@arrl.net>
+
+       * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
+       (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
+       (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
+       (pdp11_guard_type): New function.
+
 2018-10-05  Paul Koning  <ni1d@arrl.net>
 
        * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
index f80a8783d8e9c3b41ac1afce7cf8f3041f5e19f4..b3b7ced9e07b8cf4aa7a95ce374ed7e6dcd7bbd6 100644 (file)
@@ -292,6 +292,15 @@ static bool pdp11_scalar_mode_supported_p (scalar_mode);
 #undef TARGET_INVALID_WITHIN_DOLOOP
 #define TARGET_INVALID_WITHIN_DOLOOP hook_constcharptr_const_rtx_insn_null
 
+#undef  TARGET_CXX_GUARD_TYPE
+#define TARGET_CXX_GUARD_TYPE pdp11_guard_type
+
+#undef  TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT
+#define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false
+
+#undef  TARGET_CXX_LIBRARY_RTTI_COMDAT
+#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false
+
 #undef TARGET_HAVE_SPECULATION_SAFE_VALUE
 #define TARGET_HAVE_SPECULATION_SAFE_VALUE speculation_safe_value_not_needed
 \f
@@ -1702,6 +1711,13 @@ pdp11_can_change_mode_class (machine_mode from,
   return !reg_classes_intersect_p (FPU_REGS, rclass);
 }
 
+/* Implement TARGET_CXX_GUARD_TYPE */
+static tree
+pdp11_guard_type (void)
+{
+  return short_integer_type_node;
+}
+
 /* TARGET_PREFERRED_RELOAD_CLASS
 
    Given an rtx X being reloaded into a reg required to be