From: Mikko Rasa Date: Mon, 13 May 2013 17:47:59 +0000 (+0300) Subject: Fix an inline asm constraint X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=39a8531ba664b0e39c781c94b0529d1f9431d4b6;p=model-railway-devices.git Fix an inline asm constraint The sbiw instruction is limited to certain word-capable registers, and the compiler needs to be informed that such a register is needed. --- diff --git a/common/delay.h b/common/delay.h index 725d22b..9b81376 100644 --- a/common/delay.h +++ b/common/delay.h @@ -16,7 +16,7 @@ static inline void __attribute__((always_inline)) delay_loop16(uint16_t count) __asm__ volatile ( "1: sbiw %0, 1" "\n\t" "brne 1b" - : "=r" (count) + : "=w" (count) : "0" (count) ); }