Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/11180 )
Change subject: systemc: Turn some macros into enums to fix regression test
building.
......................................................................
systemc: Turn some macros into enums to fix regression test building.
The spec defines these constants to be macros, but the regression test
refers to them using the sc_core namespace. That breaks things because
the macros don't expand to an identifier, they expand to an expression.
This change converts the macros into enums like in the Accellera
implementation to get the regression tests to build.
Change-Id: I3db7dc87a7a597907df658624a7343bc6ca1734e
Reviewed-on: https://gem5-review.googlesource.com/11180
Reviewed-by: Gabe Black <gabebl...@google.com>
Maintainer: Gabe Black <gabebl...@google.com>
---
M src/systemc/ext/utils/sc_report_handler.hh
1 file changed, 9 insertions(+), 11 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/ext/utils/sc_report_handler.hh
b/src/systemc/ext/utils/sc_report_handler.hh
index 7347e5f..d0eea77 100644
--- a/src/systemc/ext/utils/sc_report_handler.hh
+++ b/src/systemc/ext/utils/sc_report_handler.hh
@@ -47,18 +47,16 @@
SC_CACHE_REPORT = 0x0010,
SC_INTERRUPT = 0x0020,
SC_STOP = 0x0040,
- SC_ABORT = 0x0080
-};
+ SC_ABORT = 0x0080,
-#define SC_DEFAULT_INFO_ACTIONS \
- (::sc_core::SC_LOG | ::sc_core::SC_DISPLAY)
-#define SC_DEFAULT_WARNING_ACTIONS \
- (::sc_core::SC_LOG | ::sc_core::SC_DISPLAY)
-#define SC_DEFAULT_ERROR_ACTIONS \
- (::sc_core::SC_LOG | ::sc_core::SC_CACHE_REPORT
| ::sc_core::SC_THROW)
-#define SC_DEFAULT_FATAL_ACTIONS \
- (::sc_core::SC_LOG | ::sc_core::SC_DISPLAY | \
- ::sc_core::SC_CACHE_REPORT | ::sc_core::SC_ABORT)
+ // The spec says these should be macros, but that breaks the build for
the
+ // regression tests since they refer to, for instance,
+ // sc_core::SC_DEFAULT_INFO_ACTIONS.
+ SC_DEFAULT_INFO_ACTIONS = SC_LOG | SC_DISPLAY,
+ SC_DEFAULT_WARNING_ACTIONS = SC_LOG | SC_DISPLAY,
+ SC_DEFAULT_ERROR_ACTIONS = SC_LOG | SC_CACHE_REPORT | SC_THROW,
+ SC_DEFAULT_FATAL_ACTIONS = SC_LOG | SC_DISPLAY | SC_CACHE_REPORT |
SC_ABORT
+};
typedef void (*sc_report_handler_proc)(const sc_report &, const sc_actions
&);
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/11180
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I3db7dc87a7a597907df658624a7343bc6ca1734e
Gerrit-Change-Number: 11180
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Gabe Black <gabebl...@google.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Matthias Jung <jun...@eit.uni-kl.de>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev