Skip to content

Commit 45a2707

Browse files
committed
Add support for issue #222
Modified code to allow the AEGIS cipher source to be compiled for the ARM64EC architecture.
1 parent ea29ea4 commit 45a2707

21 files changed

+127
-8
lines changed

src/aegis/aegis128l/aegis128l_aesni.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -108,3 +111,4 @@ struct aegis128l_implementation aegis128l_aesni_implementation = {
108111
#endif
109112

110113
#endif
114+
#endif

src/aegis/aegis128l/aegis128l_altivec.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_ALTIVEC
811
#if defined(__ALTIVEC__) && defined(__CRYPTO__)
912

1013
#include <errno.h>
@@ -104,3 +107,4 @@ struct aegis128l_implementation aegis128l_altivec_implementation = {
104107
#endif
105108

106109
#endif
110+
#endif

src/aegis/aegis128x2/aegis128x2_aesni.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -114,3 +117,4 @@ struct aegis128x2_implementation aegis128x2_aesni_implementation = {
114117
#endif
115118

116119
#endif
120+
#endif

src/aegis/aegis128x2/aegis128x2_altivec.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_ALTIVEC
811
#if defined(__ALTIVEC__) && defined(__CRYPTO__)
912

1013
#include <errno.h>
@@ -109,3 +112,4 @@ struct aegis128x2_implementation aegis128x2_altivec_implementation = {
109112
#endif
110113

111114
#endif
115+
#endif

src/aegis/aegis128x2/aegis128x2_avx2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -111,3 +114,4 @@ struct aegis128x2_implementation aegis128x2_avx2_implementation = {
111114
#endif /* HAVE_VAESINTRIN_H */
112115

113116
#endif
117+
#endif

src/aegis/aegis128x4/aegis128x4_aesni.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -123,3 +126,4 @@ struct aegis128x4_implementation aegis128x4_aesni_implementation = {
123126
#endif
124127

125128
#endif
129+
#endif

src/aegis/aegis128x4/aegis128x4_altivec.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_ALTIVEC
811
#if defined(__ALTIVEC__) && defined(__CRYPTO__)
912

1013
#include <errno.h>
@@ -117,3 +120,4 @@ struct aegis128x4_implementation aegis128x4_altivec_implementation = {
117120
#endif
118121

119122
#endif
123+
#endif

src/aegis/aegis128x4/aegis128x4_avx2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -117,3 +120,4 @@ struct aegis128x4_implementation aegis128x4_avx2_implementation = {
117120
#endif /* HAVE_VAESINTRIN_H */
118121

119122
#endif
123+
#endif

src/aegis/aegis128x4/aegis128x4_avx512.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -130,3 +133,4 @@ struct aegis128x4_implementation aegis128x4_avx512_implementation = {
130133
#endif /* HAVE_VAESINTRIN_H */
131134

132135
#endif
136+
#endif

src/aegis/aegis256/aegis256_aesni.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
** SPDX-License-Identifier: MIT
66
*/
77

8+
#include "../common/aeshardware.h"
9+
10+
#if HAS_AEGIS_AES_HARDWARE == AEGIS_AES_HARDWARE_NI
811
#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
912

1013
#include <errno.h>
@@ -104,3 +107,4 @@ struct aegis256_implementation aegis256_aesni_implementation = {
104107
#endif
105108

106109
#endif
110+
#endif

0 commit comments

Comments
 (0)