Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH/RFA] Add some constants in mips-tdep.h
@ 2004-10-24 15:19 mark Kettenis
  2004-10-24 15:25 ` Mark Kettenis
  0 siblings, 1 reply; 5+ messages in thread
From: mark Kettenis @ 2004-10-24 15:19 UTC (permalink / raw)
  To: cagney, gdb-patches

Hi Andrew,

This adds some symbolic constants to mips-tdep.h that I'd like to use
to implement OpenBSD/mips64 signal trampoline support.

OK?

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* mips-tdep.h (enum mips_regnum): Name enum.  Add
	MIPS_ZERO_REGNUM, MIPS_AT_REGNUM and MIPS_RA_REGNUM.
	(enum mips_insn_size): New enum.

Index: mips-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.h,v
retrieving revision 1.8
diff -u -p -r1.8 mips-tdep.h
--- mips-tdep.h 22 Jun 2004 00:01:04 -0000 1.8
+++ mips-tdep.h 24 Oct 2004 15:16:11 -0000
@@ -61,8 +61,12 @@ struct mips_regnum
 };
 extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
 
-enum {
+enum mips_regnum 
+{
+  MIPS_ZERO_REGNUM = 0,
+  MIPS_AT_REGNUM = 1,
   MIPS_SP_REGNUM = 29,
+  MIPS_RA_REGNUM = 31,
   MIPS_EMBED_LO_REGNUM = 33,
   MIPS_EMBED_HI_REGNUM = 34,
   MIPS_EMBED_BADVADDR_REGNUM = 35,
@@ -74,5 +78,11 @@ enum {
 /* Defined in mips-tdep.c and used in remote-mips.c */
 extern void deprecated_mips_set_processor_regs_hack (void);
 
+/* Instruction sizes.  */
+enum mips_insn_size
+{
+  MIPS16_INSN_SIZE = 2,
+  MIPS32_INSN_SIZE = 4
+};
 
 #endif /* MIPS_TDEP_H */


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH/RFA] Add some constants in mips-tdep.h
  2004-10-24 15:19 [PATCH/RFA] Add some constants in mips-tdep.h mark Kettenis
@ 2004-10-24 15:25 ` Mark Kettenis
  2004-10-26  0:41   ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Kettenis @ 2004-10-24 15:25 UTC (permalink / raw)
  To: cagney, gdb-patches

   Date: Sun, 24 Oct 2004 17:18:59 +0200 (CEST)
   From: mark Kettenis <kettenis@gnu.org>

   Hi Andrew,

   This adds some symbolic constants to mips-tdep.h that I'd like to use
   to implement OpenBSD/mips64 signal trampoline support.

   OK?

Argh!  I shouldn't make any last-minute changes just to make it easier
to add a proper ChangeLog entry.

Here's a better patch.  It even compiler ;-).

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* mips-tdep.h: Add MIPS_ZERO_REGNUM, MIPS_AT_REGNUM and
	MIPS_RA_REGNUM to enum with register numbers.
	(enum mips_insn_size): New enum.

Index: mips-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.h,v
retrieving revision 1.8
diff -u -p -r1.8 mips-tdep.h
--- mips-tdep.h 22 Jun 2004 00:01:04 -0000 1.8
+++ mips-tdep.h 24 Oct 2004 15:22:52 -0000
@@ -61,8 +61,12 @@ struct mips_regnum
 };
 extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
 
-enum {
+enum
+{
+  MIPS_ZERO_REGNUM = 0,
+  MIPS_AT_REGNUM = 1,
   MIPS_SP_REGNUM = 29,
+  MIPS_RA_REGNUM = 31,
   MIPS_EMBED_LO_REGNUM = 33,
   MIPS_EMBED_HI_REGNUM = 34,
   MIPS_EMBED_BADVADDR_REGNUM = 35,
@@ -74,5 +78,11 @@ enum {
 /* Defined in mips-tdep.c and used in remote-mips.c */
 extern void deprecated_mips_set_processor_regs_hack (void);
 
+/* Instruction sizes.  */
+enum mips_insn_size
+{
+  MIPS16_INSN_SIZE = 2,
+  MIPS32_INSN_SIZE = 4
+};
 
 #endif /* MIPS_TDEP_H */


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH/RFA] Add some constants in mips-tdep.h
  2004-10-24 15:25 ` Mark Kettenis
@ 2004-10-26  0:41   ` Andrew Cagney
  2004-10-26 19:40     ` Mark Kettenis
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2004-10-26  0:41 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

Mark Kettenis wrote:
>    Date: Sun, 24 Oct 2004 17:18:59 +0200 (CEST)
>    From: mark Kettenis <kettenis@gnu.org>
> 
>    Hi Andrew,
> 
>    This adds some symbolic constants to mips-tdep.h that I'd like to use
>    to implement OpenBSD/mips64 signal trampoline support.
> 
>    OK?
> 
> Argh!  I shouldn't make any last-minute changes just to make it easier
> to add a proper ChangeLog entry.

M'kay.

> Here's a better patch.  It even compiler ;-).
> 
> Index: ChangeLog
> from  Mark Kettenis  <kettenis@gnu.org>
> 
> 	* mips-tdep.h: Add MIPS_ZERO_REGNUM, MIPS_AT_REGNUM and
> 	MIPS_RA_REGNUM to enum with register numbers.
> 	(enum mips_insn_size): New enum.
> 
> Index: mips-tdep.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.h,v
> retrieving revision 1.8
> diff -u -p -r1.8 mips-tdep.h
> --- mips-tdep.h 22 Jun 2004 00:01:04 -0000 1.8
> +++ mips-tdep.h 24 Oct 2004 15:22:52 -0000
> @@ -61,8 +61,12 @@ struct mips_regnum
>  };
>  extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
>  
> -enum {
> +enum
> +{
> +  MIPS_ZERO_REGNUM = 0,
> +  MIPS_AT_REGNUM = 1,
>    MIPS_SP_REGNUM = 29,
> +  MIPS_RA_REGNUM = 31,
>    MIPS_EMBED_LO_REGNUM = 33,
>    MIPS_EMBED_HI_REGNUM = 34,
>    MIPS_EMBED_BADVADDR_REGNUM = 35,
> @@ -74,5 +78,11 @@ enum {
>  /* Defined in mips-tdep.c and used in remote-mips.c */
>  extern void deprecated_mips_set_processor_regs_hack (void);
>  
> +/* Instruction sizes.  */
> +enum mips_insn_size
> +{
> +  MIPS16_INSN_SIZE = 2,
> +  MIPS32_INSN_SIZE = 4
> +};
>  
>  #endif /* MIPS_TDEP_H */
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH/RFA] Add some constants in mips-tdep.h
  2004-10-26  0:41   ` Andrew Cagney
@ 2004-10-26 19:40     ` Mark Kettenis
  2004-10-27 18:54       ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Kettenis @ 2004-10-26 19:40 UTC (permalink / raw)
  To: cagney; +Cc: gdb-patches

   Date: Mon, 25 Oct 2004 20:40:10 -0400
   From: Andrew Cagney <cagney@gnu.org>

   Mark Kettenis wrote:
   >    Date: Sun, 24 Oct 2004 17:18:59 +0200 (CEST)
   >    From: mark Kettenis <kettenis@gnu.org>
   > 
   >    Hi Andrew,
   > 
   >    This adds some symbolic constants to mips-tdep.h that I'd like to use
   >    to implement OpenBSD/mips64 signal trampoline support.
   > 
   >    OK?
   > 
   > Argh!  I shouldn't make any last-minute changes just to make it easier
   > to add a proper ChangeLog entry.

   M'kay.

Hope you don't mind that I sneaked in a few more register numbers.

I'll submit a patch shortly to use these in the various mips*-tdep.c
files such that we can remove the old #defines from tm-mips.h.

Cheers,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* mips-tdep.h: Add MIPS_ZERO_REGNUM, MIPS_AT_REGNUM,
	MIPS_V0_REGNUM. MIPS_A0_REGNUM, MIPS_T9_REGNUM and MIPS_RA_REGNUM
	to enum with register numbers.
	(enum mips_insn_size): New enum.

Index: mips-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.h,v
retrieving revision 1.9
diff -u -p -r1.9 mips-tdep.h
--- mips-tdep.h 26 Oct 2004 14:13:23 -0000 1.9
+++ mips-tdep.h 26 Oct 2004 18:48:21 -0000
@@ -61,8 +61,15 @@ struct mips_regnum
 };
 extern const struct mips_regnum *mips_regnum (struct gdbarch *gdbarch);
 
-enum {
+enum
+{
+  MIPS_ZERO_REGNUM = 0,
+  MIPS_AT_REGNUM = 1,
+  MIPS_V0_REGNUM = 2,
+  MIPS_A0_REGNUM = 4,
+  MIPS_T9_REGNUM = 25,
   MIPS_SP_REGNUM = 29,
+  MIPS_RA_REGNUM = 31,
   MIPS_EMBED_LO_REGNUM = 33,
   MIPS_EMBED_HI_REGNUM = 34,
   MIPS_EMBED_BADVADDR_REGNUM = 35,
@@ -74,6 +81,13 @@ enum {
 /* Defined in mips-tdep.c and used in remote-mips.c */
 extern void deprecated_mips_set_processor_regs_hack (void);
 
+/* Instruction sizes.  */
+enum mips_insn_size
+{
+  MIPS16_INSN_SIZE = 2,
+  MIPS32_INSN_SIZE = 4
+};
+
 /* Single step based on where the current instruction will take us.  */
 extern void mips_software_single_step (enum target_signal, int);
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH/RFA] Add some constants in mips-tdep.h
  2004-10-26 19:40     ` Mark Kettenis
@ 2004-10-27 18:54       ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-10-27 18:54 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

Mark Kettenis wrote:
>    Date: Mon, 25 Oct 2004 20:40:10 -0400
>    From: Andrew Cagney <cagney@gnu.org>
> 
>    Mark Kettenis wrote:
>    >    Date: Sun, 24 Oct 2004 17:18:59 +0200 (CEST)
>    >    From: mark Kettenis <kettenis@gnu.org>
>    > 
>    >    Hi Andrew,
>    > 
>    >    This adds some symbolic constants to mips-tdep.h that I'd like to use
>    >    to implement OpenBSD/mips64 signal trampoline support.
>    > 
>    >    OK?
>    > 
>    > Argh!  I shouldn't make any last-minute changes just to make it easier
>    > to add a proper ChangeLog entry.
> 
>    M'kay.
> 
> Hope you don't mind that I sneaked in a few more register numbers.

I guessed as much, this patch made no sense without following through 
with that, m'kay.

> I'll submit a patch shortly to use these in the various mips*-tdep.c
> files such that we can remove the old #defines from tm-mips.h.

Andrew


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-27 18:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-24 15:19 [PATCH/RFA] Add some constants in mips-tdep.h mark Kettenis
2004-10-24 15:25 ` Mark Kettenis
2004-10-26  0:41   ` Andrew Cagney
2004-10-26 19:40     ` Mark Kettenis
2004-10-27 18:54       ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox