27 #include <linux/types.h>
28 #include <linux/stddef.h>
29 #include <linux/compiler.h>
30 #include <linux/module.h>
32 #include <linux/string.h>
34 #ifdef __HAVE_ARCH_MEMCPY
35 #ifndef CONFIG_OPT_LIB_FUNCTION
38 const char *
src = v_src;
50 const char *src = v_src;
63 unsigned value, buf_hold;
67 switch ((
unsigned long)dst & 3) {
83 switch ((
unsigned long)src & 3) {
85 i_src = (
const void *)src;
87 for (; c >= 4; c -= 4)
90 src = (
const void *)i_src;
94 i_src = (
const void *) ((
unsigned)src & ~3);
95 #ifndef __MICROBLAZEEL__
97 buf_hold = *i_src++ << 8;
99 for (; c >= 4; c -= 4) {
101 *i_dst++ = buf_hold | value >> 24;
102 buf_hold = value << 8;
106 buf_hold = (*i_src++ & 0xFFFFFF00) >>8;
108 for (; c >= 4; c -= 4) {
110 *i_dst++ = buf_hold | ((value & 0xFF) << 24);
111 buf_hold = (value & 0xFFFFFF00) >>8;
115 src = (
const void *)i_src;
120 i_src = (
const void *) ((
unsigned)src & ~3);
121 #ifndef __MICROBLAZEEL__
123 buf_hold = *i_src++ << 16;
125 for (; c >= 4; c -= 4) {
127 *i_dst++ = buf_hold | value >> 16;
128 buf_hold = value << 16;
132 buf_hold = (*i_src++ & 0xFFFF0000 )>>16;
134 for (; c >= 4; c -= 4) {
136 *i_dst++ = buf_hold | ((value & 0xFFFF)<<16);
137 buf_hold = (value & 0xFFFF0000) >>16;
141 src = (
const void *)i_src;
146 i_src = (
const void *) ((
unsigned)src & ~3);
147 #ifndef __MICROBLAZEEL__
149 buf_hold = *i_src++ << 24;
151 for (; c >= 4; c -= 4) {
153 *i_dst++ = buf_hold | value >> 8;
154 buf_hold = value << 24;
158 buf_hold = (*i_src++ & 0xFF000000) >> 24;
160 for (; c >= 4; c -= 4) {
162 *i_dst++ = buf_hold | ((value & 0xFFFFFF) << 8);
163 buf_hold = (value & 0xFF000000) >> 24;
167 src = (
const void *)i_src;