This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch, nios2] Use "sstatus" as preferred name of r30


Altera has requested that the register r30 disassemble using the symbolic name "sstatus" rather than "ba". Both names are documented in the Nios II processor reference handbook.

The binutils changes to support this are already checked in:
https://sourceware.org/ml/binutils/2013-10/msg00211.html

I've also checked in this patch to make the corresponding changes to GDB's lists of register names.

-Sandra

2013-10-13  Sandra Loosemore  <sandra@codesourcery.com>

	gdb/
	* nios2-tdep.c (nios2_reg_names): Use "sstatus" rather than "ba"
	as the preferred name of r30.
	* nios2-linux-tdep.c (reg_offsets): Likewise.
	* features/nios2-cpu.xml: Likewise.
	* features/nios2-linux.c: Regenerated.
	* features/nios2.c: Regenerated.
	* regformats/nios2-linux.dat: Regenerated.
Index: gdb/nios2-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/nios2-tdep.c,v
retrieving revision 1.3
diff -u -p -r1.3 nios2-tdep.c
--- gdb/nios2-tdep.c	24 Jun 2013 22:18:31 -0000	1.3
+++ gdb/nios2-tdep.c	14 Oct 2013 00:55:28 -0000
@@ -164,7 +164,7 @@ static const char *const nios2_reg_names
   "zero", "at", "r2", "r3", "r4", "r5", "r6", "r7",
   "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
   "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
-  "et", "bt", "gp", "sp", "fp", "ea", "ba", "ra",
+  "et", "bt", "gp", "sp", "fp", "ea", "sstatus", "ra",
   "pc",
   "status", "estatus", "bstatus", "ienable",
   "ipending", "cpuid", "ctl6", "exception",
Index: gdb/nios2-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/nios2-linux-tdep.c,v
retrieving revision 1.1
diff -u -p -r1.1 nios2-linux-tdep.c
--- gdb/nios2-linux-tdep.c	7 May 2013 01:09:28 -0000	1.1
+++ gdb/nios2-linux-tdep.c	14 Oct 2013 00:55:28 -0000
@@ -45,7 +45,7 @@ static const int reg_offsets[NIOS2_NUM_R
   -1,  8,  9, 10, 11, 12, 13, 14,	/* r0 - r7 */
   0,  1,  2,  3,  4,  5,  6,  7,	/* r8 - r15 */
   23, 24, 25, 26, 27, 28, 29, 30,	/* r16 - r23 */
-  -1, -1, 19, 18, 17, 21, -1, 16,	/* et bt gp sp fp ea ba ra */
+  -1, -1, 19, 18, 17, 21, -1, 16,	/* et bt gp sp fp ea sstatus ra */
   21,					/* pc */
   -1, 20, -1, -1, -1, -1, -1, -1,	/* status estatus ...  */
   -1, -1, -1, -1, -1, -1, -1, -1
Index: gdb/features/nios2-cpu.xml
===================================================================
RCS file: /cvs/src/src/gdb/features/nios2-cpu.xml,v
retrieving revision 1.1
diff -u -p -r1.1 nios2-cpu.xml
--- gdb/features/nios2-cpu.xml	7 May 2013 01:09:28 -0000	1.1
+++ gdb/features/nios2-cpu.xml	14 Oct 2013 00:55:29 -0000
@@ -37,7 +37,7 @@
   <reg name="sp" bitsize="32" type="data_ptr"/>
   <reg name="fp" bitsize="32" type="uint32"/>
   <reg name="ea" bitsize="32" type="uint32"/>
-  <reg name="ba" bitsize="32" type="uint32"/>
+  <reg name="sstatus" bitsize="32" type="uint32"/>
   <reg name="ra" bitsize="32" type="uint32"/>
   <reg name="pc" bitsize="32" type="code_ptr"/>
   <reg name="status" bitsize="32" type="uint32"/>
Index: gdb/features/nios2-linux.c
===================================================================
RCS file: /cvs/src/src/gdb/features/nios2-linux.c,v
retrieving revision 1.1
diff -u -p -r1.1 nios2-linux.c
--- gdb/features/nios2-linux.c	7 May 2013 01:09:28 -0000	1.1
+++ gdb/features/nios2-linux.c	14 Oct 2013 00:55:29 -0000
@@ -47,7 +47,7 @@ initialize_tdesc_nios2_linux (void)
   tdesc_create_reg (feature, "sp", 27, 1, NULL, 32, "data_ptr");
   tdesc_create_reg (feature, "fp", 28, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "ea", 29, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "ba", 30, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sstatus", 30, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "ra", 31, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr");
   tdesc_create_reg (feature, "status", 33, 1, NULL, 32, "uint32");
Index: gdb/features/nios2.c
===================================================================
RCS file: /cvs/src/src/gdb/features/nios2.c,v
retrieving revision 1.1
diff -u -p -r1.1 nios2.c
--- gdb/features/nios2.c	7 May 2013 01:09:28 -0000	1.1
+++ gdb/features/nios2.c	14 Oct 2013 00:55:29 -0000
@@ -45,7 +45,7 @@ initialize_tdesc_nios2 (void)
   tdesc_create_reg (feature, "sp", 27, 1, NULL, 32, "data_ptr");
   tdesc_create_reg (feature, "fp", 28, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "ea", 29, 1, NULL, 32, "uint32");
-  tdesc_create_reg (feature, "ba", 30, 1, NULL, 32, "uint32");
+  tdesc_create_reg (feature, "sstatus", 30, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "ra", 31, 1, NULL, 32, "uint32");
   tdesc_create_reg (feature, "pc", 32, 1, NULL, 32, "code_ptr");
   tdesc_create_reg (feature, "status", 33, 1, NULL, 32, "uint32");
Index: gdb/regformats/nios2-linux.dat
===================================================================
RCS file: /cvs/src/src/gdb/regformats/nios2-linux.dat,v
retrieving revision 1.1
diff -u -p -r1.1 nios2-linux.dat
--- gdb/regformats/nios2-linux.dat	7 May 2013 01:09:29 -0000	1.1
+++ gdb/regformats/nios2-linux.dat	14 Oct 2013 00:55:29 -0000
@@ -32,7 +32,7 @@ expedite:sp,pc
 32:sp
 32:fp
 32:ea
-32:ba
+32:sstatus
 32:ra
 32:pc
 32:status

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]