Skip to content

Commit

Permalink
fix warnings when assembling with NASM 2.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Patman86 committed Apr 1, 2022
1 parent 9e8d561 commit 1ecd3d7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
2 changes: 1 addition & 1 deletion source/common/x86/const-a.asm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const pw_ff00, times 8 dw 0xff00
const pw_2000, times 16 dw 0x2000
const pw_8000, times 8 dw 0x8000
const pw_3fff, times 16 dw 0x3fff
const pw_32_0, times 4 dw 32,
const pw_32_0, times 4 dw 32
times 4 dw 0
const pw_pixel_max, times 16 dw ((1 << BIT_DEPTH)-1)

Expand Down
2 changes: 1 addition & 1 deletion source/common/x86/loopfilter.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3867,7 +3867,7 @@ cglobal pelFilterLumaStrong_H, 5,7,10
movh [r0 + r6], m0
movhps [r0 + r1], m0
movh [r0], m3
movhps [r0 + r2 * 2], m3,
movhps [r0 + r2 * 2], m3
movh [r0 + r2 * 1], m9
movhps [r0 + r1 * 2], m9
%else
Expand Down
46 changes: 30 additions & 16 deletions source/common/x86/x86inc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -401,16 +401,6 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
%endif
%endmacro

%macro DEFINE_ARGS_INTERNAL 3+
%ifnum %2
DEFINE_ARGS %3
%elif %1 == 4
DEFINE_ARGS %2
%elif %1 > 4
DEFINE_ARGS %2, %3
%endif
%endmacro

%if WIN64 ; Windows x64 ;=================================================

DECLARE_REG 0, rcx
Expand All @@ -429,7 +419,7 @@ DECLARE_REG 12, R15, 104
DECLARE_REG 13, R12, 112
DECLARE_REG 14, R13, 120

%macro PROLOGUE 2-5+ 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%macro PROLOGUE 2-5+ 0, 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%assign num_args %1
%assign regs_used %2
ASSERT regs_used >= num_args
Expand All @@ -441,7 +431,15 @@ DECLARE_REG 14, R13, 120
WIN64_SPILL_XMM %3
%endif
LOAD_IF_USED 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
DEFINE_ARGS_INTERNAL %0, %4, %5
%if %0 > 4
%ifnum %4
DEFINE_ARGS %5
%else
DEFINE_ARGS %4, %5
%endif
%elifnnum %4
DEFINE_ARGS %4
%endif
%endmacro

%macro WIN64_PUSH_XMM 0
Expand Down Expand Up @@ -537,7 +535,7 @@ DECLARE_REG 12, R15, 56
DECLARE_REG 13, R12, 64
DECLARE_REG 14, R13, 72

%macro PROLOGUE 2-5+ 0; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%macro PROLOGUE 2-5+ 0, 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%assign num_args %1
%assign regs_used %2
%assign xmm_regs_used %3
Expand All @@ -547,7 +545,15 @@ DECLARE_REG 14, R13, 72
PUSH_IF_USED 9, 10, 11, 12, 13, 14
ALLOC_STACK %4
LOAD_IF_USED 6, 7, 8, 9, 10, 11, 12, 13, 14
DEFINE_ARGS_INTERNAL %0, %4, %5
%if %0 > 4
%ifnum %4
DEFINE_ARGS %5
%else
DEFINE_ARGS %4, %5
%endif
%elifnnum %4
DEFINE_ARGS %4
%endif
%endmacro

%define has_epilogue regs_used > 9 || stack_size > 0 || vzeroupper_required
Expand Down Expand Up @@ -588,7 +594,7 @@ DECLARE_REG 6, ebp, 28

DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14

%macro PROLOGUE 2-5+ ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%macro PROLOGUE 2-5+ 0, 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%assign num_args %1
%assign regs_used %2
ASSERT regs_used >= num_args
Expand All @@ -603,7 +609,15 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
PUSH_IF_USED 3, 4, 5, 6
ALLOC_STACK %4
LOAD_IF_USED 0, 1, 2, 3, 4, 5, 6
DEFINE_ARGS_INTERNAL %0, %4, %5
%if %0 > 4
%ifnum %4
DEFINE_ARGS %5
%else
DEFINE_ARGS %4, %5
%endif
%elifnnum %4
DEFINE_ARGS %4
%endif
%endmacro

%define has_epilogue regs_used > 3 || stack_size > 0 || vzeroupper_required
Expand Down
4 changes: 3 additions & 1 deletion source/common/x86/x86util.asm
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,10 @@
%elif %1==2
%if mmsize==8
SBUTTERFLY dq, %3, %4, %5
%else
%elif %0==6
TRANS q, ORDER, %3, %4, %5, %6
%else
TRANS q, ORDER, %3, %4, %5
%endif
%elif %1==4
SBUTTERFLY qdq, %3, %4, %5
Expand Down

0 comments on commit 1ecd3d7

Please sign in to comment.