aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-17 23:20:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-17 23:20:14 +0200
commit52b6d96268987db14937fcf5f9a53ab9b4184adb (patch)
tree7077ef6c23ddd678b9f1498e8ffdde3fbbc5dde4
parentc7c33ab721cfafbbe269c8f1505eb2d9a80d7af4 (diff)
parenta344e5d094ebcf9a23acf3a27c56cbbbc829db42 (diff)
downloadffmpeg-52b6d96268987db14937fcf5f9a53ab9b4184adb.tar.gz
Merge commit 'a344e5d094ebcf9a23acf3a27c56cbbbc829db42'
* commit 'a344e5d094ebcf9a23acf3a27c56cbbbc829db42': x86: bswapdsp: Don't treat 32-bit integers as 64-bit Conflicts: libavcodec/x86/bswapdsp.asm Merged-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/x86/bswapdsp.asm21
1 files changed, 10 insertions, 11 deletions
diff --git a/libavcodec/x86/bswapdsp.asm b/libavcodec/x86/bswapdsp.asm
index ec060c93b6..b2d749cf19 100644
--- a/libavcodec/x86/bswapdsp.asm
+++ b/libavcodec/x86/bswapdsp.asm
@@ -32,8 +32,8 @@ SECTION_TEXT
; %1 = aligned/unaligned
%macro BSWAP_LOOPS 1
- mov r3, r2
- sar r2, 3
+ mov r3d, r2d
+ sar r2d, 3
jz .left4_%1
.loop8_%1:
mov%1 m0, [r1 + 0]
@@ -61,11 +61,11 @@ SECTION_TEXT
%endif
add r0, 32
add r1, 32
- dec r2
+ dec r2d
jnz .loop8_%1
.left4_%1:
- mov r2, r3
- and r3, 4
+ mov r2d, r3d
+ test r3d, 4
jz .left
mov%1 m0, [r1]
%if cpuflag(ssse3)
@@ -95,7 +95,7 @@ cglobal bswap32_buf, 3,4,5
mov r3, r1
%endif
or r3, r0
- and r3, 15
+ test r3, 15
jz .start_align
BSWAP_LOOPS u
jmp .left
@@ -103,8 +103,7 @@ cglobal bswap32_buf, 3,4,5
BSWAP_LOOPS a
.left:
%if cpuflag(ssse3)
- mov r3, r2
- and r2, 2
+ test r2d, 2
jz .left1
movq m0, [r1]
pshufb m0, m2
@@ -112,13 +111,13 @@ cglobal bswap32_buf, 3,4,5
add r1, 8
add r0, 8
.left1:
- and r3, 1
+ test r2d, 1
jz .end
mov r2d, [r1]
bswap r2d
mov [r0], r2d
%else
- and r2, 3
+ and r2d, 3
jz .end
.loop2:
mov r3d, [r1]
@@ -126,7 +125,7 @@ cglobal bswap32_buf, 3,4,5
mov [r0], r3d
add r1, 4
add r0, 4
- dec r2
+ dec r2d
jnz .loop2
%endif
.end: