Add write function for sstatus register

This commit is contained in:
Vadim Kaushan 2019-03-28 18:56:49 +03:00
parent 9bb3b5803c
commit 5baba0cb32
No known key found for this signature in database
GPG Key ID: A501C5DF67C05C4E
2 changed files with 2 additions and 1 deletions

2
asm.S
View File

@ -49,7 +49,7 @@ REG_READ(sie, 0x104)
REG_SET_CLEAR(sie, 0x104) REG_SET_CLEAR(sie, 0x104)
REG_READ(sip, 0x144) REG_READ(sip, 0x144)
REG_READ_WRITE(sscratch, 0x140) REG_READ_WRITE(sscratch, 0x140)
REG_READ(sstatus, 0x100) REG_READ_WRITE(sstatus, 0x100)
REG_SET_CLEAR(sstatus, 0x100) REG_SET_CLEAR(sstatus, 0x100)
REG_READ(stval, 0x143) REG_READ(stval, 0x143)
REG_READ_WRITE(stvec, 0x105) REG_READ_WRITE(stvec, 0x105)

View File

@ -105,6 +105,7 @@ impl Sstatus {
} }
read_csr_as!(Sstatus, 0x100, __read_sstatus); read_csr_as!(Sstatus, 0x100, __read_sstatus);
write_csr!(0x100, __write_sstatus);
set!(0x100, __set_sstatus); set!(0x100, __set_sstatus);
clear!(0x100, __clear_sstatus); clear!(0x100, __clear_sstatus);