diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-09-24 20:34:04 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-09-28 15:56:47 -0700 |
commit | 85c40db208db3e26f507dc6a74a5dc540b504b5c (patch) | |
tree | 88ddd7440be666a4305a55e4ca1130ae7636a4f6 /riscv/interactive.cc | |
parent | bd85811c35ea38180d27440507fc222d585ef780 (diff) | |
download | spike-85c40db208db3e26f507dc6a74a5dc540b504b5c.zip spike-85c40db208db3e26f507dc6a74a5dc540b504b5c.tar.gz spike-85c40db208db3e26f507dc6a74a5dc540b504b5c.tar.bz2 |
Implement Q extension
Diffstat (limited to 'riscv/interactive.cc')
-rw-r--r-- | riscv/interactive.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/riscv/interactive.cc b/riscv/interactive.cc index 31b9162..e6e8616 100644 --- a/riscv/interactive.cc +++ b/riscv/interactive.cc @@ -239,21 +239,22 @@ union fpr void sim_t::interactive_freg(const std::string& cmd, const std::vector<std::string>& args) { - fprintf(stderr, "0x%016" PRIx64 "\n", get_freg(args).v); + freg_t r = get_freg(args); + fprintf(stderr, "0x%016" PRIx64 "%016" PRIx64 "\n", r.v[1], r.v[0]); } void sim_t::interactive_fregs(const std::string& cmd, const std::vector<std::string>& args) { fpr f; f.r = get_freg(args); - fprintf(stderr, "%g\n",f.s); + fprintf(stderr, "%g\n", isBoxedF32(f.r) ? (double)f.s : NAN); } void sim_t::interactive_fregd(const std::string& cmd, const std::vector<std::string>& args) { fpr f; f.r = get_freg(args); - fprintf(stderr, "%g\n",f.d); + fprintf(stderr, "%g\n", isBoxedF64(f.r) ? f.d : NAN); } reg_t sim_t::get_mem(const std::vector<std::string>& args) |