projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3af71c7
)
Enable interrupts in bmarks
author
Christopher Celio
<celio@eecs.berkeley.edu>
Wed, 10 Sep 2014 21:17:01 +0000
(14:17 -0700)
committer
Christopher Celio
<celio@eecs.berkeley.edu>
Wed, 10 Sep 2014 21:17:01 +0000
(14:17 -0700)
benchmarks/common/crt.S
patch
|
blob
|
history
diff --git
a/benchmarks/common/crt.S
b/benchmarks/common/crt.S
index 82cad93f76e8d4292a935587ab6122b6a0e1dd38..e35608e0d56c50fa435e7b1ebf0c504985f7582e 100644
(file)
--- a/
benchmarks/common/crt.S
+++ b/
benchmarks/common/crt.S
@@
-44,21
+44,20
@@
_start:
li x30,0
li x31,0
li x30,0
li x31,0
+ # initialize status, enable fp, accelerator, interrupts
+ li a0, SR_S | SR_PEI | SR_EF | SR_EA
+ csrw status, a0
+
#ifdef __riscv64
li a0, SR_U64 | SR_S64
csrs status, a0
#endif
#ifdef __riscv64
li a0, SR_U64 | SR_S64
csrs status, a0
#endif
- csrc status, SR_PS
-
- # enable fp and accelerator
- li a0, SR_EF | SR_EA
- csrs status, a0
csrr t0, status
and t1, t0, SR_EA
sw t1, have_vec, t2
csrr t0, status
and t1, t0, SR_EA
sw t1, have_vec, t2
- ## if that didn't stick, we don't have a
n
FPU, so don't initialize it
+ ## if that didn't stick, we don't have a FPU, so don't initialize it
and t1, t0, SR_EF
beqz t1, 1f
and t1, t0, SR_EF
beqz t1, 1f