diff options
author | Yan-Ting Lin <currygt52@gmail.com> | 2016-06-17 15:25:08 +0800 |
---|---|---|
committer | patrick <patrick@andestech.com> | 2016-06-17 16:58:05 +0800 |
commit | a28d8e5037333291991f7b0036b273e8ca1ffc34 (patch) | |
tree | 73724d3d633b6b0bfb733ebb1aa5bee0f35231eb /gdb/features | |
parent | 96074adc6a780c7984645e3e42434be368974737 (diff) | |
download | fsf-binutils-gdb-a28d8e5037333291991f7b0036b273e8ca1ffc34.zip fsf-binutils-gdb-a28d8e5037333291991f7b0036b273e8ca1ffc34.tar.gz fsf-binutils-gdb-a28d8e5037333291991f7b0036b273e8ca1ffc34.tar.bz2 |
gdb: new AndesTech NDS32 port
gdb/ChangeLog:
* Makefile.in (ALL_TARGET_OBS): Add nds32-tdep.o.
(HFILES_NO_SRCDIR): Add nds32-tdep.h.
(ALLDEPFILES): Add nds32-tdep.c.
* NEWS: Mention new NDS32 port.
* configure.tgt: Add NDS32.
* nds32-tdep.c: New file.
* nds32-tdep.h: New file.
* features/Makefile (XMLTOC): Add nds32.xml.
* features/nds32-core.xml: New file.
* features/nds32-fpu.xml: New file.
* features/nds32-system.xml: New file.
* features/nds32.c: New file (generated).
* features/nds32.xml: New file.
gdb/doc/ChangeLog:
* gdb.texinfo (Standard Target Features): Document NDS32 features.
(NDS32 Features): New Section.
gdb/testsuite/ChangeLog:
* gdb.base/float.exp: Add target check for nds32*-*-*.
* gdb.xml/tdesc-regs.exp: Set core-regs for nds32*-*-*.
Diffstat (limited to 'gdb/features')
-rw-r--r-- | gdb/features/Makefile | 1 | ||||
-rw-r--r-- | gdb/features/nds32-core.xml | 44 | ||||
-rw-r--r-- | gdb/features/nds32-fpu.xml | 42 | ||||
-rw-r--r-- | gdb/features/nds32-system.xml | 14 | ||||
-rw-r--r-- | gdb/features/nds32.c | 92 | ||||
-rw-r--r-- | gdb/features/nds32.xml | 14 |
6 files changed, 207 insertions, 0 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile index e5c5154..809c811 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -189,6 +189,7 @@ XMLTOC = \ mips-linux.xml \ mips64-dsp-linux.xml \ mips64-linux.xml \ + nds32.xml \ nios2-linux.xml \ nios2.xml \ rs6000/powerpc-32.xml \ diff --git a/gdb/features/nds32-core.xml b/gdb/features/nds32-core.xml new file mode 100644 index 0000000..9ea1640 --- /dev/null +++ b/gdb/features/nds32-core.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.nds32.core"> + <reg name="r0" bitsize="32" regnum="0"/> + <reg name="r1" bitsize="32"/> + <reg name="r2" bitsize="32"/> + <reg name="r3" bitsize="32"/> + <reg name="r4" bitsize="32"/> + <reg name="r5" bitsize="32"/> + <reg name="r6" bitsize="32"/> + <reg name="r7" bitsize="32"/> + <reg name="r8" bitsize="32"/> + <reg name="r9" bitsize="32"/> + <reg name="r10" bitsize="32"/> + <reg name="r11" bitsize="32"/> + <reg name="r12" bitsize="32"/> + <reg name="r13" bitsize="32"/> + <reg name="r14" bitsize="32"/> + <reg name="r15" bitsize="32"/> + <reg name="r16" bitsize="32"/> + <reg name="r17" bitsize="32"/> + <reg name="r18" bitsize="32"/> + <reg name="r19" bitsize="32"/> + <reg name="r20" bitsize="32"/> + <reg name="r21" bitsize="32"/> + <reg name="r22" bitsize="32"/> + <reg name="r23" bitsize="32"/> + <reg name="r24" bitsize="32"/> + <reg name="r25" bitsize="32"/> + <reg name="r26" bitsize="32"/> + <reg name="r27" bitsize="32"/> + <reg name="fp" bitsize="32" type="data_ptr"/> + <reg name="gp" bitsize="32" type="data_ptr"/> + <reg name="lp" bitsize="32" type="code_ptr"/> + <reg name="sp" bitsize="32" type="data_ptr"/> + + <reg name="pc" bitsize="32" type="code_ptr"/> +</feature> diff --git a/gdb/features/nds32-fpu.xml b/gdb/features/nds32-fpu.xml new file mode 100644 index 0000000..b01a4c0 --- /dev/null +++ b/gdb/features/nds32-fpu.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.nds32.fpu"> + <reg name="fd0" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd1" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd2" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd3" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd4" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd5" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd6" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd7" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd8" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd9" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd10" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd11" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd12" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd13" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd14" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd15" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd16" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd17" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd18" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd19" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd20" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd21" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd22" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd23" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd24" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd25" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd26" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd27" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd28" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd29" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd30" bitsize="64" type="ieee_double" group="float"/> + <reg name="fd31" bitsize="64" type="ieee_double" group="float"/> +</feature> diff --git a/gdb/features/nds32-system.xml b/gdb/features/nds32-system.xml new file mode 100644 index 0000000..c2ea8ac --- /dev/null +++ b/gdb/features/nds32-system.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> +<feature name="org.gnu.gdb.nds32.system"> + <reg name="ir0" bitsize="32"/> + + <reg name="itb" bitsize="32"/> + <reg name="ifc_lp" bitsize="32"/> +</feature> diff --git a/gdb/features/nds32.c b/gdb/features/nds32.c new file mode 100644 index 0000000..21f63f5 --- /dev/null +++ b/gdb/features/nds32.c @@ -0,0 +1,92 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: nds32.xml */ + +#include "defs.h" +#include "osabi.h" +#include "target-descriptions.h" + +struct target_desc *tdesc_nds32; +static void +initialize_tdesc_nds32 (void) +{ + struct target_desc *result = allocate_target_description (); + struct tdesc_feature *feature; + + set_tdesc_architecture (result, bfd_scan_arch ("n1h")); + + feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.core"); + tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r26", 26, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "r27", 27, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "fp", 28, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "gp", 29, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "lp", 30, 1, NULL, 32, "code_ptr"); + tdesc_create_reg (feature, "sp", 31, 1, NULL, 32, "data_ptr"); + tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr"); + + feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.fpu"); + tdesc_create_reg (feature, "fd0", 33, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd1", 34, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd2", 35, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd3", 36, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd4", 37, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd5", 38, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd6", 39, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd7", 40, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd8", 41, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd9", 42, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd10", 43, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd11", 44, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd12", 45, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd13", 46, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd14", 47, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd15", 48, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd16", 49, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd17", 50, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd18", 51, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd19", 52, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd20", 53, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd21", 54, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd22", 55, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd23", 56, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd24", 57, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd25", 58, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd26", 59, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd27", 60, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd28", 61, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd29", 62, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd30", 63, 1, "float", 64, "ieee_double"); + tdesc_create_reg (feature, "fd31", 64, 1, "float", 64, "ieee_double"); + + feature = tdesc_create_feature (result, "org.gnu.gdb.nds32.system"); + tdesc_create_reg (feature, "ir0", 65, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "itb", 66, 1, NULL, 32, "int"); + tdesc_create_reg (feature, "ifc_lp", 67, 1, NULL, 32, "int"); + + tdesc_nds32 = result; +} diff --git a/gdb/features/nds32.xml b/gdb/features/nds32.xml new file mode 100644 index 0000000..4819317 --- /dev/null +++ b/gdb/features/nds32.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. --> + +<!DOCTYPE target SYSTEM "gdb-target.dtd"> +<target> + <architecture>nds32</architecture> + <xi:include href="nds32-core.xml"/> + <xi:include href="nds32-fpu.xml"/> + <xi:include href="nds32-system.xml"/> +</target> |