Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/highlight_related.rs')
-rw-r--r--crates/ide/src/highlight_related.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide/src/highlight_related.rs b/crates/ide/src/highlight_related.rs
index 5348e855be..4c8e3fc304 100644
--- a/crates/ide/src/highlight_related.rs
+++ b/crates/ide/src/highlight_related.rs
@@ -2007,4 +2007,34 @@ fn main() {
"#,
)
}
+
+ #[test]
+ fn asm() {
+ check(
+ r#"
+//- minicore: asm
+#[inline]
+pub unsafe fn bootstrap() -> ! {
+ builtin#asm(
+ "blabla",
+ "mrs {tmp}, CONTROL",
+ // ^^^ read
+ "blabla",
+ "bics {tmp}, {spsel}",
+ // ^^^ read
+ "blabla",
+ "msr CONTROL, {tmp}",
+ // ^^^ read
+ "blabla",
+ tmp$0 = inout(reg) 0,
+ // ^^^
+ aaa = in(reg) 2,
+ aaa = in(reg) msp,
+ aaa = in(reg) rv,
+ options(noreturn, nomem, nostack),
+ );
+}
+"#,
+ )
+ }
}