mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
prevent formatting of assembly
This commit is contained in:
parent
f4c127684b
commit
1761b38b23
1 changed files with 4 additions and 2 deletions
|
|
@ -553,6 +553,7 @@ impl Swap {
|
||||||
let working_stack_ptr: usize =
|
let working_stack_ptr: usize =
|
||||||
EXCEPTION_STACK_TOP - self.oom_stack_backing.len() * core::mem::size_of::<usize>();
|
EXCEPTION_STACK_TOP - self.oom_stack_backing.len() * core::mem::size_of::<usize>();
|
||||||
unsafe {
|
unsafe {
|
||||||
|
#[rustfmt::skip]
|
||||||
core::arch::asm!(
|
core::arch::asm!(
|
||||||
"mv a7, {working_stack_end}",
|
"mv a7, {working_stack_end}",
|
||||||
"mv a6, {working_stack_ptr}",
|
"mv a6, {working_stack_ptr}",
|
||||||
|
|
@ -569,7 +570,7 @@ impl Swap {
|
||||||
working_stack_ptr = in(reg) working_stack_ptr,
|
working_stack_ptr = in(reg) working_stack_ptr,
|
||||||
backup_stack_ptr = in(reg) backup_stack_ptr,
|
backup_stack_ptr = in(reg) backup_stack_ptr,
|
||||||
current_sp = out(reg) current_sp,
|
current_sp = out(reg) current_sp,
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
// this assert will hopefully save us during CI testing if parameters changed and we have to fix them
|
// this assert will hopefully save us during CI testing if parameters changed and we have to fix them
|
||||||
// the assert itself would modify stack, but, we're on the path to a panic so that's OK
|
// the assert itself would modify stack, but, we're on the path to a panic so that's OK
|
||||||
|
|
@ -588,6 +589,7 @@ impl Swap {
|
||||||
let working_restore_ptr: usize =
|
let working_restore_ptr: usize =
|
||||||
EXCEPTION_STACK_TOP - self.oom_stack_backing.len() * core::mem::size_of::<usize>();
|
EXCEPTION_STACK_TOP - self.oom_stack_backing.len() * core::mem::size_of::<usize>();
|
||||||
unsafe {
|
unsafe {
|
||||||
|
#[rustfmt::skip]
|
||||||
core::arch::asm!(
|
core::arch::asm!(
|
||||||
"mv a7, {working_restore_end}",
|
"mv a7, {working_restore_end}",
|
||||||
"mv a6, {working_restore_ptr}",
|
"mv a6, {working_restore_ptr}",
|
||||||
|
|
@ -602,7 +604,7 @@ impl Swap {
|
||||||
working_restore_end = in(reg) working_restore_end,
|
working_restore_end = in(reg) working_restore_end,
|
||||||
working_restore_ptr = in(reg) working_restore_ptr,
|
working_restore_ptr = in(reg) working_restore_ptr,
|
||||||
restore_stack_ptr = in(reg) restore_stack_ptr,
|
restore_stack_ptr = in(reg) restore_stack_ptr,
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "debug-swap-verbose")]
|
#[cfg(feature = "debug-swap-verbose")]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue