Gabe Black has uploaded this change for review. (
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
---
M src/cpu/inst_res.hh
1 file changed, 3 insertions(+), 4 deletions(-)
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: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s