summaryrefslogtreecommitdiff
path: root/libavutil/x86
diff options
context:
space:
mode:
authorLoren Merritt <pengvado@akuvian.org>2014-01-19 19:22:55 +0100
committerDiego Biurrun <diego@biurrun.de>2014-01-26 18:40:08 +0100
commitb7d0d10a1d54073501b728dbe166a32e2b7b26f1 (patch)
treed9ff4c98f313bec3b54cc94402dc484bfda46857 /libavutil/x86
parent50ecf15712354a1d5b3f4dc9a57ff90ed7ee9654 (diff)
x86inc: Speed up assembling with Yasm
Work around Yasm's inefficiency with handling large numbers of variables in the global scope. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavutil/x86')
-rw-r--r--libavutil/x86/x86inc.asm46
1 files changed, 23 insertions, 23 deletions
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index 6350a5c8b8..a765b0a99d 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -1050,25 +1050,25 @@ INIT_XMM
;%5+: operands
%macro RUN_AVX_INSTR 5-8+
%ifnum sizeof%6
- %assign %%sizeofreg sizeof%6
+ %assign __sizeofreg sizeof%6
%elifnum sizeof%5
- %assign %%sizeofreg sizeof%5
+ %assign __sizeofreg sizeof%5
%else
- %assign %%sizeofreg mmsize
+ %assign __sizeofreg mmsize
%endif
- %assign %%emulate_avx 0
- %if avx_enabled && %%sizeofreg >= 16
- %xdefine %%instr v%1
+ %assign __emulate_avx 0
+ %if avx_enabled && __sizeofreg >= 16
+ %xdefine __instr v%1
%else
- %xdefine %%instr %1
+ %xdefine __instr %1
%if %0 >= 7+%3
- %assign %%emulate_avx 1
+ %assign __emulate_avx 1
%endif
%endif
- %if %%emulate_avx
- %xdefine %%src1 %6
- %xdefine %%src2 %7
+ %if __emulate_avx
+ %xdefine __src1 %6
+ %xdefine __src2 %7
%ifnidn %5, %6
%if %0 >= 8
CHECK_AVX_INSTR_EMU {%1 %5, %6, %7, %8}, %5, %7, %8
@@ -1080,31 +1080,31 @@ INIT_XMM
; 3-operand AVX instructions with a memory arg can only have it in src2,
; whereas SSE emulation prefers to have it in src1 (i.e. the mov).
; So, if the instruction is commutative with a memory arg, swap them.
- %xdefine %%src1 %7
- %xdefine %%src2 %6
+ %xdefine __src1 %7
+ %xdefine __src2 %6
%endif
%endif
- %if %%sizeofreg == 8
- MOVQ %5, %%src1
+ %if __sizeofreg == 8
+ MOVQ %5, __src1
%elif %2
- MOVAPS %5, %%src1
+ MOVAPS %5, __src1
%else
- MOVDQA %5, %%src1
+ MOVDQA %5, __src1
%endif
%endif
%if %0 >= 8
- %1 %5, %%src2, %8
+ %1 %5, __src2, %8
%else
- %1 %5, %%src2
+ %1 %5, __src2
%endif
%elif %0 >= 8
- %%instr %5, %6, %7, %8
+ __instr %5, %6, %7, %8
%elif %0 == 7
- %%instr %5, %6, %7
+ __instr %5, %6, %7
%elif %0 == 6
- %%instr %5, %6
+ __instr %5, %6
%else
- %%instr %5
+ __instr %5
%endif
%endmacro