Skip to content

Commit 9dfe396

Browse files
committed
typo
Signed-off-by: YdrMaster <ydrml@hotmail.com>
1 parent 74c103b commit 9dfe396

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rustsbi-qemu/src/execute.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub(crate) fn execute_supervisor(hsm: &QemuHsm, supervisor: Supervisor) {
9191

9292
ctx.do_transfer_trap(T::Exception(E::IllegalInstruction));
9393
}
94-
// TODO 可以修复非原子的非对称访存
94+
// TODO 可以修复非原子的非对齐访存
9595
t => panic!("unsupported trap: {t:?}"),
9696
}
9797
}
@@ -211,7 +211,7 @@ unsafe extern "C" fn m_to_s(ctx: &mut Context) {
211211
sd sp, 0(a0)
212212
mv sp, a0
213213
",
214-
// 利用 tx 恢复 csr
214+
// 利用 ctx 恢复 csr
215215
// S ctx.x[2](sp) => mscratch
216216
// S ctx.mstatus => mstatus
217217
// S ctx.mepc => mepc
@@ -277,7 +277,7 @@ unsafe extern "C" fn s_to_m() {
277277
.set n, n+1
278278
.endr
279279
",
280-
// 利用 tx 保存 csr
280+
// 利用 ctx 保存 csr
281281
// mscratch => S ctx.x[2](sp)
282282
// mstatus => S ctx.mstatus
283283
// mepc => S ctx.mepc
@@ -293,7 +293,7 @@ unsafe extern "C" fn s_to_m() {
293293
"
294294
ld sp, 0(sp)
295295
",
296-
// 恢复 s[0..12]
296+
// 恢复 x[1..31]
297297
"
298298
.set n, 1
299299
.rept 31

0 commit comments

Comments
 (0)