From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed 5/8] sim: ppc: rename igen max_insn_bit_size
Date: Mon, 1 Jan 2024 18:22:16 -0500 [thread overview]
Message-ID: <20240101232219.3003-5-vapier@gentoo.org> (raw)
In-Reply-To: <20240101232219.3003-1-vapier@gentoo.org>
We want to avoid conflicts with the common igen enums. This should
get migrated over to the common parsing logic, but for now, switch
the name to avoid redefinition.
---
sim/ppc/igen.c | 4 ++--
sim/ppc/ld-insn.c | 2 +-
sim/ppc/ld-insn.h | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c
index 4de7469b4e36..61afa491bb9e 100644
--- a/sim/ppc/igen.c
+++ b/sim/ppc/igen.c
@@ -40,7 +40,7 @@
#include "gen-support.h"
int hi_bit_nr;
-int insn_bit_size = max_insn_bit_size;
+int insn_bit_size = ppc_max_insn_bit_size;
igen_code code = generate_calls;
@@ -472,7 +472,7 @@ main(int argc,
break;
case 'B':
insn_bit_size = a2i(optarg);
- ASSERT(insn_bit_size > 0 && insn_bit_size <= max_insn_bit_size
+ ASSERT(insn_bit_size > 0 && insn_bit_size <= ppc_max_insn_bit_size
&& (hi_bit_nr == insn_bit_size-1 || hi_bit_nr == 0));
break;
case 'H':
diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c
index a94464d44bbf..5cb72b226226 100644
--- a/sim/ppc/ld-insn.c
+++ b/sim/ppc/ld-insn.c
@@ -966,7 +966,7 @@ dump_insn_table(insn_table *table,
}
}
-int insn_bit_size = max_insn_bit_size;
+int insn_bit_size = ppc_max_insn_bit_size;
int hi_bit_nr;
int generate_expanded_instructions;
diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h
index 52baeaa2d846..562e6d8742b4 100644
--- a/sim/ppc/ld-insn.h
+++ b/sim/ppc/ld-insn.h
@@ -56,7 +56,7 @@
/* Global constants */
enum {
- max_insn_bit_size = 32,
+ ppc_max_insn_bit_size = 32,
};
@@ -77,7 +77,7 @@ struct _insn_field {
typedef struct _insn_fields insn_fields;
struct _insn_fields {
- insn_field *bits[max_insn_bit_size];
+ insn_field *bits[ppc_max_insn_bit_size];
insn_field *first;
insn_field *last;
unsigned value;
--
2.43.0
next prev parent reply other threads:[~2024-01-01 23:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-01 23:22 [PATCH/committed 1/8] sim: ppc: hoist igen compilation into top-level Mike Frysinger
2024-01-01 23:22 ` [PATCH/committed 2/8] sim: ppc: replace filter_filename with lbasename Mike Frysinger
2024-01-09 14:34 ` Tom Tromey
2024-01-09 17:41 ` Mike Frysinger
2024-01-01 23:22 ` [PATCH/committed 3/8] sim: ppc: unify igen filter_filename implementations Mike Frysinger
2024-01-01 23:22 ` [PATCH/committed 4/8] sim: igen: minor constify logic Mike Frysinger
2024-01-01 23:22 ` Mike Frysinger [this message]
2024-01-01 23:22 ` [PATCH/committed 6/8] sim: igen: extend error to take arguments Mike Frysinger
2024-01-01 23:22 ` [PATCH/committed 7/8] sim: ppc: rework igen error to match common Mike Frysinger
2024-01-01 23:22 ` [PATCH/committed 8/8] sim: ppc: merge misc igen APIs Mike Frysinger
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=20240101232219.3003-5-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