IPC: blake3 x86 asm: fix placement of .size directives

The .size directive used by the SET_SIZE C macro uses the special
dot symbol to calculate the size of a function. The dot symbol
refers to the current address, so for the calculation to be
meaningful the SET_SIZE macro must be placed immediately after the
end of the function the size is calculated for.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #14422
This commit is contained in:
Attila Fülöp 2023-01-23 19:48:39 +01:00 committed by Brian Behlendorf
parent 37a27b4306
commit 58ca7b1011
3 changed files with 6 additions and 9 deletions

View File

@ -2389,6 +2389,7 @@ ENTRY_ALIGN(zfs_blake3_hash_many_avx512, 64)
vmovdqu xmmword ptr [rbx], xmm0 vmovdqu xmmword ptr [rbx], xmm0
vmovdqu xmmword ptr [rbx+0x10], xmm1 vmovdqu xmmword ptr [rbx+0x10], xmm1
jmp 4b jmp 4b
SET_SIZE(zfs_blake3_hash_many_avx512)
ENTRY_ALIGN(zfs_blake3_compress_in_place_avx512, 64) ENTRY_ALIGN(zfs_blake3_compress_in_place_avx512, 64)
ENDBR ENDBR
@ -2470,6 +2471,7 @@ ENTRY_ALIGN(zfs_blake3_compress_in_place_avx512, 64)
vmovdqu xmmword ptr [rdi], xmm0 vmovdqu xmmword ptr [rdi], xmm0
vmovdqu xmmword ptr [rdi+0x10], xmm1 vmovdqu xmmword ptr [rdi+0x10], xmm1
RET RET
SET_SIZE(zfs_blake3_compress_in_place_avx512)
ENTRY_ALIGN(zfs_blake3_compress_xof_avx512, 64) ENTRY_ALIGN(zfs_blake3_compress_xof_avx512, 64)
ENDBR ENDBR
@ -2555,9 +2557,6 @@ ENTRY_ALIGN(zfs_blake3_compress_xof_avx512, 64)
vmovdqu xmmword ptr [r9+0x20], xmm2 vmovdqu xmmword ptr [r9+0x20], xmm2
vmovdqu xmmword ptr [r9+0x30], xmm3 vmovdqu xmmword ptr [r9+0x30], xmm3
RET RET
SET_SIZE(zfs_blake3_hash_many_avx512)
SET_SIZE(zfs_blake3_compress_in_place_avx512)
SET_SIZE(zfs_blake3_compress_xof_avx512) SET_SIZE(zfs_blake3_compress_xof_avx512)
SECTION_STATIC SECTION_STATIC

View File

@ -2030,6 +2030,7 @@ ENTRY_ALIGN(zfs_blake3_hash_many_sse2, 64)
movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+0x10], xmm1 movups xmmword ptr [rbx+0x10], xmm1
jmp 4b jmp 4b
SET_SIZE(zfs_blake3_hash_many_sse2)
ENTRY_ALIGN(zfs_blake3_compress_in_place_sse2, 64) ENTRY_ALIGN(zfs_blake3_compress_in_place_sse2, 64)
ENDBR ENDBR
@ -2140,6 +2141,7 @@ ENTRY_ALIGN(zfs_blake3_compress_in_place_sse2, 64)
movups xmmword ptr [rdi], xmm0 movups xmmword ptr [rdi], xmm0
movups xmmword ptr [rdi+0x10], xmm1 movups xmmword ptr [rdi+0x10], xmm1
RET RET
SET_SIZE(zfs_blake3_compress_in_place_sse2)
ENTRY_ALIGN(zfs_blake3_compress_xof_sse2, 64) ENTRY_ALIGN(zfs_blake3_compress_xof_sse2, 64)
ENDBR ENDBR
@ -2258,9 +2260,6 @@ ENTRY_ALIGN(zfs_blake3_compress_xof_sse2, 64)
movups xmmword ptr [r9+0x20], xmm2 movups xmmword ptr [r9+0x20], xmm2
movups xmmword ptr [r9+0x30], xmm3 movups xmmword ptr [r9+0x30], xmm3
RET RET
SET_SIZE(zfs_blake3_hash_many_sse2)
SET_SIZE(zfs_blake3_compress_in_place_sse2)
SET_SIZE(zfs_blake3_compress_xof_sse2) SET_SIZE(zfs_blake3_compress_xof_sse2)
SECTION_STATIC SECTION_STATIC

View File

@ -1793,6 +1793,7 @@ ENTRY_ALIGN(zfs_blake3_hash_many_sse41, 64)
movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+0x10], xmm1 movups xmmword ptr [rbx+0x10], xmm1
jmp 4b jmp 4b
SET_SIZE(zfs_blake3_hash_many_sse41)
ENTRY_ALIGN(zfs_blake3_compress_in_place_sse41, 64) ENTRY_ALIGN(zfs_blake3_compress_in_place_sse41, 64)
ENDBR ENDBR
@ -1892,6 +1893,7 @@ ENTRY_ALIGN(zfs_blake3_compress_in_place_sse41, 64)
movups xmmword ptr [rdi], xmm0 movups xmmword ptr [rdi], xmm0
movups xmmword ptr [rdi+0x10], xmm1 movups xmmword ptr [rdi+0x10], xmm1
RET RET
SET_SIZE(zfs_blake3_compress_in_place_sse41)
ENTRY_ALIGN(zfs_blake3_compress_xof_sse41, 64) ENTRY_ALIGN(zfs_blake3_compress_xof_sse41, 64)
ENDBR ENDBR
@ -1999,9 +2001,6 @@ ENTRY_ALIGN(zfs_blake3_compress_xof_sse41, 64)
movups xmmword ptr [r9+0x20], xmm2 movups xmmword ptr [r9+0x20], xmm2
movups xmmword ptr [r9+0x30], xmm3 movups xmmword ptr [r9+0x30], xmm3
RET RET
SET_SIZE(zfs_blake3_hash_many_sse41)
SET_SIZE(zfs_blake3_compress_in_place_sse41)
SET_SIZE(zfs_blake3_compress_xof_sse41) SET_SIZE(zfs_blake3_compress_xof_sse41)
SECTION_STATIC SECTION_STATIC