This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] sim: trace: use existing defines for the useful mask
- From: Michael Frysinger <vapier at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 11 Jun 2015 15:58:47 -0000
- Subject: [binutils-gdb] sim: trace: use existing defines for the useful mask
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a6c2a374e05770dd7469e050f5d6603e3f034f17
commit a6c2a374e05770dd7469e050f5d6603e3f034f17
Author: Mike Frysinger <vapier@gentoo.org>
Date: Wed Jun 10 16:01:29 2015 +0800
sim: trace: use existing defines for the useful mask
No point in duplicating the shift logic when we have macros already to
keep that all unified.
Diff:
---
sim/common/ChangeLog | 4 ++++
sim/common/sim-trace.h | 5 +----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 039c675..586f58d 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,9 @@
2015-06-11 Mike Frysinger <vapier@gentoo.org>
+ * sim-trace.h (TRACE_USEFUL_MASK): Change to TRACE_xxx defines.
+
+2015-06-11 Mike Frysinger <vapier@gentoo.org>
+
* sim-trace.h (WITH_TRACE_P): New define.
(WITH_TRACE_INSN_P, WITH_TRACE_DECODE_P, WITH_TRACE_EXTRACT_P,
WITH_TRACE_LINENUM_P, WITH_TRACE_MEMORY_P, WITH_TRACE_MODEL_P,
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index df995a6..3d91aa9 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -87,10 +87,7 @@ enum {
splat on the screen everything under the sun making nothing easy to
find. */
#define TRACE_USEFUL_MASK \
-((1 << TRACE_INSN_IDX) \
- | (1 << TRACE_LINENUM_IDX) \
- | (1 << TRACE_MEMORY_IDX) \
- | (1 << TRACE_MODEL_IDX))
+ (TRACE_insn | TRACE_linenum | TRACE_memory | TRACE_model)
/* Masks so WITH_TRACE can have symbolic values.
The case choice here is on purpose. The lowercase parts are args to