Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c2808c8e
Commit
c2808c8e
authored
Apr 17, 2003
by
Jeff Garzik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ia32] use __builtin_memcpy compiler intrinsic for small memcpy's
parent
ecd3551c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
43 deletions
+3
-43
include/asm-i386/string.h
include/asm-i386/string.h
+3
-43
No files found.
include/asm-i386/string.h
View file @
c2808c8e
...
@@ -214,49 +214,9 @@ return (to);
...
@@ -214,49 +214,9 @@ return (to);
*/
*/
static
inline
void
*
__constant_memcpy
(
void
*
to
,
const
void
*
from
,
size_t
n
)
static
inline
void
*
__constant_memcpy
(
void
*
to
,
const
void
*
from
,
size_t
n
)
{
{
switch
(
n
)
{
if
(
n
<=
128
)
case
0
:
return
__builtin_memcpy
(
to
,
from
,
n
);
return
to
;
case
1
:
*
(
unsigned
char
*
)
to
=
*
(
const
unsigned
char
*
)
from
;
return
to
;
case
2
:
*
(
unsigned
short
*
)
to
=
*
(
const
unsigned
short
*
)
from
;
return
to
;
case
3
:
*
(
unsigned
short
*
)
to
=
*
(
const
unsigned
short
*
)
from
;
*
(
2
+
(
unsigned
char
*
)
to
)
=
*
(
2
+
(
const
unsigned
char
*
)
from
);
return
to
;
case
4
:
*
(
unsigned
long
*
)
to
=
*
(
const
unsigned
long
*
)
from
;
return
to
;
case
6
:
/* for Ethernet addresses */
*
(
unsigned
long
*
)
to
=
*
(
const
unsigned
long
*
)
from
;
*
(
2
+
(
unsigned
short
*
)
to
)
=
*
(
2
+
(
const
unsigned
short
*
)
from
);
return
to
;
case
8
:
*
(
unsigned
long
*
)
to
=
*
(
const
unsigned
long
*
)
from
;
*
(
1
+
(
unsigned
long
*
)
to
)
=
*
(
1
+
(
const
unsigned
long
*
)
from
);
return
to
;
case
12
:
*
(
unsigned
long
*
)
to
=
*
(
const
unsigned
long
*
)
from
;
*
(
1
+
(
unsigned
long
*
)
to
)
=
*
(
1
+
(
const
unsigned
long
*
)
from
);
*
(
2
+
(
unsigned
long
*
)
to
)
=
*
(
2
+
(
const
unsigned
long
*
)
from
);
return
to
;
case
16
:
*
(
unsigned
long
*
)
to
=
*
(
const
unsigned
long
*
)
from
;
*
(
1
+
(
unsigned
long
*
)
to
)
=
*
(
1
+
(
const
unsigned
long
*
)
from
);
*
(
2
+
(
unsigned
long
*
)
to
)
=
*
(
2
+
(
const
unsigned
long
*
)
from
);
*
(
3
+
(
unsigned
long
*
)
to
)
=
*
(
3
+
(
const
unsigned
long
*
)
from
);
return
to
;
case
20
:
*
(
unsigned
long
*
)
to
=
*
(
const
unsigned
long
*
)
from
;
*
(
1
+
(
unsigned
long
*
)
to
)
=
*
(
1
+
(
const
unsigned
long
*
)
from
);
*
(
2
+
(
unsigned
long
*
)
to
)
=
*
(
2
+
(
const
unsigned
long
*
)
from
);
*
(
3
+
(
unsigned
long
*
)
to
)
=
*
(
3
+
(
const
unsigned
long
*
)
from
);
*
(
4
+
(
unsigned
long
*
)
to
)
=
*
(
4
+
(
const
unsigned
long
*
)
from
);
return
to
;
}
#define COMMON(x) \
#define COMMON(x) \
__asm__ __volatile__( \
__asm__ __volatile__( \
"rep ; movsl" \
"rep ; movsl" \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment