From 8f649e4ae0101000c32cfd1fef608f2422650ca9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 23 Jul 2026 23:44:07 +0200 Subject: aes: add a few notes to ASM files --- aes/src/asm/aes128.asm | 3 +++ aes/src/asm/aes192.asm | 3 +++ aes/src/asm/aes256.asm | 3 +++ aes/src/asm64/aes128.asm | 5 ++++- aes/src/asm64/aes192.asm | 5 ++++- aes/src/asm64/aes256.asm | 5 ++++- 6 files changed, 21 insertions(+), 3 deletions(-) (limited to 'aes/src') diff --git a/aes/src/asm/aes128.asm b/aes/src/asm/aes128.asm index e8f10da..29a2d28 100644 --- a/aes/src/asm/aes128.asm +++ b/aes/src/asm/aes128.asm @@ -3,6 +3,9 @@ ; For details, see https://github.com/egor-tensin/aes-tools. ; Distributed under the MIT License. +; The best source about calling conventions is Agner's doc: +; https://www.agner.org/optimize/calling_conventions.pdf + .586 .xmm .model flat diff --git a/aes/src/asm/aes192.asm b/aes/src/asm/aes192.asm index a6c8a9b..ba93a75 100644 --- a/aes/src/asm/aes192.asm +++ b/aes/src/asm/aes192.asm @@ -3,6 +3,9 @@ ; For details, see https://github.com/egor-tensin/aes-tools. ; Distributed under the MIT License. +; The best source about calling conventions is Agner's doc: +; https://www.agner.org/optimize/calling_conventions.pdf + .586 .xmm .model flat diff --git a/aes/src/asm/aes256.asm b/aes/src/asm/aes256.asm index 19103f0..0087c1b 100644 --- a/aes/src/asm/aes256.asm +++ b/aes/src/asm/aes256.asm @@ -3,6 +3,9 @@ ; For details, see https://github.com/egor-tensin/aes-tools. ; Distributed under the MIT License. +; The best source about calling conventions is Agner's doc: +; https://www.agner.org/optimize/calling_conventions.pdf + .586 .xmm .model flat diff --git a/aes/src/asm64/aes128.asm b/aes/src/asm64/aes128.asm index c1349f4..4b18384 100644 --- a/aes/src/asm64/aes128.asm +++ b/aes/src/asm64/aes128.asm @@ -3,7 +3,10 @@ ; For details, see https://github.com/egor-tensin/aes-tools. ; Distributed under the MIT License. -; Copied from asm/aes128.asm +; Copied from asm/aes128.asm, accounting for the calling convention changes. +; The biggest difference is that __m128 arguments are passed via a pointer, not +; via XMM registers like in 32-bit __fastcall. The best source is Agner's doc: +; https://www.agner.org/optimize/calling_conventions.pdf .code diff --git a/aes/src/asm64/aes192.asm b/aes/src/asm64/aes192.asm index 2ffb28b..1530842 100644 --- a/aes/src/asm64/aes192.asm +++ b/aes/src/asm64/aes192.asm @@ -3,7 +3,10 @@ ; For details, see https://github.com/egor-tensin/aes-tools. ; Distributed under the MIT License. -; Copied from asm/aes192.asm +; Copied from asm/aes192.asm, accounting for the calling convention changes. +; The biggest difference is that __m128 arguments are passed via a pointer, not +; via XMM registers like in 32-bit __fastcall. The best source is Agner's doc: +; https://www.agner.org/optimize/calling_conventions.pdf .code diff --git a/aes/src/asm64/aes256.asm b/aes/src/asm64/aes256.asm index 33cb7f2..0ef66d7 100644 --- a/aes/src/asm64/aes256.asm +++ b/aes/src/asm64/aes256.asm @@ -3,7 +3,10 @@ ; For details, see https://github.com/egor-tensin/aes-tools. ; Distributed under the MIT License. -; Copied from asm/aes256.asm +; Copied from asm/aes256.asm, accounting for the calling convention changes. +; The biggest difference is that __m128 arguments are passed via a pointer, not +; via XMM registers like in 32-bit __fastcall. The best source is Agner's doc: +; https://www.agner.org/optimize/calling_conventions.pdf .code -- cgit v1.3