summaryrefslogtreecommitdiff
path: root/src/systemc/dt/fx
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-10 23:34:49 -0700
committerGabe Black <gabeblack@google.com>2018-10-09 21:46:04 +0000
commit845433025772e7d5fda6bcde1cd804a36f46a4e8 (patch)
tree60fd94621e55ba0ee0f58725b566649f5fe2c866 /src/systemc/dt/fx
parent960c3500532a0ca28e4192f838e81eeb7c29860c (diff)
downloadgem5-845433025772e7d5fda6bcde1cd804a36f46a4e8.tar.xz
systemc: Ensure SC_LONG_64 is defined and available.
The datatype code was checking if SC_LONG_64 was defined to determine if a long was 64 bits. The code that would define that value was dropped when porting over from the Accellera implementation, and so the wrong code was being included. This change both makes those checks look at the *value* of SC_LONG_64 to ensure that it's not missing by accident, and assigns it a value in sc_fxdefs.hh. Change-Id: Ie9bb1146452a3db1d9d99c0db575098bb06463ff Reviewed-on: https://gem5-review.googlesource.com/c/12616 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/dt/fx')
-rw-r--r--src/systemc/dt/fx/scfx_rep.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemc/dt/fx/scfx_rep.cc b/src/systemc/dt/fx/scfx_rep.cc
index 3d10fb3f6..ae19fabe0 100644
--- a/src/systemc/dt/fx/scfx_rep.cc
+++ b/src/systemc/dt/fx/scfx_rep.cc
@@ -147,7 +147,7 @@ scfx_rep::scfx_rep(long a) :
a = -a;
m_sign = -1;
}
-# if defined(SC_LONG_64)
+# if SC_LONG_64
m_wp = 1;
m_mant[1] = static_cast<word>(a);
m_mant[2] = static_cast<word>(a >> bits_in_word);
@@ -171,7 +171,7 @@ scfx_rep::scfx_rep(unsigned long a) :
m_mant.clear();
m_wp = m_msw = m_lsw = 2;
m_state = normal;
-# if defined(SC_LONG_64)
+# if SC_LONG_64
m_wp = 1;
m_mant[1] = static_cast<word>(a);
m_mant[2] = static_cast<word>(a >> bits_in_word);
@@ -1057,6 +1057,7 @@ print_other(scfx_string &s, const scfx_rep &a, sc_numrep numrep, int w_prefix,
lsb = (b.m_lsw - b.m_wp) * bits_in_word +
scfx_find_lsb(b.m_mant[b.m_lsw]);
+
}
}