diff options
author | Matthias Mohr <Rockbox@Mohrenclan.de> | 2017-01-15 13:29:40 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-01-15 21:32:49 +0100 |
commit | d984725cbf38d0a9e71c866ae61c48ad488373b4 (patch) | |
tree | fc064f5fa0baf667bbcd09d56bc350fbb2b5a0d9 /firmware/asm | |
parent | 955be5b34af2e6cf374162ea8b4d4451b1644952 (diff) |
Renamed defines UNALIGNED to ROCKBOX_UNALIGNED - UNALIGNED is already
defined in mingw environments.
Renamed defines of UNALIGNED to ROCKBOX_UNALIGNED so that they don't
conflict with definitions in mingw32 cross-compiling environments
(defined in _mingw.h).
Change-Id: I369848c0f507e6bf5ff9ab4a60663bbbda6edc52
Diffstat (limited to 'firmware/asm')
-rw-r--r-- | firmware/asm/memcpy.c | 4 | ||||
-rw-r--r-- | firmware/asm/memmove.c | 4 | ||||
-rw-r--r-- | firmware/asm/memset.c | 4 | ||||
-rw-r--r-- | firmware/asm/memset16.c | 4 | ||||
-rw-r--r-- | firmware/asm/strlen.c | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/firmware/asm/memcpy.c b/firmware/asm/memcpy.c index c5456ab41f..df78eea883 100644 --- a/firmware/asm/memcpy.c +++ b/firmware/asm/memcpy.c @@ -37,7 +37,7 @@ QUICKREF #include <string.h> /* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ +#define ROCKBOX_UNALIGNED(X, Y) \ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) /* How many bytes are copied each iteration of the 4X unrolled loop. */ @@ -82,7 +82,7 @@ _DEFUN (memcpy, (dst0, src0, len0), /* If the size is small, or either SRC or DST is unaligned, then punt into the byte copy loop. This should be rare. */ - if (!TOO_SMALL(len) && !UNALIGNED (src, dst)) + if (!TOO_SMALL(len) && !ROCKBOX_UNALIGNED (src, dst)) { aligned_dst = (long*)dst; aligned_src = (long*)src; diff --git a/firmware/asm/memmove.c b/firmware/asm/memmove.c index 5f423964bb..5c2adf20a7 100644 --- a/firmware/asm/memmove.c +++ b/firmware/asm/memmove.c @@ -40,7 +40,7 @@ QUICKREF #include <string.h> /* Nonzero if either X or Y is not aligned on a "long" boundary. */ -#define UNALIGNED(X, Y) \ +#define ROCKBOX_UNALIGNED(X, Y) \ (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) /* How many bytes are copied each iteration of the 4X unrolled loop. */ @@ -109,7 +109,7 @@ _DEFUN (memmove, (dst_void, src_void, length), /* Use optimizing algorithm for a non-destructive copy to closely match memcpy. If the size is small or either SRC or DST is unaligned, then punt into the byte copy loop. This should be rare. */ - if (!TOO_SMALL(len) && !UNALIGNED (src, dst)) + if (!TOO_SMALL(len) && !ROCKBOX_UNALIGNED (src, dst)) { aligned_dst = (long*)dst; aligned_src = (long*)src; diff --git a/firmware/asm/memset.c b/firmware/asm/memset.c index 7b8d2137e8..967a973c5d 100644 --- a/firmware/asm/memset.c +++ b/firmware/asm/memset.c @@ -37,7 +37,7 @@ QUICKREF #include "_ansi.h" #define LBLOCKSIZE (sizeof(long)) -#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) +#define ROCKBOX_UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) _PTR @@ -61,7 +61,7 @@ _DEFUN (memset, (m, c, n), unsigned long buffer; unsigned long *aligned_addr; - if (!TOO_SMALL (n) && !UNALIGNED (m)) + if (!TOO_SMALL (n) && !ROCKBOX_UNALIGNED (m)) { /* If we get this far, we know that n is large and m is word-aligned. */ diff --git a/firmware/asm/memset16.c b/firmware/asm/memset16.c index 7e31df0cdd..db71d86fcc 100644 --- a/firmware/asm/memset16.c +++ b/firmware/asm/memset16.c @@ -22,7 +22,7 @@ #include "string-extra.h" /* memset16() */ #define LBLOCKSIZE (sizeof(long)/2) -#define UNALIGNED(X) ((long)X & (sizeof(long) - 1)) +#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof(long) - 1)) #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) void memset16(void *dst, int val, size_t len) @@ -38,7 +38,7 @@ void memset16(void *dst, int val, size_t len) unsigned long buffer; unsigned long *aligned_addr; - if (!TOO_SMALL(len) && !UNALIGNED(dst)) + if (!TOO_SMALL(len) && !ROCKBOX_UNALIGNED(dst)) { aligned_addr = (unsigned long *)dst; diff --git a/firmware/asm/strlen.c b/firmware/asm/strlen.c index 649df6764b..d5326584b5 100644 --- a/firmware/asm/strlen.c +++ b/firmware/asm/strlen.c @@ -37,7 +37,7 @@ QUICKREF #include <limits.h> #define LBLOCKSIZE (sizeof (long)) -#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) +#define ROCKBOX_UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) #if LONG_MAX == 2147483647L #define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) @@ -73,7 +73,7 @@ _DEFUN (strlen, (str), _CONST char *start = str; unsigned long *aligned_addr; - if (!UNALIGNED (str)) + if (!ROCKBOX_UNALIGNED (str)) { /* If the string is word-aligned, we can check for the presence of a null in each word-sized block. */ |