public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] arc: Add support for ARC HS extra registers in core files
@ 2020-03-26 15:02 Shahab Vahedi
  2020-03-31  9:29 ` Claudiu Zissulescu Ianculescu
  0 siblings, 1 reply; 6+ messages in thread
From: Shahab Vahedi @ 2020-03-26 15:02 UTC (permalink / raw)
  To: binutils
  Cc: Shahab Vahedi, Claudiu Zissulescu, Anton Kolesov,
	Francois Bedard, Anton Kolesov

From: Anton Kolesov <Anton.Kolesov@synopsys.com>

When a coredump is generated, there are a few registers in
ARC HS that are put under a special section, namely ".reg-v2".
It is for backward compatibility reasons with older tools that
we have decided not to extend the generic ".reg" section.

This patch makes it possible to display the information better
regarding that section.  Compare the output of "readelf" without
and with these changes:

$ readelf -n core     # without the patch
  ...
  LINUX    0x0000000c  Unknown note type: (0x00000600)
   description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69

$ readelf -n core     # with the patch
  ...
  LINUX    0x0000000c  NT_ARC_V2 (ARC HS accumulator/extra registers)
   description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69

In another commit (soon to be submitted), GDB will makes use of these
changes to parse the extra section and its registers.

bfd/ChangeLog
2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>

	* elf-bfd.h (elfcore_write_arc_v2): Add prototype.
	* elf.c (elfcore_grok_arc_v2): New function.
	(elfcore_grok_note): Call the new function to handle the corresponding
	note.
	(elfcore_write_arc_v2): New function.
	(elfcore_write_register_note): Call the new function to handle the
	corresponding pseudo-sections.

binutils/ChangeLog
2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>

	* readelf.c (get_note_type): Handle NT_ARC_V2.

include/elf/ChangeLog
2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>

	* common.h (NT_ARC_V2): New macro definitions.
---
 bfd/elf-bfd.h        |  2 ++
 bfd/elf.c            | 27 +++++++++++++++++++++++++++
 binutils/readelf.c   |  2 ++
 include/elf/common.h |  2 ++
 4 files changed, 33 insertions(+)

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index d4ac5152dfe..088bb77dd72 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2730,6 +2730,8 @@ extern char *elfcore_write_aarch_sve
   (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_aarch_pauth
   (bfd *, char *, int *, const void *, int);
+extern char *elfcore_write_arc_v2
+  (bfd *, char *, int *, const void *, int);
 extern char *elfcore_write_lwpstatus
   (bfd *, char *, int *, long, int, const void *);
 extern char *elfcore_write_register_note
diff --git a/bfd/elf.c b/bfd/elf.c
index 8ab7b3e2e81..63da5ce08b8 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9820,6 +9820,12 @@ elfcore_grok_aarch_pauth (bfd *abfd, Elf_Internal_Note *note)
   return elfcore_make_note_pseudosection (abfd, ".reg-aarch-pauth", note);
 }
 
+static bfd_boolean
+elfcore_grok_arc_v2 (bfd *abfd, Elf_Internal_Note *note)
+{
+  return elfcore_make_note_pseudosection (abfd, ".reg-arc-v2", note);
+}
+
 #if defined (HAVE_PRPSINFO_T)
 typedef prpsinfo_t   elfcore_psinfo_t;
 #if defined (HAVE_PRPSINFO32_T)		/* Sparc64 cross Sparc32 */
@@ -10379,6 +10385,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
       else
 	return TRUE;
 
+    case NT_ARC_V2:
+      if (note->namesz == 6
+	  && strcmp (note->namedata, "LINUX") == 0)
+	return elfcore_grok_arc_v2 (abfd, note);
+      else
+	return TRUE;
+
     case NT_ARM_VFP:
       if (note->namesz == 6
 	  && strcmp (note->namedata, "LINUX") == 0)
@@ -11790,6 +11803,18 @@ elfcore_write_aarch_pauth (bfd *abfd,
 			     note_name, NT_ARM_PAC_MASK, aarch_pauth, size);
 }
 
+char *
+elfcore_write_arc_v2 (bfd *abfd,
+		      char *buf,
+		      int *bufsiz,
+		      const void *arc_v2,
+		      int size)
+{
+  char *note_name = "LINUX";
+  return elfcore_write_note (abfd, buf, bufsiz,
+			     note_name, NT_ARC_V2, arc_v2, size);
+}
+
 char *
 elfcore_write_register_note (bfd *abfd,
 			     char *buf,
@@ -11872,6 +11897,8 @@ elfcore_write_register_note (bfd *abfd,
     return elfcore_write_aarch_sve (abfd, buf, bufsiz, data, size);
   if (strcmp (section, ".reg-aarch-pauth") == 0)
     return elfcore_write_aarch_pauth (abfd, buf, bufsiz, data, size);
+  if (strcmp (section, ".reg-arc-v2") == 0)
+    return elfcore_write_arc_v2 (abfd, buf, bufsiz, data, size);
   return NULL;
 }
 
diff --git a/binutils/readelf.c b/binutils/readelf.c
index a11297845e8..15b4f1cc661 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -17553,6 +17553,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
 	return _("NT_ARM_HW_BREAK (AArch hardware breakpoint registers)");
       case NT_ARM_HW_WATCH:
 	return _("NT_ARM_HW_WATCH (AArch hardware watchpoint registers)");
+      case NT_ARC_V2:
+	return _("NT_ARC_V2 (ARC HS accumulator/extra registers)");
       case NT_PSTATUS:
 	return _("NT_PSTATUS (pstatus structure)");
       case NT_FPREGS:
diff --git a/include/elf/common.h b/include/elf/common.h
index 1c84ccb430e..e8447678226 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -652,6 +652,8 @@
 					/*   note name must be "LINUX".  */
 #define NT_ARM_PAC_MASK	0x406		/* AArch pointer authentication code masks */
 					/*   note name must be "LINUX".  */
+#define NT_ARC_V2	0x600		/* ARC HS accumulator/extra registers.  */
+					/*   note name must be "LINUX".  */
 #define NT_SIGINFO	0x53494749	/* Fields of siginfo_t.  */
 #define NT_FILE		0x46494c45	/* Description of mapped files.  */
 
-- 
2.26.0


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

* Re: [PATCH] arc: Add support for ARC HS extra registers in core files
  2020-03-26 15:02 [PATCH] arc: Add support for ARC HS extra registers in core files Shahab Vahedi
@ 2020-03-31  9:29 ` Claudiu Zissulescu Ianculescu
  2020-03-31  9:41   ` Anton Kolesov
  0 siblings, 1 reply; 6+ messages in thread
From: Claudiu Zissulescu Ianculescu @ 2020-03-31  9:29 UTC (permalink / raw)
  To: Shahab Vahedi
  Cc: Binutils, Anton Kolesov, Shahab Vahedi, Claudiu Zissulescu,
	Francois Bedard

Hi Shahab,

I don't really like the ARC_V2 name. All ARC variants can have extra
registers from r32 to r59 called extension core registers :) I would
go for something more generic like ARC_EXT_REG, or something like that

On Thu, Mar 26, 2020 at 5:02 PM Shahab Vahedi via Binutils
<binutils@sourceware.org> wrote:
>
> From: Anton Kolesov <Anton.Kolesov@synopsys.com>
>
> When a coredump is generated, there are a few registers in
> ARC HS that are put under a special section, namely ".reg-v2".
> It is for backward compatibility reasons with older tools that
> we have decided not to extend the generic ".reg" section.
>
> This patch makes it possible to display the information better
> regarding that section.  Compare the output of "readelf" without
> and with these changes:
>
> $ readelf -n core     # without the patch
>   ...
>   LINUX    0x0000000c  Unknown note type: (0x00000600)
>    description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69
>
> $ readelf -n core     # with the patch
>   ...
>   LINUX    0x0000000c  NT_ARC_V2 (ARC HS accumulator/extra registers)
>    description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69
>
> In another commit (soon to be submitted), GDB will makes use of these
> changes to parse the extra section and its registers.
>
> bfd/ChangeLog
> 2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>
>
>         * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
>         * elf.c (elfcore_grok_arc_v2): New function.
>         (elfcore_grok_note): Call the new function to handle the corresponding
>         note.
>         (elfcore_write_arc_v2): New function.
>         (elfcore_write_register_note): Call the new function to handle the
>         corresponding pseudo-sections.
>
> binutils/ChangeLog
> 2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>
>
>         * readelf.c (get_note_type): Handle NT_ARC_V2.
>
> include/elf/ChangeLog
> 2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>
>
>         * common.h (NT_ARC_V2): New macro definitions.
> ---
>  bfd/elf-bfd.h        |  2 ++
>  bfd/elf.c            | 27 +++++++++++++++++++++++++++
>  binutils/readelf.c   |  2 ++
>  include/elf/common.h |  2 ++
>  4 files changed, 33 insertions(+)
>
> diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
> index d4ac5152dfe..088bb77dd72 100644
> --- a/bfd/elf-bfd.h
> +++ b/bfd/elf-bfd.h
> @@ -2730,6 +2730,8 @@ extern char *elfcore_write_aarch_sve
>    (bfd *, char *, int *, const void *, int);
>  extern char *elfcore_write_aarch_pauth
>    (bfd *, char *, int *, const void *, int);
> +extern char *elfcore_write_arc_v2
> +  (bfd *, char *, int *, const void *, int);
>  extern char *elfcore_write_lwpstatus
>    (bfd *, char *, int *, long, int, const void *);
>  extern char *elfcore_write_register_note
> diff --git a/bfd/elf.c b/bfd/elf.c
> index 8ab7b3e2e81..63da5ce08b8 100644
> --- a/bfd/elf.c
> +++ b/bfd/elf.c
> @@ -9820,6 +9820,12 @@ elfcore_grok_aarch_pauth (bfd *abfd, Elf_Internal_Note *note)
>    return elfcore_make_note_pseudosection (abfd, ".reg-aarch-pauth", note);
>  }
>
> +static bfd_boolean
> +elfcore_grok_arc_v2 (bfd *abfd, Elf_Internal_Note *note)
> +{
> +  return elfcore_make_note_pseudosection (abfd, ".reg-arc-v2", note);
> +}
> +
>  #if defined (HAVE_PRPSINFO_T)
>  typedef prpsinfo_t   elfcore_psinfo_t;
>  #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
> @@ -10379,6 +10385,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
>        else
>         return TRUE;
>
> +    case NT_ARC_V2:
> +      if (note->namesz == 6
> +         && strcmp (note->namedata, "LINUX") == 0)
> +       return elfcore_grok_arc_v2 (abfd, note);
> +      else
> +       return TRUE;
> +
>      case NT_ARM_VFP:
>        if (note->namesz == 6
>           && strcmp (note->namedata, "LINUX") == 0)
> @@ -11790,6 +11803,18 @@ elfcore_write_aarch_pauth (bfd *abfd,
>                              note_name, NT_ARM_PAC_MASK, aarch_pauth, size);
>  }
>
> +char *
> +elfcore_write_arc_v2 (bfd *abfd,
> +                     char *buf,
> +                     int *bufsiz,
> +                     const void *arc_v2,
> +                     int size)
> +{
> +  char *note_name = "LINUX";
> +  return elfcore_write_note (abfd, buf, bufsiz,
> +                            note_name, NT_ARC_V2, arc_v2, size);
> +}
> +
>  char *
>  elfcore_write_register_note (bfd *abfd,
>                              char *buf,
> @@ -11872,6 +11897,8 @@ elfcore_write_register_note (bfd *abfd,
>      return elfcore_write_aarch_sve (abfd, buf, bufsiz, data, size);
>    if (strcmp (section, ".reg-aarch-pauth") == 0)
>      return elfcore_write_aarch_pauth (abfd, buf, bufsiz, data, size);
> +  if (strcmp (section, ".reg-arc-v2") == 0)
> +    return elfcore_write_arc_v2 (abfd, buf, bufsiz, data, size);
>    return NULL;
>  }
>
> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index a11297845e8..15b4f1cc661 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -17553,6 +17553,8 @@ get_note_type (Filedata * filedata, unsigned e_type)
>         return _("NT_ARM_HW_BREAK (AArch hardware breakpoint registers)");
>        case NT_ARM_HW_WATCH:
>         return _("NT_ARM_HW_WATCH (AArch hardware watchpoint registers)");
> +      case NT_ARC_V2:
> +       return _("NT_ARC_V2 (ARC HS accumulator/extra registers)");
>        case NT_PSTATUS:
>         return _("NT_PSTATUS (pstatus structure)");
>        case NT_FPREGS:
> diff --git a/include/elf/common.h b/include/elf/common.h
> index 1c84ccb430e..e8447678226 100644
> --- a/include/elf/common.h
> +++ b/include/elf/common.h
> @@ -652,6 +652,8 @@
>                                         /*   note name must be "LINUX".  */
>  #define NT_ARM_PAC_MASK        0x406           /* AArch pointer authentication code masks */
>                                         /*   note name must be "LINUX".  */
> +#define NT_ARC_V2      0x600           /* ARC HS accumulator/extra registers.  */
> +                                       /*   note name must be "LINUX".  */
>  #define NT_SIGINFO     0x53494749      /* Fields of siginfo_t.  */
>  #define NT_FILE                0x46494c45      /* Description of mapped files.  */
>
> --
> 2.26.0
>

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

* RE: [PATCH] arc: Add support for ARC HS extra registers in core files
  2020-03-31  9:29 ` Claudiu Zissulescu Ianculescu
@ 2020-03-31  9:41   ` Anton Kolesov
  2020-04-06  9:06     ` Shahab Vahedi
  0 siblings, 1 reply; 6+ messages in thread
From: Anton Kolesov @ 2020-03-31  9:41 UTC (permalink / raw)
  To: Claudiu Zissulescu Ianculescu, Shahab Vahedi
  Cc: Binutils, Shahab Vahedi, Claudiu Zissulescu, Francois Bedard

Hi Claudiu,

NT_ARC_V2 is the name that comes from Linux headers, so using different name can
cause confusion. "reg-v2" can be changed to something more specific I think,
however more specific than "reg-ext" because each type of section would have
different name and registers.

Anton

> -----Original Message-----
> From: Claudiu Zissulescu Ianculescu <claziss@gmail.com>
> Sent: Tuesday, March 31, 2020 12:30
> To: Shahab Vahedi <shahab.vahedi@gmail.com>
> Cc: Binutils <binutils@sourceware.org>; Anton Kolesov
> <akolesov@synopsys.com>; Shahab Vahedi <shahab@synopsys.com>; Claudiu
> Zissulescu <claziss@synopsys.com>; Francois Bedard
> <fbedard@synopsys.com>
> Subject: Re: [PATCH] arc: Add support for ARC HS extra registers in core files
> 
> Hi Shahab,
> 
> I don't really like the ARC_V2 name. All ARC variants can have extra registers
> from r32 to r59 called extension core registers :) I would go for something more
> generic like ARC_EXT_REG, or something like that
> 
> On Thu, Mar 26, 2020 at 5:02 PM Shahab Vahedi via Binutils
> <binutils@sourceware.org> wrote:
> >
> > From: Anton Kolesov <Anton.Kolesov@synopsys.com>
> >
> > When a coredump is generated, there are a few registers in ARC HS that
> > are put under a special section, namely ".reg-v2".
> > It is for backward compatibility reasons with older tools that we have
> > decided not to extend the generic ".reg" section.
> >
> > This patch makes it possible to display the information better
> > regarding that section.  Compare the output of "readelf" without and
> > with these changes:
> >
> > $ readelf -n core     # without the patch
> >   ...
> >   LINUX    0x0000000c  Unknown note type: (0x00000600)
> >    description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69
> >
> > $ readelf -n core     # with the patch
> >   ...
> >   LINUX    0x0000000c  NT_ARC_V2 (ARC HS accumulator/extra registers)
> >    description data: 78 08 00 00 2f 6c 64 2d 75 43 6c 69
> >
> > In another commit (soon to be submitted), GDB will makes use of these
> > changes to parse the extra section and its registers.
> >
> > bfd/ChangeLog
> > 2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>
> >
> >         * elf-bfd.h (elfcore_write_arc_v2): Add prototype.
> >         * elf.c (elfcore_grok_arc_v2): New function.
> >         (elfcore_grok_note): Call the new function to handle the corresponding
> >         note.
> >         (elfcore_write_arc_v2): New function.
> >         (elfcore_write_register_note): Call the new function to handle the
> >         corresponding pseudo-sections.
> >
> > binutils/ChangeLog
> > 2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>
> >
> >         * readelf.c (get_note_type): Handle NT_ARC_V2.
> >
> > include/elf/ChangeLog
> > 2020-03-26  Anton Kolesov  <anton.kolesov@synopsys.com>
> >
> >         * common.h (NT_ARC_V2): New macro definitions.
> > ---
> >  bfd/elf-bfd.h        |  2 ++
> >  bfd/elf.c            | 27 +++++++++++++++++++++++++++
> >  binutils/readelf.c   |  2 ++
> >  include/elf/common.h |  2 ++
> >  4 files changed, 33 insertions(+)
> >
> > diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index
> > d4ac5152dfe..088bb77dd72 100644
> > --- a/bfd/elf-bfd.h
> > +++ b/bfd/elf-bfd.h
> > @@ -2730,6 +2730,8 @@ extern char *elfcore_write_aarch_sve
> >    (bfd *, char *, int *, const void *, int);  extern char
> > *elfcore_write_aarch_pauth
> >    (bfd *, char *, int *, const void *, int);
> > +extern char *elfcore_write_arc_v2
> > +  (bfd *, char *, int *, const void *, int);
> >  extern char *elfcore_write_lwpstatus
> >    (bfd *, char *, int *, long, int, const void *);  extern char
> > *elfcore_write_register_note diff --git a/bfd/elf.c b/bfd/elf.c index
> > 8ab7b3e2e81..63da5ce08b8 100644
> > --- a/bfd/elf.c
> > +++ b/bfd/elf.c
> > @@ -9820,6 +9820,12 @@ elfcore_grok_aarch_pauth (bfd *abfd,
> Elf_Internal_Note *note)
> >    return elfcore_make_note_pseudosection (abfd, ".reg-aarch-pauth",
> > note);  }
> >
> > +static bfd_boolean
> > +elfcore_grok_arc_v2 (bfd *abfd, Elf_Internal_Note *note) {
> > +  return elfcore_make_note_pseudosection (abfd, ".reg-arc-v2", note);
> > +}
> > +
> >  #if defined (HAVE_PRPSINFO_T)
> >  typedef prpsinfo_t   elfcore_psinfo_t;
> >  #if defined (HAVE_PRPSINFO32_T)                /* Sparc64 cross Sparc32 */
> > @@ -10379,6 +10385,13 @@ elfcore_grok_note (bfd *abfd,
> Elf_Internal_Note *note)
> >        else
> >         return TRUE;
> >
> > +    case NT_ARC_V2:
> > +      if (note->namesz == 6
> > +         && strcmp (note->namedata, "LINUX") == 0)
> > +       return elfcore_grok_arc_v2 (abfd, note);
> > +      else
> > +       return TRUE;
> > +
> >      case NT_ARM_VFP:
> >        if (note->namesz == 6
> >           && strcmp (note->namedata, "LINUX") == 0) @@ -11790,6
> > +11803,18 @@ elfcore_write_aarch_pauth (bfd *abfd,
> >                              note_name, NT_ARM_PAC_MASK, aarch_pauth,
> > size);  }
> >
> > +char *
> > +elfcore_write_arc_v2 (bfd *abfd,
> > +                     char *buf,
> > +                     int *bufsiz,
> > +                     const void *arc_v2,
> > +                     int size)
> > +{
> > +  char *note_name = "LINUX";
> > +  return elfcore_write_note (abfd, buf, bufsiz,
> > +                            note_name, NT_ARC_V2, arc_v2, size); }
> > +
> >  char *
> >  elfcore_write_register_note (bfd *abfd,
> >                              char *buf, @@ -11872,6 +11897,8 @@
> > elfcore_write_register_note (bfd *abfd,
> >      return elfcore_write_aarch_sve (abfd, buf, bufsiz, data, size);
> >    if (strcmp (section, ".reg-aarch-pauth") == 0)
> >      return elfcore_write_aarch_pauth (abfd, buf, bufsiz, data, size);
> > +  if (strcmp (section, ".reg-arc-v2") == 0)
> > +    return elfcore_write_arc_v2 (abfd, buf, bufsiz, data, size);
> >    return NULL;
> >  }
> >
> > diff --git a/binutils/readelf.c b/binutils/readelf.c index
> > a11297845e8..15b4f1cc661 100644
> > --- a/binutils/readelf.c
> > +++ b/binutils/readelf.c
> > @@ -17553,6 +17553,8 @@ get_note_type (Filedata * filedata, unsigned
> e_type)
> >         return _("NT_ARM_HW_BREAK (AArch hardware breakpoint registers)");
> >        case NT_ARM_HW_WATCH:
> >         return _("NT_ARM_HW_WATCH (AArch hardware watchpoint
> > registers)");
> > +      case NT_ARC_V2:
> > +       return _("NT_ARC_V2 (ARC HS accumulator/extra registers)");
> >        case NT_PSTATUS:
> >         return _("NT_PSTATUS (pstatus structure)");
> >        case NT_FPREGS:
> > diff --git a/include/elf/common.h b/include/elf/common.h index
> > 1c84ccb430e..e8447678226 100644
> > --- a/include/elf/common.h
> > +++ b/include/elf/common.h
> > @@ -652,6 +652,8 @@
> >                                         /*   note name must be "LINUX".  */
> >  #define NT_ARM_PAC_MASK        0x406           /* AArch pointer
> authentication code masks */
> >                                         /*   note name must be "LINUX".  */
> > +#define NT_ARC_V2      0x600           /* ARC HS accumulator/extra registers.
> */
> > +                                       /*   note name must be "LINUX".  */
> >  #define NT_SIGINFO     0x53494749      /* Fields of siginfo_t.  */
> >  #define NT_FILE                0x46494c45      /* Description of mapped files.  */
> >
> > --
> > 2.26.0
> >

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

* Re: [PATCH] arc: Add support for ARC HS extra registers in core files
  2020-03-31  9:41   ` Anton Kolesov
@ 2020-04-06  9:06     ` Shahab Vahedi
  2020-04-10 11:56       ` Claudiu Zissulescu Ianculescu
  0 siblings, 1 reply; 6+ messages in thread
From: Shahab Vahedi @ 2020-04-06  9:06 UTC (permalink / raw)
  To: Claudiu Zissulescu Ianculescu
  Cc: Anton Kolesov, Binutils, Shahab Vahedi, Claudiu Zissulescu,
	Francois Bedard

Hi Claudiu,
 
> > 
> > Hi Shahab,
> > 
> > I don't really like the ARC_V2 name. All ARC variants can have extra registers
> > from r32 to r59 called extension core registers :) I would go for something more
> > generic like ARC_EXT_REG, or something like that
> > 

I have looked into this a little bit further:

As Anton mentioned, since NT_ARC_V2 is entangled with kernel's ptrace, it is
not a not a viable option to change it.

Regarding the ".reg-arc-v2" section, there can be 3 registers in there: r30,
r58, and r59. The r58/r59 pair are the accumulator registers. r30 is the tricky
one. In ARCompact (ARC 600/700), r30 used to be called ILINK2 and was not a
userspace register. In ARCv2, that has changed. It is considered a general
purpose register, hence its inclusion in ".reg-arc-v2". I am afraid that the
name of this note indeed reflects how tied it is to ARCv2.


Cheers,
Shahab

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

* Re: [PATCH] arc: Add support for ARC HS extra registers in core files
  2020-04-06  9:06     ` Shahab Vahedi
@ 2020-04-10 11:56       ` Claudiu Zissulescu Ianculescu
  2020-04-14 10:40         ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Claudiu Zissulescu Ianculescu @ 2020-04-10 11:56 UTC (permalink / raw)
  To: Shahab Vahedi, Nick Clifton
  Cc: Anton Kolesov, Binutils, Shahab Vahedi, Claudiu Zissulescu,
	Francois Bedard

Thank you for the clarification. It looks all right from my side.

Nick, am I allowed to push Shahab's patch? It does touches some generic files.

Thanks,
Claudiu

On Mon, Apr 6, 2020 at 12:06 PM Shahab Vahedi <shahab.vahedi@gmail.com> wrote:
>
> Hi Claudiu,
>
> > >
> > > Hi Shahab,
> > >
> > > I don't really like the ARC_V2 name. All ARC variants can have extra registers
> > > from r32 to r59 called extension core registers :) I would go for something more
> > > generic like ARC_EXT_REG, or something like that
> > >
>
> I have looked into this a little bit further:
>
> As Anton mentioned, since NT_ARC_V2 is entangled with kernel's ptrace, it is
> not a not a viable option to change it.
>
> Regarding the ".reg-arc-v2" section, there can be 3 registers in there: r30,
> r58, and r59. The r58/r59 pair are the accumulator registers. r30 is the tricky
> one. In ARCompact (ARC 600/700), r30 used to be called ILINK2 and was not a
> userspace register. In ARCv2, that has changed. It is considered a general
> purpose register, hence its inclusion in ".reg-arc-v2". I am afraid that the
> name of this note indeed reflects how tied it is to ARCv2.
>
>
> Cheers,
> Shahab

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

* Re: [PATCH] arc: Add support for ARC HS extra registers in core files
  2020-04-10 11:56       ` Claudiu Zissulescu Ianculescu
@ 2020-04-14 10:40         ` Nick Clifton
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Clifton @ 2020-04-14 10:40 UTC (permalink / raw)
  To: Claudiu Zissulescu Ianculescu, Shahab Vahedi
  Cc: Anton Kolesov, Binutils, Shahab Vahedi, Claudiu Zissulescu,
	Francois Bedard

Hi Claudiu,

> Nick, am I allowed to push Shahab's patch? It does touches some generic files.

Yes, please do.

Cheers
  Nick



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

end of thread, other threads:[~2020-04-14 10:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 15:02 [PATCH] arc: Add support for ARC HS extra registers in core files Shahab Vahedi
2020-03-31  9:29 ` Claudiu Zissulescu Ianculescu
2020-03-31  9:41   ` Anton Kolesov
2020-04-06  9:06     ` Shahab Vahedi
2020-04-10 11:56       ` Claudiu Zissulescu Ianculescu
2020-04-14 10:40         ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).