ref: b5353c84558531fb64446e1937615799d1c61363
parent: e75cd2298bafe4fb2d0920e3b03c4507a24eaf07
parent: 04f5bcd68d12f4fc60818fdf2671c9fa7da2c222
author: volvet <[email protected]>
date: Tue Mar 18 05:29:42 EDT 2014
Merge pull request #516 from mstorsjo/fix-yasm-64bit Fix building with yasm in 64 bit mode
--- a/codec/common/asm_inc.asm
+++ b/codec/common/asm_inc.asm
@@ -337,6 +337,12 @@
%macro SIGN_EXTENSION 2
%ifndef X86_32
+ movsxd %1, %2
+ %endif
+%endmacro
+
+%macro SIGN_EXTENSIONW 2
+ %ifndef X86_32
movsx %1, %2
%endif
%endmacro
--- a/codec/encoder/core/asm/quant.asm
+++ b/codec/encoder/core/asm/quant.asm
@@ -99,8 +99,8 @@
WELS_EXTERN WelsQuant4x4Dc_sse2
%assign push_num 0
LOAD_3_PARA
- SIGN_EXTENSION r1, r1w
- SIGN_EXTENSION r2, r2w
+ SIGN_EXTENSIONW r1, r1w
+ SIGN_EXTENSIONW r2, r2w
SSE2_Copy8Times xmm3, r2d
SSE2_Copy8Times xmm2, r1d
@@ -189,8 +189,8 @@
WELS_EXTERN WelsHadamardQuant2x2_mmx
%assign push_num 0
LOAD_5_PARA
- SIGN_EXTENSION r1, r1w
- SIGN_EXTENSION r2, r2w
+ SIGN_EXTENSIONW r1, r1w
+ SIGN_EXTENSIONW r2, r2w
movd mm0, [r0]
movd mm1, [r0 + 0x20]
punpcklwd mm0, mm1
@@ -245,8 +245,8 @@
WELS_EXTERN WelsHadamardQuant2x2Skip_mmx
%assign push_num 0
LOAD_3_PARA
- SIGN_EXTENSION r1, r1w
- SIGN_EXTENSION r2, r2w
+ SIGN_EXTENSIONW r1, r1w
+ SIGN_EXTENSIONW r2, r2w
movd mm0, [r0]
movd mm1, [r0 + 0x20]
punpcklwd mm0, mm1