Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b1e7c0eb
Commit
b1e7c0eb
authored
Nov 26, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MMX memcpy: set clobber list
parent
878d5212
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
modules/mmx/fastmemcpy.h
modules/mmx/fastmemcpy.h
+13
-5
No files found.
modules/mmx/fastmemcpy.h
View file @
b1e7c0eb
...
@@ -153,6 +153,11 @@ __asm__ __volatile__(\
...
@@ -153,6 +153,11 @@ __asm__ __volatile__(\
#define MIN_LEN 0x40
/* 64-byte blocks */
#define MIN_LEN 0x40
/* 64-byte blocks */
#endif
#endif
#ifdef HAVE_SSE
VLC_SSE
#else
VLC_MMX
#endif
static
void
*
fast_memcpy
(
void
*
to
,
const
void
*
from
,
size_t
len
)
static
void
*
fast_memcpy
(
void
*
to
,
const
void
*
from
,
size_t
len
)
{
{
void
*
retval
;
void
*
retval
;
...
@@ -218,7 +223,7 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
...
@@ -218,7 +223,7 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
"movntps %%xmm1, 16(%1)
\n
"
"movntps %%xmm1, 16(%1)
\n
"
"movntps %%xmm2, 32(%1)
\n
"
"movntps %%xmm2, 32(%1)
\n
"
"movntps %%xmm3, 48(%1)
\n
"
"movntps %%xmm3, 48(%1)
\n
"
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
);
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
,
"xmm0"
,
"xmm1"
,
"xmm2"
,
"xmm3"
);
((
const
unsigned
char
*
)
from
)
+=
64
;
((
const
unsigned
char
*
)
from
)
+=
64
;
((
unsigned
char
*
)
to
)
+=
64
;
((
unsigned
char
*
)
to
)
+=
64
;
}
}
...
@@ -240,7 +245,7 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
...
@@ -240,7 +245,7 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
"movntps %%xmm1, 16(%1)
\n
"
"movntps %%xmm1, 16(%1)
\n
"
"movntps %%xmm2, 32(%1)
\n
"
"movntps %%xmm2, 32(%1)
\n
"
"movntps %%xmm3, 48(%1)
\n
"
"movntps %%xmm3, 48(%1)
\n
"
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
);
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
,
"xmm0"
,
"xmm1"
,
"xmm2"
,
"xmm3"
);
((
const
unsigned
char
*
)
from
)
+=
64
;
((
const
unsigned
char
*
)
from
)
+=
64
;
((
unsigned
char
*
)
to
)
+=
64
;
((
unsigned
char
*
)
to
)
+=
64
;
}
}
...
@@ -268,7 +273,8 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
...
@@ -268,7 +273,8 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
MOVNTQ
" %%mm5, 40(%1)
\n
"
MOVNTQ
" %%mm5, 40(%1)
\n
"
MOVNTQ
" %%mm6, 48(%1)
\n
"
MOVNTQ
" %%mm6, 48(%1)
\n
"
MOVNTQ
" %%mm7, 56(%1)
\n
"
MOVNTQ
" %%mm7, 56(%1)
\n
"
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
);
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
,
"mm0"
,
"mm1"
,
"mm2"
,
"mm3"
,
"mm4"
,
"mm5"
,
"mm6"
,
"mm7"
);
from
=
(
const
void
*
)
(((
const
unsigned
char
*
)
from
)
+
64
);
from
=
(
const
void
*
)
(((
const
unsigned
char
*
)
from
)
+
64
);
to
=
(
void
*
)
(((
unsigned
char
*
)
to
)
+
64
);
to
=
(
void
*
)
(((
unsigned
char
*
)
to
)
+
64
);
}
}
...
@@ -333,7 +339,8 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
...
@@ -333,7 +339,8 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
" jae 1b
\n\t
"
" jae 1b
\n\t
"
:
"+r"
(
from
),
"+r"
(
to
),
"+r"
(
i
)
:
"+r"
(
from
),
"+r"
(
to
),
"+r"
(
i
)
:
"r"
(
BLOCK_SIZE
),
"i"
(
BLOCK_SIZE
/
64
),
"i"
(
CONFUSION_FACTOR
)
:
"r"
(
BLOCK_SIZE
),
"i"
(
BLOCK_SIZE
/
64
),
"i"
(
CONFUSION_FACTOR
)
:
"%eax"
,
"%ebx"
:
"%eax"
,
"%ebx"
,
"mm0"
,
"mm1"
,
"mm2"
,
"mm3"
,
"mm4"
,
"mm5"
,
"mm6"
,
"mm7"
);
);
#endif
#endif
...
@@ -359,7 +366,8 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
...
@@ -359,7 +366,8 @@ static void * fast_memcpy(void * to, const void * from, size_t len)
MOVNTQ
" %%mm5, 40(%1)
\n
"
MOVNTQ
" %%mm5, 40(%1)
\n
"
MOVNTQ
" %%mm6, 48(%1)
\n
"
MOVNTQ
" %%mm6, 48(%1)
\n
"
MOVNTQ
" %%mm7, 56(%1)
\n
"
MOVNTQ
" %%mm7, 56(%1)
\n
"
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
);
::
"r"
(
from
),
"r"
(
to
)
:
"memory"
,
"mm0"
,
"mm1"
,
"mm2"
,
"mm3"
,
"mm4"
,
"mm5"
,
"mm6"
,
"mm7"
);
from
=
(
const
void
*
)
(((
const
unsigned
char
*
)
from
)
+
64
);
from
=
(
const
void
*
)
(((
const
unsigned
char
*
)
from
)
+
64
);
to
=
(
void
*
)
(((
unsigned
char
*
)
to
)
+
64
);
to
=
(
void
*
)
(((
unsigned
char
*
)
to
)
+
64
);
}
}
...
...
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