diff mbox series

[committed] hppa: Add target support infrastructure for D front end

Message ID b24f322d-5c9c-322b-05a4-905ef9b372df@bell.net
State New
Headers show
Series [committed] hppa: Add target support infrastructure for D front end | expand

Commit Message

John David Anglin Dec. 9, 2018, 7:49 p.m. UTC
The attached change has been tested on hppa-unknown-linux-gnu with an
initial implementation
of libphobos.  Committed to trunk.

Dave

Comments

Iain Buclaw Dec. 9, 2018, 10:19 p.m. UTC | #1
On Sun, 9 Dec 2018 at 20:49, John David Anglin <dave.anglin@bell.net> wrote:
>
> The attached change has been tested on hppa-unknown-linux-gnu with an
> initial implementation
> of libphobos.  Committed to trunk.
>
> Dave
>

Thanks!  Shouldn't this be made available to all hppa* configurations
though?  Or just conservatively adding it for now.

--
Iain
John David Anglin Dec. 10, 2018, 11:18 p.m. UTC | #2
On 2018-12-09 5:19 p.m., Iain Buclaw wrote:
> Thanks!  Shouldn't this be made available to all hppa* configurations
> though?  Or just conservatively adding it for now.
I was just being conservative.  It took a couple of days to add the
linux details for libphobos and I'm
more familiar with it.

Dave
diff mbox series

Patch

Index: config.gcc
===================================================================
--- config.gcc	(revision 266405)
+++ config.gcc	(working copy)
@@ -1447,7 +1447,8 @@ 
 	target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS|MASK_CALLER_COPIES"
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \
 		 pa/pa32-regs.h pa/pa32-linux.h"
-	tmake_file="${tmake_file} pa/t-linux"
+	tmake_file="${tmake_file} pa/t-pa pa/t-linux"
+	d_target_objs="${d_target_objs} pa-d.o"
 	;;
 hppa*-*-openbsd*)
 	target_cpu_default="MASK_PA_11"
Index: config/pa/pa-protos.h
===================================================================
--- config/pa/pa-protos.h	(revision 266405)
+++ config/pa/pa-protos.h	(working copy)
@@ -110,3 +110,6 @@ 
 extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree);
 
 extern const int pa_magic_milli[];
+
+/* Routines implemented in pa-d.c  */
+extern void pa_d_target_versions (void);
Index: config/pa/pa.h
===================================================================
--- config/pa/pa.h	(revision 266405)
+++ config/pa/pa.h	(working copy)
@@ -1302,3 +1302,6 @@ 
   (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000)
 
 #define NEED_INDICATE_EXEC_STACK 0
+
+/* Target CPU versions for D.  */
+#define TARGET_D_CPU_VERSIONS pa_d_target_versions
--- /dev/null	2018-11-24 12:57:36.820000000 -0500
+++ config/pa/pa-d.c	2018-11-20 18:17:23.807892880 -0500
@@ -0,0 +1,39 @@ 
+/* Subroutines for the D front end on the HPPA architecture.
+   Copyright (C) 2018 Free Software Foundation, Inc.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "target.h"
+#include "d/d-target.h"
+#include "d/d-target-def.h"
+
+/* Implement TARGET_D_CPU_VERSIONS for HPPA targets.  */
+
+void
+pa_d_target_versions (void)
+{
+  if (TARGET_64BIT)
+    d_add_builtin_version ("HPPA64");
+  else
+    d_add_builtin_version ("HPPA");
+
+  if (TARGET_SOFT_FLOAT)
+    d_add_builtin_version ("D_SoftFloat");
+  else
+    d_add_builtin_version ("D_HardFloat");
+}
--- /dev/null	2018-11-24 12:57:36.820000000 -0500
+++ config/pa/t-pa	2018-11-20 07:45:53.982380350 -0500
@@ -0,0 +1,4 @@ 
+pa-d.o: $(srcdir)/config/pa/pa-d.c
+	$(COMPILE) $<
+	$(POSTCOMPILE)
+