diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2020-10-17 13:40:01 +0200 |
---|---|---|
committer | Marcus Comstedt <marcus@mc.pp.se> | 2020-11-07 15:34:19 +0100 |
commit | 8e3bcb2eef7f195a9cd61f5b79c1e67a0c3c28ff (patch) | |
tree | 191a89f0adab760eddfd0cf4a3e6ee11fbfd1b0f /fesvr/htif.cc | |
parent | ec2fd09fdbb7b7b490cacdc3818ca237f9f28593 (diff) | |
download | spike-8e3bcb2eef7f195a9cd61f5b79c1e67a0c3c28ff.zip spike-8e3bcb2eef7f195a9cd61f5b79c1e67a0c3c28ff.tar.gz spike-8e3bcb2eef7f195a9cd61f5b79c1e67a0c3c28ff.tar.bz2 |
Tag target endian values to help guide conversion code
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 996e321..4f34cec 100644 --- a/fesvr/htif.cc +++ b/fesvr/htif.cc @@ -217,7 +217,7 @@ int htif_t::run() while (!signal_exit && exitcode == 0) { if (auto tohost = from_target(mem.read_uint64(tohost_addr))) { - mem.write_uint64(tohost_addr, 0); + mem.write_uint64(tohost_addr, target_endian<uint64_t>::zero); command_t cmd(mem, tohost, fromhost_callback); device_list.handle_command(cmd); } else { @@ -226,7 +226,7 @@ int htif_t::run() device_list.tick(); - if (!fromhost_queue.empty() && mem.read_uint64(fromhost_addr) == 0) { + if (!fromhost_queue.empty() && !mem.read_uint64(fromhost_addr)) { mem.write_uint64(fromhost_addr, to_target(fromhost_queue.front())); fromhost_queue.pop(); } |