Patch for stlink issue 65

  • Download Gist
0001-Fixed-error-about-strexh-and-strexb-using-the-same-r.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
From 7341a316c38a61cc745ce04e618916677007883b Mon Sep 17 00:00:00 2001
From: Timothy Brom <thb@timbrom.com>
Date: Wed, 29 Feb 2012 11:29:55 -0500
Subject: [PATCH] Fixed error about strexh and strexb using the same register
 
---
example/libs_stm/inc/core_support/core_cm3.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
 
diff --git a/example/libs_stm/inc/core_support/core_cm3.c b/example/libs_stm/inc/core_support/core_cm3.c
index 56fddc5..0e8c3c4 100644
--- a/example/libs_stm/inc/core_support/core_cm3.c
+++ b/example/libs_stm/inc/core_support/core_cm3.c
@@ -733,7 +733,7 @@ uint32_t __STREXB(uint8_t value, uint8_t *addr)
{
uint32_t result=0;
- __ASM volatile ("strexb %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
+ __ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) );
return(result);
}
@@ -750,7 +750,7 @@ uint32_t __STREXH(uint16_t value, uint16_t *addr)
{
uint32_t result=0;
- __ASM volatile ("strexh %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
+ __ASM volatile ("strexh %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value) );
return(result);
}
--
1.7.5.4

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.