mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
x86 asm: Replace .align with .balign
The .align directive used to align storage locations is ambiguous. On some platforms and assemblers it takes a byte count, on others the argument is interpreted as a shift value. The current usage expects the first interpretation. Replace it with the unambiguous .balign directive which always expects a byte count, regardless of platform and assembler. 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:
committed by
Brian Behlendorf
parent
58ca7b1011
commit
037e4f2536
@@ -378,7 +378,7 @@ rijndael_key_setup_enc_intel_local:
|
||||
FRAME_END
|
||||
RET
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Lenc_key192:
|
||||
cmp $192, %KEYSIZE32
|
||||
jnz .Lenc_key128
|
||||
@@ -415,7 +415,7 @@ rijndael_key_setup_enc_intel_local:
|
||||
FRAME_END
|
||||
RET
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Lenc_key128:
|
||||
cmp $128, %KEYSIZE32
|
||||
jnz .Lenc_key_invalid_key_bits
|
||||
@@ -522,7 +522,7 @@ FRAME_BEGIN
|
||||
add %AESKEY, %ROUNDS64
|
||||
mov %ROUNDS64, %ENDAESKEY
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Ldec_key_reorder_loop:
|
||||
movups (%AESKEY), %xmm0
|
||||
movups (%ROUNDS64), %xmm1
|
||||
@@ -533,7 +533,7 @@ FRAME_BEGIN
|
||||
cmp %AESKEY, %ROUNDS64
|
||||
ja .Ldec_key_reorder_loop
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Ldec_key_inv_loop:
|
||||
movups (%rcx), %xmm0
|
||||
// Convert an encryption round key to a form usable for decryption
|
||||
@@ -622,7 +622,7 @@ ENTRY_NP(aes_encrypt_intel)
|
||||
movups -0x50(%KEYP), %KEY
|
||||
aesenc %KEY, %STATE
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Lenc192:
|
||||
// AES 192 and 256
|
||||
movups -0x40(%KEYP), %KEY
|
||||
@@ -630,7 +630,7 @@ ENTRY_NP(aes_encrypt_intel)
|
||||
movups -0x30(%KEYP), %KEY
|
||||
aesenc %KEY, %STATE
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Lenc128:
|
||||
// AES 128, 192, and 256
|
||||
movups -0x20(%KEYP), %KEY
|
||||
@@ -705,7 +705,7 @@ ENTRY_NP(aes_decrypt_intel)
|
||||
movups -0x50(%KEYP), %KEY
|
||||
aesdec %KEY, %STATE
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Ldec192:
|
||||
// AES 192 and 256
|
||||
movups -0x40(%KEYP), %KEY
|
||||
@@ -713,7 +713,7 @@ ENTRY_NP(aes_decrypt_intel)
|
||||
movups -0x30(%KEYP), %KEY
|
||||
aesdec %KEY, %STATE
|
||||
|
||||
.align 4
|
||||
.balign 4
|
||||
.Ldec128:
|
||||
// AES 128, 192, and 256
|
||||
movups -0x20(%KEYP), %KEY
|
||||
|
||||
@@ -694,7 +694,7 @@ aes_decrypt_amd64(const uint32_t rk[], int Nr, const uint32_t ct[4],
|
||||
* unsigned char *out, const aes_encrypt_ctx cx[1])/
|
||||
*/
|
||||
SECTION_STATIC
|
||||
.align 64
|
||||
.balign 64
|
||||
enc_tab:
|
||||
enc_vals(u8)
|
||||
#ifdef LAST_ROUND_TABLES
|
||||
@@ -800,7 +800,7 @@ ENTRY_NP(aes_encrypt_amd64)
|
||||
* unsigned char *out, const aes_encrypt_ctx cx[1])/
|
||||
*/
|
||||
SECTION_STATIC
|
||||
.align 64
|
||||
.balign 64
|
||||
dec_tab:
|
||||
dec_vals(v8)
|
||||
#ifdef LAST_ROUND_TABLES
|
||||
|
||||
Reference in New Issue
Block a user