From cf4e1c67d3af5b40408a6ef0c8c17959fd438662 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 22 Aug 2012 17:04:23 -0400 Subject: Revert "Re-work the constraints on delay_us(). Ask GCC to allocate a register" This reverts commit 715a63dccb3a39d7d0502fb39b900c8302a60a87. It fails to build using the 2010 CodeSourcery toolchain, which is still the latest officially supported version. Signed-off-by: Marti Bolivar --- libmaple/include/libmaple/delay.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libmaple/include/libmaple') diff --git a/libmaple/include/libmaple/delay.h b/libmaple/include/libmaple/delay.h index fbe7d1b..472a208 100644 --- a/libmaple/include/libmaple/delay.h +++ b/libmaple/include/libmaple/delay.h @@ -50,12 +50,12 @@ static inline void delay_us(uint32 us) { /* fudge for function call overhead */ us--; - asm volatile("1: subs %[us], #1 \n\t" + asm volatile(" mov r0, %[us] \n\t" + "1: subs r0, #1 \n\t" " bhi 1b \n\t" - : [us] "=r" (us) - : "[us]" (us) : - ); + : [us] "r" (us) + : "r0"); } #ifdef __cplusplus -- cgit v1.2.3