public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: ppc: replace local CONCAT macros with common ones
Date: Wed, 16 Jun 2021 01:06:36 -0400	[thread overview]
Message-ID: <20210616050636.25833-1-vapier@gentoo.org> (raw)

Drop local copies of CONCAT macros that the common ansidecl.h provides.
---
 sim/ppc/ChangeLog        |  8 ++++++++
 sim/ppc/basics.h         | 16 ----------------
 sim/ppc/corefile.c       |  1 +
 sim/ppc/idecode_fields.h |  1 +
 sim/ppc/sim-endian.c     |  1 +
 sim/ppc/vm.c             |  1 +
 6 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index d0719450ce22..3f4fd91a8657 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,11 @@
+2021-06-16  Mike Frysinger  <vapier@gentoo.org>
+
+	* basics.h: Delete CONCAT* and XCONCAT* macros.
+	* corefile.c: Include symcat.h.
+	* idecode_fields.h: Likewise.
+	* sim-endian.c: Likewise.
+	* vm.c: Likewise.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
 	* device.h (device_add_boolean_property): Rename bool arg to boolean.
diff --git a/sim/ppc/basics.h b/sim/ppc/basics.h
index 3eb7c61ba911..d88bcef7a753 100644
--- a/sim/ppc/basics.h
+++ b/sim/ppc/basics.h
@@ -24,22 +24,6 @@
 /* This must come before any other includes.  */
 #include "defs.h"
 
-/* from Michael Meissner, macro's to handle concating symbols better */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-#define CONCAT2(a,b)	 a##b
-#define CONCAT3(a,b,c)	 a##b##c
-#define CONCAT4(a,b,c,d) a##b##c##d
-#else
-#define CONCAT2(a,b)	 a/**/b
-#define CONCAT3(a,b,c)	 a/**/b/**/c
-#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
-#endif
-
-#define XCONCAT2(a,b)     CONCAT2(a,b)
-#define XCONCAT3(a,b,c)   CONCAT3(a,b,c)
-#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d)
-
 
 /* many things pass around the cpu and psim object with out knowing
    what it is */
diff --git a/sim/ppc/corefile.c b/sim/ppc/corefile.c
index d784d64f4650..ac8aa5d7e22f 100644
--- a/sim/ppc/corefile.c
+++ b/sim/ppc/corefile.c
@@ -24,6 +24,7 @@
 #include "basics.h"
 #include "device_table.h"
 #include "corefile.h"
+#include "symcat.h"
 
 typedef struct _core_mapping core_mapping;
 struct _core_mapping {
diff --git a/sim/ppc/idecode_fields.h b/sim/ppc/idecode_fields.h
index cf8826deefb9..f5c29ad57180 100644
--- a/sim/ppc/idecode_fields.h
+++ b/sim/ppc/idecode_fields.h
@@ -26,6 +26,7 @@
    In addition to the below, more will be found in the gen program's
    cache table */
 
+#include "symcat.h"
 
 /* map some statements and variables directly across */
 
diff --git a/sim/ppc/sim-endian.c b/sim/ppc/sim-endian.c
index 0f76b239256f..29f51e5a8d0f 100644
--- a/sim/ppc/sim-endian.c
+++ b/sim/ppc/sim-endian.c
@@ -25,6 +25,7 @@
 #include "defs.h"
 
 #include "basics.h"
+#include "symcat.h"
 
 
 #if !defined(_SWAP_1)
diff --git a/sim/ppc/vm.c b/sim/ppc/vm.c
index 9562fb6762c0..304972e4f00e 100644
--- a/sim/ppc/vm.c
+++ b/sim/ppc/vm.c
@@ -32,6 +32,7 @@
 #endif
 
 #include "cpu.h"
+#include "symcat.h"
 
 /* OEA vs VEA
 
-- 
2.31.1


                 reply	other threads:[~2021-06-16  5:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210616050636.25833-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).