summaryrefslogtreecommitdiff
path: root/src/mem/port_impl.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/port_impl.hh')
-rw-r--r--src/mem/port_impl.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mem/port_impl.hh b/src/mem/port_impl.hh
index b7980bdd2..989cfd338 100644
--- a/src/mem/port_impl.hh
+++ b/src/mem/port_impl.hh
@@ -28,6 +28,9 @@
* Authors: Ali Saidi
*/
+//To get endianness
+#include "arch/isa_traits.hh"
+
#include "mem/port.hh"
#include "sim/byteswap.hh"
@@ -35,7 +38,7 @@ template <typename T>
void
FunctionalPort::writeHtoG(Addr addr, T d)
{
- d = htog(d);
+ d = TheISA::htog(d);
writeBlob(addr, (uint8_t*)&d, sizeof(T));
}
@@ -46,6 +49,6 @@ FunctionalPort::readGtoH(Addr addr)
{
T d;
readBlob(addr, (uint8_t*)&d, sizeof(T));
- return gtoh(d);
+ return TheISA::gtoh(d);
}