Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
44b44441
Commit
44b44441
authored
Aug 11, 2015
by
Henrik Gramner
Committed by
Anton Khirnov
Aug 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86inc: Various minor backports from x264
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
26ac22e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
x86inc.asm
libavutil/x86/x86inc.asm
+21
-11
No files found.
libavutil/x86/x86inc.asm
View file @
44b44441
;*****************************************************************************
;*****************************************************************************
;* x86inc.asm: x264asm abstraction layer
;* x86inc.asm: x264asm abstraction layer
;*****************************************************************************
;*****************************************************************************
;* Copyright (C) 2005-201
3
x264 project
;* Copyright (C) 2005-201
5
x264 project
;*
;*
;* Authors: Loren Merritt <lorenm@u.washington.edu>
;* Authors: Loren Merritt <lorenm@u.washington.edu>
;* Anton Mitrofanov <BugMaster@narod.ru>
;* Anton Mitrofanov <BugMaster@narod.ru>
...
@@ -67,6 +67,15 @@
...
@@ -67,6 +67,15 @@
%
endif
%
endif
%endif
%endif
%define
FORMAT_ELF
0
%ifidn
__OUTPUT_FORMAT__
,
elf
%
define
FORMAT_ELF
1
%elifidn
__OUTPUT_FORMAT__
,
elf32
%
define
FORMAT_ELF
1
%elifidn
__OUTPUT_FORMAT__
,
elf64
%
define
FORMAT_ELF
1
%endif
%ifdef
PREFIX
%ifdef
PREFIX
%
define
mangle
(
x
)
_
%
+
x
%
define
mangle
(
x
)
_
%
+
x
%else
%else
...
@@ -688,7 +697,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
...
@@ -688,7 +697,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
CAT_XDEFINE
cglobaled_
,
%2
,
1
CAT_XDEFINE
cglobaled_
,
%2
,
1
%
endif
%
endif
%
xdefine
current_function
%2
%
xdefine
current_function
%2
%
if
idn
__OUTPUT_FORMAT__
,
elf
%
if
FORMAT_ELF
global
%2
:
function
%%
VISIBILITY
global
%2
:
function
%%
VISIBILITY
%
else
%
else
global
%2
global
%2
...
@@ -714,14 +723,16 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
...
@@ -714,14 +723,16 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
; like cextern, but without the prefix
; like cextern, but without the prefix
%macro
cextern_naked
1
%macro
cextern_naked
1
%
xdefine
%1
mangle
(
%1
)
%
ifdef
PREFIX
%
xdefine
%1
mangle
(
%1
)
%
endif
CAT_XDEFINE
cglobaled_
,
%1
,
1
CAT_XDEFINE
cglobaled_
,
%1
,
1
extern
%1
extern
%1
%endmacro
%endmacro
%macro
const
1
-
2
+
%macro
const
1
-
2
+
%
xdefine
%1
mangle
(
private_prefix
%
+
_
%
+
%1
)
%
xdefine
%1
mangle
(
private_prefix
%
+
_
%
+
%1
)
%
if
idn
__OUTPUT_FORMAT__
,
elf
%
if
FORMAT_ELF
global
%1
:
data
hidden
global
%1
:
data
hidden
%
else
%
else
global
%1
global
%1
...
@@ -729,10 +740,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
...
@@ -729,10 +740,9 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
%1
:
%2
%1
:
%2
%endmacro
%endmacro
; This is needed for ELF, otherwise the GNU linker assumes the stack is
; This is needed for ELF, otherwise the GNU linker assumes the stack is executable by default.
; executable by default.
%if
FORMAT_ELF
%ifidn
__OUTPUT_FORMAT__
,
elf
[
SECTION
.
note
.
GNU
-
stack
noalloc
noexec
nowrite
progbits
]
[
section
.
note
.
GNU
-
stack
noalloc
noexec
nowrite
progbits
]
%endif
%endif
; cpuflags
; cpuflags
...
@@ -751,8 +761,8 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
...
@@ -751,8 +761,8 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
%assign
cpuflags_avx
(
1
<<
11
)
|
cpuflags_sse42
%assign
cpuflags_avx
(
1
<<
11
)
|
cpuflags_sse42
%assign
cpuflags_xop
(
1
<<
12
)
|
cpuflags_avx
%assign
cpuflags_xop
(
1
<<
12
)
|
cpuflags_avx
%assign
cpuflags_fma4
(
1
<<
13
)
|
cpuflags_avx
%assign
cpuflags_fma4
(
1
<<
13
)
|
cpuflags_avx
%assign
cpuflags_
avx2
(
1
<<
14
)
|
cpuflags_avx
%assign
cpuflags_
fma3
(
1
<<
14
)
|
cpuflags_avx
%assign
cpuflags_
fma3
(
1
<<
15
)
|
cpuflags_avx
%assign
cpuflags_
avx2
(
1
<<
15
)
|
cpuflags_fma3
%assign
cpuflags_cache32
(
1
<<
16
)
%assign
cpuflags_cache32
(
1
<<
16
)
%assign
cpuflags_cache64
(
1
<<
17
)
%assign
cpuflags_cache64
(
1
<<
17
)
...
@@ -801,7 +811,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
...
@@ -801,7 +811,7 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
%
endif
%
endif
%
endif
%
endif
%
if
cpuflag
(
sse2
)
%
if
ARCH_X86_64
||
cpuflag
(
sse2
)
CPUNOP
amdnop
CPUNOP
amdnop
%
else
%
else
CPUNOP
basicnop
CPUNOP
basicnop
...
...
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