aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-10-06 11:01:36 +0000
committerNick Clifton <nickc@redhat.com>2003-10-06 11:01:36 +0000
commit85cf2a8a15d156b4bd8bc3362c0a9b3924a705f4 (patch)
tree4f37c6ea0a2c80c98bb17a1600a317af10fdbada
parent249dba3eb2eeb44d8603ad0105963fbc95f6da34 (diff)
downloadgdb-85cf2a8a15d156b4bd8bc3362c0a9b3924a705f4.zip
gdb-85cf2a8a15d156b4bd8bc3362c0a9b3924a705f4.tar.gz
gdb-85cf2a8a15d156b4bd8bc3362c0a9b3924a705f4.tar.bz2
Change target of hppa-netbsd port
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/config.bfd4
-rw-r--r--gas/ChangeLog12
-rw-r--r--gas/config/tc-hppa.c27
-rw-r--r--gas/config/tc-hppa.h11
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/emulparams/hppanbsd.sh1
-rw-r--r--ld/emulparams/hppaobsd.sh1
8 files changed, 46 insertions, 19 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b6ec1ae..77e9f87 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-06 Matt Thomas <matt@3am-software.com>
+
+ config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
+
2003-10-06 Robert Millan <robertmh@gnu.org>
* configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
diff --git a/bfd/config.bfd b/bfd/config.bfd
index c570c21..cdf11a9 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -366,11 +366,11 @@ case "${targ}" in
;;
#endif
- hppa*-*-linux-gnu*)
+ hppa*-*-linux-gnu* | hppa*-*-netbsd*)
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
- hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-netbsd* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*)
+ hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*)
targ_defvec=bfd_elf32_hppa_vec
targ_selvecs=bfd_elf32_hppa_linux_vec
;;
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 67bc647..583e0ca 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,15 @@
+2003-10-06 Matt Thomas <matt@3am-software.com>
+
+ Switch NetBSD/hppa to use Linux PA-RISC ELF ABI and
+ assembler syntax.
+
+ tc-hppa.c: Add "%farg[0-3]", "%fret", "%t[1-4]", "%tf[1-4]"
+ register names. Change all "defined (TE_LINUX)" to
+ "(defined (TE_LINUX) || defined (TE_NETBSD))".
+
+ tc-hppa.h: Make NetBSD use "elfXX-hppa-linux" bfd target.
+ Remove NetBSD's use of LABELS_WITHOUT_COLONS.
+
2003-10-06 Robert Millan <robertmh@gnu.org>
* configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 89b39e5..1f365b0 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -490,7 +490,7 @@ struct selector_entry
static void pa_check_current_space_and_subspace PARAMS ((void));
#endif
-#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+#if !(defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD)))
static void pa_text PARAMS ((int));
static void pa_data PARAMS ((int));
static void pa_comm PARAMS ((int));
@@ -647,7 +647,7 @@ const pseudo_typeS md_pseudo_table[] =
{"byte", pa_cons, 1},
{"call", pa_call, 0},
{"callinfo", pa_callinfo, 0},
-#if defined (OBJ_ELF) && defined (TE_LINUX)
+#if defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD))
{"code", obj_elf_text, 0},
#else
{"code", pa_text, 0},
@@ -657,14 +657,14 @@ const pseudo_typeS md_pseudo_table[] =
{"compiler", pa_compiler, 0},
#endif
{"copyright", pa_copyright, 0},
-#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+#if !(defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD)))
{"data", pa_data, 0},
#endif
{"double", pa_float_cons, 'd'},
{"dword", pa_cons, 8},
{"end", pa_end, 0},
{"end_brtab", pa_brtab, 0},
-#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+#if !(defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD)))
{"end_try", pa_try, 0},
#endif
{"enter", pa_enter, 0},
@@ -705,7 +705,7 @@ const pseudo_typeS md_pseudo_table[] =
#ifdef OBJ_SOM
{"subspa", pa_subspace, 0},
#endif
-#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+#if !(defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD)))
{"text", pa_text, 0},
#endif
{"version", pa_version, 0},
@@ -852,6 +852,10 @@ static const struct pd_reg pre_defined_registers[] =
{"%dp", 27},
{"%eiem", 15},
{"%eirr", 23},
+ {"%farg0", 5},
+ {"%farg1", 6},
+ {"%farg2", 7},
+ {"%farg3", 8},
{"%fr0", 0 + FP_REG_BASE},
{"%fr0l", 0 + FP_REG_BASE},
{"%fr0r", 0 + FP_REG_BASE + FP_REG_RSEL},
@@ -948,6 +952,7 @@ static const struct pd_reg pre_defined_registers[] =
{"%fr9", 9 + FP_REG_BASE},
{"%fr9l", 9 + FP_REG_BASE},
{"%fr9r", 9 + FP_REG_BASE + FP_REG_RSEL},
+ {"%fret", 4},
{"%hta", 25},
{"%iir", 19},
{"%ior", 21},
@@ -1013,6 +1018,14 @@ static const struct pd_reg pre_defined_registers[] =
{"%sr5", 5},
{"%sr6", 6},
{"%sr7", 7},
+ {"%t1", 22},
+ {"%t2", 21},
+ {"%t3", 20},
+ {"%t4", 19},
+ {"%tf1", 11},
+ {"%tf2", 10},
+ {"%tf3", 9},
+ {"%tf4", 8},
{"%tr0", 24},
{"%tr1", 25},
{"%tr2", 26},
@@ -6304,7 +6317,7 @@ pa_callinfo (unused)
demand_empty_rest_of_line ();
}
-#if !(defined (OBJ_ELF) && defined (TE_LINUX))
+#if !(defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD)))
/* Switch to the text space. Like s_text, but delete our
label when finished. */
static void
@@ -6384,7 +6397,7 @@ pa_comm (unused)
}
demand_empty_rest_of_line ();
}
-#endif /* !(defined (OBJ_ELF) && defined (TE_LINUX)) */
+#endif /* !(defined (OBJ_ELF) && (defined (TE_LINUX) || defined (TE_NetBSD))) */
/* Process a .END pseudo-op. */
diff --git a/gas/config/tc-hppa.h b/gas/config/tc-hppa.h
index 338b6e8..64d0644 100644
--- a/gas/config/tc-hppa.h
+++ b/gas/config/tc-hppa.h
@@ -48,14 +48,14 @@
#ifdef OBJ_ELF
#if TARGET_ARCH_SIZE == 64
#include "bfd/elf64-hppa.h"
-#ifdef TE_LINUX
+#if defined (TE_LINUX) || defined (TE_NetBSD)
#define TARGET_FORMAT "elf64-hppa-linux"
#else
#define TARGET_FORMAT "elf64-hppa"
#endif
#else /* TARGET_ARCH_SIZE == 32 */
#include "bfd/elf32-hppa.h"
-#ifdef TE_LINUX
+#if defined (TE_LINUX) || defined (TE_NetBSD)
#define TARGET_FORMAT "elf32-hppa-linux"
#else
#define TARGET_FORMAT "elf32-hppa"
@@ -77,13 +77,6 @@
#define WARN_COMMENTS 1
#endif
-#ifdef TE_NetBSD
-/* XXX the original OpenBSD code has labels without colons,
- so this is required, for now -- fredette@netbsd.org */
-/* Labels are not required to have a colon for a suffix. */
-#define LABELS_WITHOUT_COLONS 1
-#endif
-
/* FIXME. Why oh why aren't these defined somewhere globally? */
#ifndef FALSE
#define FALSE (0)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index c306a10..aeb0460 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-03 Matt Thomas <matt@3am-software.com>
+
+ * emulparams/hppanbsd.sh: Remove OUTPUT_FORMAT.
+ * emulparams/hppaobsd.sh: Add OUTPUT_FORMAT="elf32-hppa".
+
2003-10-06 Robert Millan <robertmh@gnu.org>
* configure.tgt: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
diff --git a/ld/emulparams/hppanbsd.sh b/ld/emulparams/hppanbsd.sh
index c782c6d..3f376b4 100644
--- a/ld/emulparams/hppanbsd.sh
+++ b/ld/emulparams/hppanbsd.sh
@@ -3,4 +3,3 @@
. ${srcdir}/emulparams/hppalinux.sh
-OUTPUT_FORMAT="elf32-hppa"
diff --git a/ld/emulparams/hppaobsd.sh b/ld/emulparams/hppaobsd.sh
index ff120b9..0227dc5 100644
--- a/ld/emulparams/hppaobsd.sh
+++ b/ld/emulparams/hppaobsd.sh
@@ -1,5 +1,6 @@
. ${srcdir}/emulparams/hppanbsd.sh
+OUTPUT_FORMAT="elf32-hppa"
TEXT_START_ADDR=0x1000
TARGET_PAGE_SIZE=0x1000
MAXPAGESIZE=0x1000