27 #include <linux/types.h>
28 #include <linux/stddef.h>
29 #include <linux/compiler.h>
30 #include <linux/module.h>
31 #include <linux/string.h>
33 #ifdef __HAVE_ARCH_MEMMOVE
34 #ifndef CONFIG_OPT_LIB_FUNCTION
37 const char *
src = v_src;
45 return memcpy(v_dst, v_src, c);
60 const char *src = v_src;
70 return memcpy(v_dst, v_src, c);
84 unsigned value, buf_hold;
89 switch ((
unsigned long)dst & 3) {
104 switch ((
unsigned long)src & 3) {
107 i_src = (
const void *)src;
109 for (; c >= 4; c -= 4)
112 src = (
const void *)i_src;
116 i_src = (
const void *) (((
unsigned)src + 4) & ~3);
117 #ifndef __MICROBLAZEEL__
119 buf_hold = *--i_src >> 24;
121 for (; c >= 4; c -= 4) {
123 *--i_dst = buf_hold << 8 |
value;
124 buf_hold = value >> 24;
128 buf_hold = (*--i_src & 0xFF) << 24;
130 for (; c >= 4; c -= 4) {
132 *--i_dst = buf_hold | ((value & 0xFFFFFF00)>>8);
133 buf_hold = (value & 0xFF) << 24;
137 src = (
const void *)i_src;
142 i_src = (
const void *) (((
unsigned)src + 4) & ~3);
143 #ifndef __MICROBLAZEEL__
145 buf_hold = *--i_src >> 16;
147 for (; c >= 4; c -= 4) {
149 *--i_dst = buf_hold << 16 |
value;
150 buf_hold = value >> 16;
154 buf_hold = (*--i_src & 0xFFFF) << 16;
156 for (; c >= 4; c -= 4) {
158 *--i_dst = buf_hold | ((value & 0xFFFF0000)>>16);
159 buf_hold = (value & 0xFFFF) << 16;
163 src = (
const void *)i_src;
168 i_src = (
const void *) (((
unsigned)src + 4) & ~3);
169 #ifndef __MICROBLAZEEL__
171 buf_hold = *--i_src >> 8;
173 for (; c >= 4; c -= 4) {
175 *--i_dst = buf_hold << 24 |
value;
176 buf_hold = value >> 8;
180 buf_hold = (*--i_src & 0xFFFFFF) << 8;
182 for (; c >= 4; c -= 4) {
184 *--i_dst = buf_hold | ((value & 0xFF000000)>> 24);
185 buf_hold = (value & 0xFFFFFF) << 8;
189 src = (
const void *)i_src;