summaryrefslogtreecommitdiff
path: root/gcc/config/sparc/sparc.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2006-02-06 17:45:00 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2006-02-06 18:45:00 +0100
commit7269aee7d553dc3b89aadc00950024fde12631b4 (patch)
treee8246f6bbbc449d315d9ddbf1bacb459740fd188 /gcc/config/sparc/sparc.c
parentda8c4a55ee47e100e59e9a133b015ffcda086093 (diff)
downloadgcc-7269aee7d553dc3b89aadc00950024fde12631b4.tar.gz
s390.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define.
2006-02-06 Aldy Hernandez <aldyh@redhat.com> * config/s390/s390.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define. (s390_mangle_fundamental_type): New. * config/s390/linux.h (TARGET_ALTERNATE_LONG_DOUBLE_MANGLING): Define. * config/alpha/alpha.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define. (alpha_mangle_fundamental_type): New. * config/alpha/linux.h (TARGET_ALTERNATE_LONG_DOUBLE_MANGLING): Define. * config/sparc/linux.h (TARGET_ALTERNATE_LONG_DOUBLE_MANGLING): Define. * config/sparc/linux64.h (TARGET_ALTERNATE_LONG_DOUBLE_MANGLING): Define. * config/sparc/sparc.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Define. (sparc_mangle_fundamental_type): New. From-SVN: r110655
Diffstat (limited to 'gcc/config/sparc/sparc.c')
-rw-r--r--gcc/config/sparc/sparc.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 2d2adba0ab0..c633e8a9fc7 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -368,6 +368,9 @@ static int sparc_arg_partial_bytes (CUMULATIVE_ARGS *,
static void sparc_dwarf_handle_frame_unspec (const char *, rtx, int);
static void sparc_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
static void sparc_file_end (void);
+#ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
+static const char *sparc_mangle_fundamental_type (tree);
+#endif
#ifdef SUBTARGET_ATTRIBUTE_TABLE
const struct attribute_spec sparc_attribute_table[];
#endif
@@ -527,6 +530,11 @@ static bool fpu_option_set = false;
#undef TARGET_ASM_FILE_END
#define TARGET_ASM_FILE_END sparc_file_end
+#ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
+#undef TARGET_MANGLE_FUNDAMENTAL_TYPE
+#define TARGET_MANGLE_FUNDAMENTAL_TYPE sparc_mangle_fundamental_type
+#endif
+
struct gcc_target targetm = TARGET_INITIALIZER;
/* Implement TARGET_HANDLE_OPTION. */
@@ -8713,6 +8721,22 @@ sparc_file_end (void)
file_end_indicate_exec_stack ();
}
+#ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING
+/* Implement TARGET_MANGLE_FUNDAMENTAL_TYPE. */
+
+static const char *
+sparc_mangle_fundamental_type (tree type)
+{
+ if (!TARGET_64BIT
+ && TYPE_MAIN_VARIANT (type) == long_double_type_node
+ && TARGET_LONG_DOUBLE_128)
+ return "g";
+
+ /* For all other types, use normal C++ mangling. */
+ return NULL;
+}
+#endif
+
/* Expand code to perform a 8 or 16-bit compare and swap by doing 32-bit
compare and swap on the word containing the byte or half-word. */