diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2020-10-11 13:36:13 +0200 |
---|---|---|
committer | Marcus Comstedt <marcus@mc.pp.se> | 2020-11-07 15:03:58 +0100 |
commit | 8d09d845a7373cce52d3943f5dca1a2ac34a4f83 (patch) | |
tree | 65a8e157ac2c167c6b89d436c00fa8c12bdf6181 /fesvr/htif.cc | |
parent | 641d7d03e6a8d822b720fcb1a19f261813c00c4a (diff) | |
download | spike-8d09d845a7373cce52d3943f5dca1a2ac34a4f83.zip spike-8d09d845a7373cce52d3943f5dca1a2ac34a4f83.tar.gz spike-8d09d845a7373cce52d3943f5dca1a2ac34a4f83.tar.bz2 |
Implement support for big-endian targets
Diffstat (limited to 'fesvr/htif.cc')
-rw-r--r-- | fesvr/htif.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fesvr/htif.cc b/fesvr/htif.cc index 30b13de..996e321 100644 --- a/fesvr/htif.cc +++ b/fesvr/htif.cc @@ -216,7 +216,7 @@ int htif_t::run() while (!signal_exit && exitcode == 0) { - if (auto tohost = from_le(mem.read_uint64(tohost_addr))) { + if (auto tohost = from_target(mem.read_uint64(tohost_addr))) { mem.write_uint64(tohost_addr, 0); command_t cmd(mem, tohost, fromhost_callback); device_list.handle_command(cmd); @@ -227,7 +227,7 @@ int htif_t::run() device_list.tick(); if (!fromhost_queue.empty() && mem.read_uint64(fromhost_addr) == 0) { - mem.write_uint64(fromhost_addr, to_le(fromhost_queue.front())); + mem.write_uint64(fromhost_addr, to_target(fromhost_queue.front())); fromhost_queue.pop(); } } |