Skip to content

Commit

Permalink
Extra comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiusabou committed Feb 9, 2021
1 parent 66955af commit 7b66016
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions asm/inline.rs
Expand Up @@ -55,6 +55,7 @@ pub unsafe fn __delay(cyc: u32) {
// The loop will normally take 3 to 4 CPU cycles per iteration, but superscalar cores
// (eg. Cortex-M7) can potentially do it in 2, so we use that as the lower bound, since delaying
// for more cycles is okay.
// Add 1 to prevent an integer underflow which would cause a long freeze
let real_cyc = 1 + cyc / 2;
asm!(
// Use local labels to avoid R_ARM_THM_JUMP8 relocations which fail on thumbv6m.
Expand Down

0 comments on commit 7b66016

Please sign in to comment.