Ciro Santilli has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/39235 )
Change subject: base: Add XOR and modulo operator to ChannelAddr
......................................................................
base: Add XOR and modulo operator to ChannelAddr
Channel address class did not offer bitwise
XOR and modulo operation. These two functions
where now added to the ChannelAddr class.
Change-Id: I02a5e49e9700cc5283415c921a25989a130e5d07
Reviewed-by: Andreas Sandberg <[email protected]>
Reviewed-by: Ciro Santilli <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39235
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/channel_addr.hh
1 file changed, 9 insertions(+), 1 deletion(-)
Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
Daniel Carvalho: Looks good to me, but someone else must approve
Bobby R. Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/channel_addr.hh b/src/base/channel_addr.hh
index 2cfe380..55d227b 100644
--- a/src/base/channel_addr.hh
+++ b/src/base/channel_addr.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019 ARM Limited
+ * Copyright (c) 2019, 2021 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -93,6 +93,14 @@
return ChannelAddr(a << b);
}
+ constexpr ChannelAddr operator^(const int b) const {
+ return ChannelAddr(a ^ b);
+ }
+
+ constexpr ChannelAddr operator%(const int b) const {
+ return ChannelAddr(a % b);
+ }
+
constexpr ChannelAddr operator*(const Type &b) const {
return ChannelAddr(a * b);
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39235
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I02a5e49e9700cc5283415c921a25989a130e5d07
Gerrit-Change-Number: 39235
Gerrit-PatchSet: 2
Gerrit-Owner: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Richard Cooper <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s