diff options
| author | riastradh <riastradh@NetBSD.org> | 2020-06-30 21:41:03 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2020-06-30 21:41:03 +0000 |
| commit | f2bf2281bc74e2bde7748d4f980bdd047472f89e (patch) | |
| tree | 8e3d17c630246a1ac4d9bf5ea5ed4e167b9aace8 /sys/crypto | |
| parent | 3df9ef515c6a52df9fc56cc54f5a738a528ec3cb (diff) | |
Use .p2align rather than .align.
Apparently on arm, .align is actually an alias for .p2align, taking a
power of two rather than a number of bytes, so aes_armv8_64.o was
bloated to 32KB with obscene alignment when it only needed to be
barely past 4KB.
Do the same for the x86 aes_ni_64.S -- even though .align takes a
number of bytes rather than a power of two on x86, let's just stay
away from the temptations of the evil .align directive.
Diffstat (limited to 'sys/crypto')
| -rw-r--r-- | sys/crypto/aes/arch/arm/aes_armv8_64.S | 12 | ||||
| -rw-r--r-- | sys/crypto/aes/arch/x86/aes_ni_64.S | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/crypto/aes/arch/arm/aes_armv8_64.S b/sys/crypto/aes/arch/arm/aes_armv8_64.S index e995567b3c5..e79359b1060 100644 --- a/sys/crypto/aes/arch/arm/aes_armv8_64.S +++ b/sys/crypto/aes/arch/arm/aes_armv8_64.S @@ -1,4 +1,4 @@ -/* $NetBSD: aes_armv8_64.S,v 1.1 2020/06/29 23:31:41 riastradh Exp $ */ +/* $NetBSD: aes_armv8_64.S,v 1.2 2020/06/30 21:41:03 riastradh Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ * secret. */ .section .rodata - .align 4 + .p2align 2 .type rcon,@object rcon: .long 0x01 @@ -63,7 +63,7 @@ END(rcon) * RotWord on word 1, and then copy it into all the other words. */ .section .rodata - .align 16 + .p2align 4 .type unshiftrows_rotword_1,@object unshiftrows_rotword_1: .byte 0x01,0x0e,0x0b,0x04 @@ -79,7 +79,7 @@ END(unshiftrows_rotword_1) * 3 into all the other words. */ .section .rodata - .align 16 + .p2align 4 .type unshiftrows_3,@object unshiftrows_3: .byte 0x0c,0x09,0x06,0x03 @@ -95,7 +95,7 @@ END(unshiftrows_3) * RotWord on word 3, and then copy it into all the other words. */ .section .rodata - .align 16 + .p2align 4 .type unshiftrows_rotword_3,@object unshiftrows_rotword_3: .byte 0x09,0x06,0x03,0x0c @@ -846,7 +846,7 @@ aesarmv8_xts_mulx: END(aesarmv8_xts_mulx) .section .rodata - .align 16 + .p2align 4 .type xtscarry,@object xtscarry: .byte 0x87,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,0,0 diff --git a/sys/crypto/aes/arch/x86/aes_ni_64.S b/sys/crypto/aes/arch/x86/aes_ni_64.S index b1f377f9afe..728f2443cb5 100644 --- a/sys/crypto/aes/arch/x86/aes_ni_64.S +++ b/sys/crypto/aes/arch/x86/aes_ni_64.S @@ -1,4 +1,4 @@ -/* $NetBSD: aes_ni_64.S,v 1.1 2020/06/29 23:29:40 riastradh Exp $ */ +/* $NetBSD: aes_ni_64.S,v 1.2 2020/06/30 21:41:04 riastradh Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -930,7 +930,7 @@ aesni_xts_mulx: END(aesni_xts_mulx) .section .rodata - .align 16 + .p2align 4 .type xtscarry,@object xtscarry: .byte 0x87,0,0,0, 0,0,0,0, 1,0,0,0, 0,0,0,0 |
