Skip to content

Commit 5baba0c

Browse files
committed
Add write function for sstatus register
1 parent 9bb3b58 commit 5baba0c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

asm.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ REG_READ(sie, 0x104)
4949
REG_SET_CLEAR(sie, 0x104)
5050
REG_READ(sip, 0x144)
5151
REG_READ_WRITE(sscratch, 0x140)
52-
REG_READ(sstatus, 0x100)
52+
REG_READ_WRITE(sstatus, 0x100)
5353
REG_SET_CLEAR(sstatus, 0x100)
5454
REG_READ(stval, 0x143)
5555
REG_READ_WRITE(stvec, 0x105)

src/register/sstatus.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ impl Sstatus {
105105
}
106106

107107
read_csr_as!(Sstatus, 0x100, __read_sstatus);
108+
write_csr!(0x100, __write_sstatus);
108109
set!(0x100, __set_sstatus);
109110
clear!(0x100, __clear_sstatus);
110111

0 commit comments

Comments
 (0)