nrf/mphalport: Remove need for "syntax unified" in mp_hal_delay_us.

Because it can confuse older versions of gcc.  Instead use the correct
instruction for Thumb vs Thumb-2 (sub vs subs) so the assembler emits the
2-byte instruction.

Related to commit 1aa9ff9141.
pull/6043/head
Damien George 2020-05-15 00:44:25 +10:00
rodzic eb5e9c00f8
commit 8f348778e1
1 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -99,11 +99,12 @@ void mp_hal_delay_us(mp_uint_t us) {
}
register uint32_t delay __ASM("r0") = us;
__ASM volatile (
#ifdef NRF51
".syntax unified\n"
#endif
"1:\n"
#ifdef NRF51
" SUB %0, %0, #1\n"
#else
" SUBS %0, %0, #1\n"
#endif
" NOP\n"
" NOP\n"
" NOP\n"