summaryrefslogtreecommitdiff
path: root/firmware/asm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/asm')
-rw-r--r--firmware/asm/memcpy.c4
-rw-r--r--firmware/asm/memmove.c4
-rw-r--r--firmware/asm/memset.c4
-rw-r--r--firmware/asm/memset16.c4
-rw-r--r--firmware/asm/strlen.c4
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
37#include <string.h> 37#include <string.h>
38 38
39/* Nonzero if either X or Y is not aligned on a "long" boundary. */ 39/* Nonzero if either X or Y is not aligned on a "long" boundary. */
40#define UNALIGNED(X, Y) \ 40#define ROCKBOX_UNALIGNED(X, Y) \
41 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1))) 41 (((long)X & (sizeof (long) - 1)) | ((long)Y & (sizeof (long) - 1)))
42 42
43/* How many bytes are copied each iteration of the 4X unrolled loop. */ 43/* How many bytes are copied each iteration of the 4X unrolled loop. */
@@ -82,7 +82,7 @@ _DEFUN (memcpy, (dst0, src0, len0),
82 82
83 /* If the size is small, or either SRC or DST is unaligned, 83 /* If the size is small, or either SRC or DST is unaligned,
84 then punt into the byte copy loop. This should be rare. */ 84 then punt into the byte copy loop. This should be rare. */
85 if (!TOO_SMALL(len) && !UNALIGNED (src, dst)) 85 if (!TOO_SMALL(len) && !ROCKBOX_UNALIGNED (src, dst))
86 { 86 {
87 aligned_dst = (long*)dst; 87 aligned_dst = (long*)dst;
88 aligned_src = (long*)src; 88 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
40#include <string.h> 40#include <string.h>
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 4X unrolled loop. */ 46/* How many bytes are copied each iteration of the 4X unrolled loop. */
@@ -109,7 +109,7 @@ _DEFUN (memmove, (dst_void, src_void, length),
109 /* Use optimizing algorithm for a non-destructive copy to closely 109 /* Use optimizing algorithm for a non-destructive copy to closely
110 match memcpy. If the size is small or either SRC or DST is unaligned, 110 match memcpy. If the size is small or either SRC or DST is unaligned,
111 then punt into the byte copy loop. This should be rare. */ 111 then punt into the byte copy loop. This should be rare. */
112 if (!TOO_SMALL(len) && !UNALIGNED (src, dst)) 112 if (!TOO_SMALL(len) && !ROCKBOX_UNALIGNED (src, dst))
113 { 113 {
114 aligned_dst = (long*)dst; 114 aligned_dst = (long*)dst;
115 aligned_src = (long*)src; 115 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
37#include "_ansi.h" 37#include "_ansi.h"
38 38
39#define LBLOCKSIZE (sizeof(long)) 39#define LBLOCKSIZE (sizeof(long))
40#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) 40#define ROCKBOX_UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
41#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) 41#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
42 42
43_PTR 43_PTR
@@ -61,7 +61,7 @@ _DEFUN (memset, (m, c, n),
61 unsigned long buffer; 61 unsigned long buffer;
62 unsigned long *aligned_addr; 62 unsigned long *aligned_addr;
63 63
64 if (!TOO_SMALL (n) && !UNALIGNED (m)) 64 if (!TOO_SMALL (n) && !ROCKBOX_UNALIGNED (m))
65 { 65 {
66 /* If we get this far, we know that n is large and m is word-aligned. */ 66 /* If we get this far, we know that n is large and m is word-aligned. */
67 67
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 @@
22#include "string-extra.h" /* memset16() */ 22#include "string-extra.h" /* memset16() */
23 23
24#define LBLOCKSIZE (sizeof(long)/2) 24#define LBLOCKSIZE (sizeof(long)/2)
25#define UNALIGNED(X) ((long)X & (sizeof(long) - 1)) 25#define ROCKBOX_UNALIGNED(X) ((long)X & (sizeof(long) - 1))
26#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) 26#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
27 27
28void memset16(void *dst, int val, size_t len) 28void memset16(void *dst, int val, size_t len)
@@ -38,7 +38,7 @@ void memset16(void *dst, int val, size_t len)
38 unsigned long buffer; 38 unsigned long buffer;
39 unsigned long *aligned_addr; 39 unsigned long *aligned_addr;
40 40
41 if (!TOO_SMALL(len) && !UNALIGNED(dst)) 41 if (!TOO_SMALL(len) && !ROCKBOX_UNALIGNED(dst))
42 { 42 {
43 aligned_addr = (unsigned long *)dst; 43 aligned_addr = (unsigned long *)dst;
44 44
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
37#include <limits.h> 37#include <limits.h>
38 38
39#define LBLOCKSIZE (sizeof (long)) 39#define LBLOCKSIZE (sizeof (long))
40#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) 40#define ROCKBOX_UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
41 41
42#if LONG_MAX == 2147483647L 42#if LONG_MAX == 2147483647L
43#define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080) 43#define DETECTNULL(X) (((X) - 0x01010101) & ~(X) & 0x80808080)
@@ -73,7 +73,7 @@ _DEFUN (strlen, (str),
73 _CONST char *start = str; 73 _CONST char *start = str;
74 unsigned long *aligned_addr; 74 unsigned long *aligned_addr;
75 75
76 if (!UNALIGNED (str)) 76 if (!ROCKBOX_UNALIGNED (str))
77 { 77 {
78 /* If the string is word-aligned, we can check for the presence of 78 /* If the string is word-aligned, we can check for the presence of
79 a null in each word-sized block. */ 79 a null in each word-sized block. */