mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
Add check-annotations ensuring correct label
The issue was, that the disassembled label was placed one instruction further down than expected. Therefore the test annotations check, that the label is placed above the loop-contents (writing the one value, then writing the other one).
This commit is contained in:
parent
da44e3fdce
commit
652ba6699c
@ -21,6 +21,12 @@ macro_rules! asm {
|
||||
use minicore::ptr;
|
||||
|
||||
// CHECK-LABEL: pin_toggling
|
||||
// CHECK: .LBB0_1:
|
||||
// CHECK-NEXT: out 5, r17
|
||||
// CHECK-NEXT: call delay
|
||||
// CHECK-NEXT: out 5, r16
|
||||
// CHECK-NEXT: call delay
|
||||
// CHECK-NEXT: rjmp .LBB0_1
|
||||
#[no_mangle]
|
||||
pub fn pin_toggling() {
|
||||
let port_b = 0x25 as *mut u8; // the I/O-address of PORTB
|
||||
@ -33,6 +39,7 @@ pub fn pin_toggling() {
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
#[no_mangle]
|
||||
fn delay(_: u32) {
|
||||
unsafe { asm!("nop") };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user