Skip to content

Commit 7b66016

Browse files
committed
Extra comment
1 parent 66955af commit 7b66016

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

asm/inline.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ pub unsafe fn __delay(cyc: u32) {
5555
// The loop will normally take 3 to 4 CPU cycles per iteration, but superscalar cores
5656
// (eg. Cortex-M7) can potentially do it in 2, so we use that as the lower bound, since delaying
5757
// for more cycles is okay.
58+
// Add 1 to prevent an integer underflow which would cause a long freeze
5859
let real_cyc = 1 + cyc / 2;
5960
asm!(
6061
// Use local labels to avoid R_ARM_THM_JUMP8 relocations which fail on thumbv6m.

0 commit comments

Comments
 (0)