summaryrefslogtreecommitdiff
path: root/firmware/libc
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/libc')
-rw-r--r--firmware/libc/memchr.c4
-rw-r--r--firmware/libc/memcmp.c4
-rw-r--r--firmware/libc/strchr.c4
-rw-r--r--firmware/libc/strcmp.c4
-rw-r--r--firmware/libc/strcpy.c4
-rw-r--r--firmware/libc/strncmp.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/firmware/libc/memchr.c b/firmware/libc/memchr.c
index 8b6b4d69d9..bd99cfbc4d 100644
--- a/firmware/libc/memchr.c
+++ b/firmware/libc/memchr.c
@@ -38,7 +38,7 @@ QUICKREF
38#include "_ansi.h" /* for _DEFUN */ 38#include "_ansi.h" /* for _DEFUN */
39 39
40/* Nonzero if X is not aligned on a "long" boundary. */ 40/* Nonzero if X is not aligned on a "long" boundary. */
41#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) 41#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof (long) - 1))
42 42
43/* How many bytes are loaded each iteration of the word copy loop. */ 43/* How many bytes are loaded each iteration of the word copy loop. */
44#define LBLOCKSIZE (sizeof (long)) 44#define LBLOCKSIZE (sizeof (long))
@@ -82,7 +82,7 @@ _DEFUN (memchr, (s1, i, n),
82 unsigned long mask,j; 82 unsigned long mask,j;
83 unsigned long *aligned_addr; 83 unsigned long *aligned_addr;
84 84
85 if (!UNALIGNED (s)) 85 if (!ROCKBOX_UNALIGNED (s))
86 { 86 {
87 mask = 0; 87 mask = 0;
88 for (j = 0; j < LBLOCKSIZE; j++) 88 for (j = 0; j < LBLOCKSIZE; j++)
diff --git a/firmware/libc/memcmp.c b/firmware/libc/memcmp.c
index c2fa1bf6b7..e2894bb05a 100644
--- a/firmware/libc/memcmp.c
+++ b/firmware/libc/memcmp.c
@@ -40,7 +40,7 @@ QUICKREF
40#include "_ansi.h" /* for _DEFUN */ 40#include "_ansi.h" /* for _DEFUN */
41 41
42/* Nonzero if either X or Y is not aligned on a "long" boundary. */ 42/* Nonzero if either X or Y is not aligned on a "long" boundary. */
43#define UNALIGNED(X, Y) \ 43#define ROCKBOX_UNALIGNED(X, Y) \
44 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) 44 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
45 45
46/* How many bytes are copied each iteration of the word copy loop. */ 46/* How many bytes are copied each iteration of the word copy loop. */
@@ -78,7 +78,7 @@ _DEFUN (memcmp, (m1, m2, n),
78 /* If the size is too small, or either pointer is unaligned, 78 /* If the size is too small, or either pointer is unaligned,
79 then we punt to the byte compare loop. Hopefully this will 79 then we punt to the byte compare loop. Hopefully this will
80 not turn up in inner loops. */ 80 not turn up in inner loops. */
81 if (!TOO_SMALL(n) && !UNALIGNED(s1,s2)) 81 if (!TOO_SMALL(n) && !ROCKBOX_UNALIGNED(s1,s2))
82 { 82 {
83 /* Otherwise, load and compare the blocks of memory one 83 /* Otherwise, load and compare the blocks of memory one
84 word at a time. */ 84 word at a time. */
diff --git a/firmware/libc/strchr.c b/firmware/libc/strchr.c
index ada6e2d098..425d4a2f7a 100644
--- a/firmware/libc/strchr.c
+++ b/firmware/libc/strchr.c
@@ -38,7 +38,7 @@ QUICKREF
38#include "_ansi.h" /* for _DEFUN */ 38#include "_ansi.h" /* for _DEFUN */
39 39
40/* Nonzero if X is not aligned on a "long" boundary. */ 40/* Nonzero if X is not aligned on a "long" boundary. */
41#define UNALIGNED(X) ((long)X & (sizeof (long) - 1)) 41#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof (long) - 1))
42 42
43/* How many bytes are loaded each iteration of the word copy loop. */ 43/* How many bytes are loaded each iteration of the word copy loop. */
44#define LBLOCKSIZE (sizeof (long)) 44#define LBLOCKSIZE (sizeof (long))
@@ -83,7 +83,7 @@ _DEFUN (strchr, (s1, i),
83 unsigned long mask,j; 83 unsigned long mask,j;
84 unsigned long *aligned_addr; 84 unsigned long *aligned_addr;
85 85
86 if (!UNALIGNED (s)) 86 if (!ROCKBOX_UNALIGNED (s))
87 { 87 {
88 mask = 0; 88 mask = 0;
89 for (j = 0; j < LBLOCKSIZE; j++) 89 for (j = 0; j < LBLOCKSIZE; j++)
diff --git a/firmware/libc/strcmp.c b/firmware/libc/strcmp.c
index d540fae7dd..c1487dab74 100644
--- a/firmware/libc/strcmp.c
+++ b/firmware/libc/strcmp.c
@@ -40,7 +40,7 @@ QUICKREF
40#include "_ansi.h" /* for _DEFUN */ 40#include "_ansi.h" /* for _DEFUN */
41 41
42/* Nonzero if either X or Y is not aligned on a "long" boundary. */ 42/* Nonzero if either X or Y is not aligned on a "long" boundary. */
43#define UNALIGNED(X, Y) \ 43#define ROCKBOX_UNALIGNED(X, Y) \
44 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) 44 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
45 45
46/* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ 46/* DETECTNULL returns nonzero if (long)X contains a NULL byte. */
@@ -76,7 +76,7 @@ _DEFUN (strcmp, (s1, s2),
76 unsigned long *a2; 76 unsigned long *a2;
77 77
78 /* If s1 or s2 are unaligned, then compare bytes. */ 78 /* If s1 or s2 are unaligned, then compare bytes. */
79 if (!UNALIGNED (s1, s2)) 79 if (!ROCKBOX_UNALIGNED (s1, s2))
80 { 80 {
81 /* If s1 and s2 are word-aligned, compare them a word at a time. */ 81 /* If s1 and s2 are word-aligned, compare them a word at a time. */
82 a1 = (unsigned long*)s1; 82 a1 = (unsigned long*)s1;
diff --git a/firmware/libc/strcpy.c b/firmware/libc/strcpy.c
index 035e2bda9e..166a74967d 100644
--- a/firmware/libc/strcpy.c
+++ b/firmware/libc/strcpy.c
@@ -40,7 +40,7 @@ QUICKREF
40/*SUPPRESS 530*/ 40/*SUPPRESS 530*/
41 41
42/* Nonzero if either X or Y is not aligned on a "long" boundary. */ 42/* Nonzero if either X or Y is not aligned on a "long" boundary. */
43#define UNALIGNED(X, Y) \ 43#define ROCKBOX_UNALIGNED(X, Y) \
44 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) 44 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
45 45
46#if LONG_MAX == 2147483647L 46#if LONG_MAX == 2147483647L
@@ -77,7 +77,7 @@ _DEFUN (strcpy, (dst0, src0),
77 _CONST long *aligned_src; 77 _CONST long *aligned_src;
78 78
79 /* If SRC or DEST is unaligned, then copy bytes. */ 79 /* If SRC or DEST is unaligned, then copy bytes. */
80 if (!UNALIGNED (src, dst)) 80 if (!ROCKBOX_UNALIGNED (src, dst))
81 { 81 {
82 aligned_dst = (long*)dst; 82 aligned_dst = (long*)dst;
83 aligned_src = (long*)src; 83 aligned_src = (long*)src;
diff --git a/firmware/libc/strncmp.c b/firmware/libc/strncmp.c
index 315fae810a..83e8d5b457 100644
--- a/firmware/libc/strncmp.c
+++ b/firmware/libc/strncmp.c
@@ -41,7 +41,7 @@ QUICKREF
41#include "_ansi.h" /* for _DEFUN */ 41#include "_ansi.h" /* for _DEFUN */
42 42
43/* Nonzero if either X or Y is not aligned on a "long" boundary. */ 43/* Nonzero if either X or Y is not aligned on a "long" boundary. */
44#define UNALIGNED(X, Y) \ 44#define ROCKBOX_UNALIGNED(X, Y) \
45 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) 45 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
46 46
47/* DETECTNULL returns nonzero if (long)X contains a NULL byte. */ 47/* DETECTNULL returns nonzero if (long)X contains a NULL byte. */
@@ -86,7 +86,7 @@ _DEFUN (strncmp, (s1, s2, n),
86 return 0; 86 return 0;
87 87
88 /* If s1 or s2 are unaligned, then compare bytes. */ 88 /* If s1 or s2 are unaligned, then compare bytes. */
89 if (!UNALIGNED (s1, s2)) 89 if (!ROCKBOX_UNALIGNED (s1, s2))
90 { 90 {
91 /* If s1 and s2 are word-aligned, compare them a word at a time. */ 91 /* If s1 and s2 are word-aligned, compare them a word at a time. */
92 a1 = (unsigned long*)s1; 92 a1 = (unsigned long*)s1;