projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4350ef
)
Check for F extension when accessing FCSR
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Sat, 4 Apr 2015 22:17:13 +0000
(15:17 -0700)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Sat, 4 Apr 2015 22:17:13 +0000
(15:17 -0700)
riscv/processor.cc
patch
|
blob
|
history
diff --git
a/riscv/processor.cc
b/riscv/processor.cc
index 11872656059c93f4556b0b8477b919937904a7ab..1fe0a9c3813fd591f4e032379d66272214c68225 100644
(file)
--- a/
riscv/processor.cc
+++ b/
riscv/processor.cc
@@
-460,12
+460,18
@@
reg_t processor_t::get_csr(int which)
{
case CSR_FFLAGS:
require_fp;
+ if (!supports_extension('F'))
+ break;
return state.fflags;
case CSR_FRM:
require_fp;
+ if (!supports_extension('F'))
+ break;
return state.frm;
case CSR_FCSR:
require_fp;
+ if (!supports_extension('F'))
+ break;
return (state.fflags << FSR_AEXC_SHIFT) | (state.frm << FSR_RD_SHIFT);
case CSR_CYCLE:
case CSR_TIME: