()
| 68 | |
| 69 | #[test_case] |
| 70 | fn handler_changes_regs() { |
| 71 | unsafe { |
| 72 | asm!("mov r11, 0x4242", |
| 73 | "mov rcx, 0x93", |
| 74 | "mov rdi, 0x22" |
| 75 | ); |
| 76 | } |
| 77 | |
| 78 | // Wait for an interrupt |
| 79 | unsafe {asm!("hlt");} |
| 80 | |
| 81 | // Get the register values |
| 82 | let (r11, rdi, rcx): (i64, i64, i64); |
| 83 | unsafe {asm!("nop", |
| 84 | lateout("r11") r11, |
| 85 | lateout("rcx") rcx, |
| 86 | lateout("rdi") rdi);} |
| 87 | |
| 88 | assert_eq!(rdi, 0x22); |
| 89 | assert_eq!(r11, rdi + 0x5321); |
| 90 | assert_eq!(rcx, 0xdeadbeef); |
| 91 | } |
nothing calls this directly
no outgoing calls
no test coverage detected