From df07f2c0e49fedbddf12149e986b6ea8626dc311 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 2 Mar 2019 13:11:25 +0000 Subject: [PATCH] **/*.S: Arrange assembler preambles consistently. --- math/mpx-mul4-amd64-sse2.S | 6 ++---- math/mpx-mul4-x86-sse2.S | 6 ++---- symm/chacha-arm-neon.S | 9 +++++---- symm/chacha-arm64.S | 9 +++++---- symm/chacha-x86ish-sse2.S | 6 +++--- symm/rijndael-arm-crypto.S | 10 ++++++---- symm/rijndael-arm64-crypto.S | 8 +++++--- symm/rijndael-x86ish-aesni.S | 9 +++++---- symm/salsa20-arm-neon.S | 9 +++++---- symm/salsa20-arm64.S | 9 +++++---- symm/salsa20-x86ish-sse2.S | 6 +++--- 11 files changed, 46 insertions(+), 41 deletions(-) diff --git a/math/mpx-mul4-amd64-sse2.S b/math/mpx-mul4-amd64-sse2.S index 29939c1c..03e466c7 100644 --- a/math/mpx-mul4-amd64-sse2.S +++ b/math/mpx-mul4-amd64-sse2.S @@ -25,15 +25,13 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" -///-------------------------------------------------------------------------- -/// Prologue. - .arch pentium4 + .text ///-------------------------------------------------------------------------- diff --git a/math/mpx-mul4-x86-sse2.S b/math/mpx-mul4-x86-sse2.S index 11aadc95..5265a64f 100644 --- a/math/mpx-mul4-x86-sse2.S +++ b/math/mpx-mul4-x86-sse2.S @@ -24,15 +24,13 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" -///-------------------------------------------------------------------------- -/// Prologue. - .arch pentium4 + .text ///-------------------------------------------------------------------------- diff --git a/symm/chacha-arm-neon.S b/symm/chacha-arm-neon.S index af53cfd3..a900db76 100644 --- a/symm/chacha-arm-neon.S +++ b/symm/chacha-arm-neon.S @@ -25,18 +25,19 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" -///-------------------------------------------------------------------------- -/// Main.code. - .arch armv7-a .fpu neon + .text +///-------------------------------------------------------------------------- +/// Main.code. + FUNC(chacha_core_arm_neon) // Arguments are in registers. diff --git a/symm/chacha-arm64.S b/symm/chacha-arm64.S index a423e9e5..61ac51a1 100644 --- a/symm/chacha-arm64.S +++ b/symm/chacha-arm64.S @@ -25,17 +25,18 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" -///-------------------------------------------------------------------------- -/// Main.code. - .arch armv8-a + .text +///-------------------------------------------------------------------------- +/// Main.code. + FUNC(chacha_core_arm64) // Arguments are in registers. diff --git a/symm/chacha-x86ish-sse2.S b/symm/chacha-x86ish-sse2.S index 77047ebe..3b009633 100644 --- a/symm/chacha-x86ish-sse2.S +++ b/symm/chacha-x86ish-sse2.S @@ -25,16 +25,16 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" + .text + ///-------------------------------------------------------------------------- /// Main code. - .text - FUNC(chacha_core_x86ish_avx) .arch .avx vzeroupper diff --git a/symm/rijndael-arm-crypto.S b/symm/rijndael-arm-crypto.S index 8a5484c8..1df81d97 100644 --- a/symm/rijndael-arm-crypto.S +++ b/symm/rijndael-arm-crypto.S @@ -25,20 +25,22 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" + .arch armv8-a + .fpu crypto-neon-fp-armv8 + .extern F(abort) .extern F(rijndael_rcon) + .text + ///-------------------------------------------------------------------------- /// Main code. - .arch armv8-a - .fpu crypto-neon-fp-armv8 - /// The ARM crypto extension implements a little-endian version of AES /// (though the manual doesn't actually spell this out and you have to /// experiment), but Catacomb's internal interface presents as big-endian so diff --git a/symm/rijndael-arm64-crypto.S b/symm/rijndael-arm64-crypto.S index 8739c193..f2d3f459 100644 --- a/symm/rijndael-arm64-crypto.S +++ b/symm/rijndael-arm64-crypto.S @@ -25,19 +25,21 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" + .arch armv8-a+crypto + .extern F(abort) .extern F(rijndael_rcon) + .text + ///-------------------------------------------------------------------------- /// Main code. - .arch armv8-a+crypto - /// The ARM crypto extension implements a little-endian version of AES /// (though the manual doesn't actually spell this out and you have to /// experiment), but Catacomb's internal interface presents as big-endian so diff --git a/symm/rijndael-x86ish-aesni.S b/symm/rijndael-x86ish-aesni.S index dc80f4db..6d9b3b22 100644 --- a/symm/rijndael-x86ish-aesni.S +++ b/symm/rijndael-x86ish-aesni.S @@ -25,20 +25,21 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" + .arch .aes + .extern F(abort) .extern F(rijndael_rcon) + .text + ///-------------------------------------------------------------------------- /// Main code. - .arch .aes - .text - /// The AESNI instructions implement a little-endian version of AES, but /// Catacomb's internal interface presents as big-endian so as to work better /// with things like GCM. We therefore maintain the round keys in diff --git a/symm/salsa20-arm-neon.S b/symm/salsa20-arm-neon.S index 80ed8f06..3b6beb06 100644 --- a/symm/salsa20-arm-neon.S +++ b/symm/salsa20-arm-neon.S @@ -25,18 +25,19 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" -///-------------------------------------------------------------------------- -/// Main.code. - .arch armv7-a .fpu neon + .text +///-------------------------------------------------------------------------- +/// Main.code. + FUNC(salsa20_core_arm_neon) // Arguments are in registers. diff --git a/symm/salsa20-arm64.S b/symm/salsa20-arm64.S index 821548e1..864c63c1 100644 --- a/symm/salsa20-arm64.S +++ b/symm/salsa20-arm64.S @@ -25,17 +25,18 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" -///-------------------------------------------------------------------------- -/// Main.code. - .arch armv8-a + .text +///-------------------------------------------------------------------------- +/// Main.code. + FUNC(salsa20_core_arm64) // Arguments are in registers. diff --git a/symm/salsa20-x86ish-sse2.S b/symm/salsa20-x86ish-sse2.S index 06ba3d2c..56746e56 100644 --- a/symm/salsa20-x86ish-sse2.S +++ b/symm/salsa20-x86ish-sse2.S @@ -25,16 +25,16 @@ /// MA 02111-1307, USA. ///-------------------------------------------------------------------------- -/// External definitions. +/// Preliminaries. #include "config.h" #include "asm-common.h" + .text + ///-------------------------------------------------------------------------- /// Main code. - .text - FUNC(salsa20_core_x86ish_avx) .arch .avx vzeroupper -- 2.11.0