1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
macro_rules! define_instruction {
($inst: expr, $fun: ident) => {
#[doc = "invoke `"]
#[doc = $inst]
#[doc = "` instruction"]
pub unsafe fn $fun() {
asm!($inst : : : : "volatile");
}
};
($inst: ident) => {
define_instruction!(stringify!($inst), $inst);
}
}
define_instruction!(wait);
define_instruction!(nop);
define_instruction!(tlbr);
define_instruction!(tlbp);
define_instruction!(tlbwr);
define_instruction!(tlbwi);
define_instruction!(syscall);
define_instruction!("break", breakpoint);
define_instruction!("eret", exception_return);