Skip to content

Commit b0f067f

Browse files
committed
mem: fix compilation with YASM
Fixes #294. Signed-off-by: Pablo de Lara <[email protected]>
1 parent 28305ad commit b0f067f

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

Release_notes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ v2.31.1
2626
* Fixed spelling mistakes and typos.
2727
* Fixed Windows build on erasure code performance applications.
2828
* Fixed FreeBSD build warnings.
29+
* Fixed compilation with YASM.
2930

3031
v2.31
3132

mem/mem_multibinary.asm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
default rel
3434
[bits 64]
3535

36-
extern mem_zero_detect_avx512
36+
%ifdef HAVE_AS_KNOWS_AVX512
37+
extern mem_zero_detect_avx512
38+
%endif
3739
extern mem_zero_detect_avx2
3840
extern mem_zero_detect_avx
3941
extern mem_zero_detect_sse

mem/mem_zero_detect_avx2.asm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@
6767
%define tmp0 arg2
6868
%define tmp1 arg3
6969

70+
; Workaround for YASM
71+
%ifdef HAVE_AS_KNOWS_AVX512
7072
%use smartalign
7173
ALIGNMODE P6
74+
%endif
75+
7276
default rel
7377

7478
[bits 64]

mem/mem_zero_detect_avx512.asm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
%include "reg_sizes.asm"
3131

32+
%ifdef HAVE_AS_KNOWS_AVX512
33+
3234
%ifidn __OUTPUT_FORMAT__, elf64
3335
%define arg0 rdi
3436
%define arg1 rsi
@@ -140,3 +142,5 @@ align 16
140142

141143

142144
endproc_frame
145+
146+
%endif ; ifdef HAVE_AS_KNOWS_AVX512

0 commit comments

Comments
 (0)