pvmfw: Improve asm! options for DC CVAU
The instruction doesn't modify memory or the stack in a Rust-noticeable
way and shouldn't modify the NZCV/FPSR flags.
Test: atest MicrodroidHostTests
Change-Id: I7d9942f8c039dd49d052d6af784de3ac9f588c36
diff --git a/pvmfw/src/helpers.rs b/pvmfw/src/helpers.rs
index 4df9386..5d9a75b 100644
--- a/pvmfw/src/helpers.rs
+++ b/pvmfw/src/helpers.rs
@@ -97,7 +97,13 @@
for line in (start..end).step_by(line_size) {
// SAFETY - Clearing cache lines shouldn't have Rust-visible side effects.
- unsafe { asm!("dc cvau, {x}", x = in(reg) line) }
+ unsafe {
+ asm!(
+ "dc cvau, {x}",
+ x = in(reg) line,
+ options(nomem, nostack, preserves_flags),
+ )
+ }
}
}