Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 652ba66

Browse files
committed
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).
1 parent da44e3f commit 652ba66

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/assembly/avr-rjmp-offsets.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ macro_rules! asm {
2121
use minicore::ptr;
2222

2323
// CHECK-LABEL: pin_toggling
24+
// CHECK: .LBB0_1:
25+
// CHECK-NEXT: out 5, r17
26+
// CHECK-NEXT: call delay
27+
// CHECK-NEXT: out 5, r16
28+
// CHECK-NEXT: call delay
29+
// CHECK-NEXT: rjmp .LBB0_1
2430
#[no_mangle]
2531
pub fn pin_toggling() {
2632
let port_b = 0x25 as *mut u8; // the I/O-address of PORTB
@@ -33,6 +39,7 @@ pub fn pin_toggling() {
3339
}
3440

3541
#[inline(never)]
42+
#[no_mangle]
3643
fn delay(_: u32) {
3744
unsafe { asm!("nop") };
3845
}

0 commit comments

Comments
 (0)