diff options
author | Gabe Black <gabeblack@google.com> | 2019-10-29 15:59:35 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-10-30 22:29:23 +0000 |
commit | c98fc78926213b3c0d0daa5acc11b4126e2e4912 (patch) | |
tree | 02299166d5e35bf57a8390f3ae4ac90d3e22c0f7 /src/sim | |
parent | 4444e88e5b4af1f49b501f13bd13133c6422374e (diff) | |
download | gem5-c98fc78926213b3c0d0daa5acc11b4126e2e4912.tar.xz |
arch,sim: Make copyStringArray take an explicit endianness.
Change-Id: I5cf4291b19dd2d2bdbbf145ad8e00994fabf5547
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22366
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/process_impl.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sim/process_impl.hh b/src/sim/process_impl.hh index 75134121b..da51c7f84 100644 --- a/src/sim/process_impl.hh +++ b/src/sim/process_impl.hh @@ -42,11 +42,11 @@ template<class AddrType> void copyStringArray(std::vector<std::string> &strings, AddrType array_ptr, AddrType data_ptr, - PortProxy& memProxy) + const ByteOrder bo, PortProxy& memProxy) { AddrType data_ptr_swap; for (std::vector<std::string>::size_type i = 0; i < strings.size(); ++i) { - data_ptr_swap = TheISA::htog(data_ptr); + data_ptr_swap = htog(data_ptr, bo); memProxy.writeBlob(array_ptr, &data_ptr_swap, sizeof(AddrType)); memProxy.writeString(data_ptr, strings[i].c_str()); array_ptr += sizeof(AddrType); |