public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] PPC: remove indirection from struct pd_reg
@ 2023-08-15  6:35 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2023-08-15  6:35 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a2182c73d245530c5c5587bc47a6142e9738de84

commit a2182c73d245530c5c5587bc47a6142e9738de84
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Aug 15 08:34:13 2023 +0200

    PPC: remove indirection from struct pd_reg
    
    The longest register name is 5 characters (plus a nul one), so using a
    4- or 8-byte pointer to get at it is neither space nor time efficient.
    Embed the names right into the array. For PIE this also reduces the
    number of base relocations in the final image.

Diff:
---
 gas/config/tc-ppc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index a8b034c88ab..974404b668e 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -279,7 +279,7 @@ const pseudo_typeS md_pseudo_table[] =
 /* Structure to hold information about predefined registers.  */
 struct pd_reg
   {
-    const char *name;
+    char name[6];
     unsigned short value;
     unsigned short flags;
   };

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-15  6:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-15  6:35 [binutils-gdb] PPC: remove indirection from struct pd_reg Jan Beulich

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).