Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/49126 )
Change subject: cpu: Get rid of double in InstResult::MultiResult.
......................................................................
cpu: Get rid of double in InstResult::MultiResult.
Change-Id: Ib02b0e270e0a4fdfa036c0a271ff9c3ce2a98342
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49126
Reviewed-by: Giacomo Travaglini <[email protected]>
Maintainer: Giacomo Travaglini <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/cpu/inst_res.hh
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/cpu/inst_res.hh b/src/cpu/inst_res.hh
index 5bef0da..1a774c9 100644
--- a/src/cpu/inst_res.hh
+++ b/src/cpu/inst_res.hh
@@ -52,7 +52,6 @@
union MultiResult
{
RegVal integer;
- double dbl;
TheISA::VecRegContainer vector;
TheISA::VecPredRegContainer pred;
MultiResult() {}
@@ -81,10 +80,10 @@
{
static_assert(std::is_integral_v<T> ^ std::is_floating_point_v<T>,
"Parameter type is neither integral nor fp, or it is
both");
- if (std::is_integral_v<T>) {
+ if constexpr (std::is_integral_v<T>) {
result.integer = i;
- } else if (std::is_floating_point_v<T>) {
- result.dbl = i;
+ } else if constexpr (std::is_floating_point_v<T>) {
+ result.integer = floatToBits(i);
}
}
/** Vector result. */
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49126
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: Ib02b0e270e0a4fdfa036c0a271ff9c3ce2a98342
Gerrit-Change-Number: 49126
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[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