diff options
-rw-r--r-- | src/asmmemfuncs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/asmmemfuncs.h b/src/asmmemfuncs.h index d6f508c..f9ff745 100644 --- a/src/asmmemfuncs.h +++ b/src/asmmemfuncs.h @@ -2,7 +2,7 @@ #define _ASMMEMFUNCS_H_
#define memset32(_dst, _c, _count) \
-({ uint32_t *dst = (_dst); uint32_t c = (_c); int count = (_count); uint32_t dummy0, dummy1, dummy2; \
+({ uint32_t *dst = (_dst); register uint32_t c asm ("r7") = (_c); int count = (_count); register uint32_t dummy0 asm ("r4"), dummy1 asm ("r5"), dummy2 asm ("r6"); \
__asm__ __volatile__ ( \
" cmp %[count], #4\n" \
" blt 2f\n" \
@@ -35,7 +35,7 @@ })
#define memset16(_dst, _c, _count) \
-({ uint16_t *dst = (_dst); uint16_t c = (_c); int count = (_count); uint32_t dummy0, dummy1, dummy2; \
+({ uint16_t *dst = (_dst); register uint16_t c asm ("r7") = (_c); int count = (_count); register uint32_t dummy0 asm ("r4"), dummy1 asm ("r5"), dummy2 asm ("r6"); \
__asm__ __volatile__ ( \
" cmp %[count], #2\n" \
" blt 3f\n" \
|