The ARM Cortex-M7 core can execute a basic delay loop of the form ADDR: subs r0,...

@cliffle@hachyderm.io

The ARM Cortex-M7 core can execute a basic delay loop of the form

ADDR: subs r0, #1
ADDR+2: bne ADDR

...in one cycle per iteration with the icache on.

...except when ADDR%8==6.

This means the cortex_m::asm::delay routine is still wrong on M7 (the delay is often too short by a factor of 2), but may become correct on some builds depending on the linker.

I found this using my M7 pipeline analysis harness I wrote last week, but it was actually motivated by firmware becoming flaky at work -- turns out, we had some code that was depending on being at ADDR%8==6 without realizing it.