Skip to content

Commit 01f77ad

Browse files
committed
Revert GCC push/pop pragmas
Using GCC push/pop pragmas for individual algorithm implementations led to compile time errors. To restrict the GCC target options to the AEGIS code GCC push/pop pragmas are now used in `libaegis.c`.
1 parent 443da3d commit 01f77ad

25 files changed

+8
-72
lines changed

src/aegis/aegis128l/aegis128l_aesni.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#ifdef __clang__
2121
# pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
2222
#elif defined(__GNUC__)
23-
# pragma GCC push_options
2423
# pragma GCC target("aes,avx")
2524
#endif
2625

@@ -106,8 +105,6 @@ struct aegis128l_implementation aegis128l_aesni_implementation = {
106105

107106
#ifdef __clang__
108107
# pragma clang attribute pop
109-
#elif defined(__GNUC__)
110-
# pragma GCC pop_options
111108
#endif
112109

113110
#endif

src/aegis/aegis128l/aegis128l_altivec.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#ifdef __clang__
2323
# pragma clang attribute push(__attribute__((target("altivec,crypto"))), apply_to = function)
2424
#elif defined(__GNUC__)
25-
# pragma GCC push_options
2625
# pragma GCC target("altivec,crypto")
2726
#endif
2827

@@ -102,8 +101,6 @@ struct aegis128l_implementation aegis128l_altivec_implementation = {
102101

103102
#ifdef __clang__
104103
# pragma clang attribute pop
105-
#elif defined(__GNUC__)
106-
# pragma GCC pop_options
107104
#endif
108105

109106
#endif

src/aegis/aegis128l/aegis128l_armcrypto.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
# pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), \
3737
apply_to = function)
3838
#elif defined(__GNUC__)
39-
# pragma GCC push_options
4039
# pragma GCC target("+simd+crypto")
4140
#endif
4241

@@ -116,8 +115,6 @@ struct aegis128l_implementation aegis128l_armcrypto_implementation = {
116115

117116
#ifdef __clang__
118117
# pragma clang attribute pop
119-
#elif defined(__GNUC__)
120-
# pragma GCC pop_options
121118
#endif
122119

123120
#endif

src/aegis/aegis128x2/aegis128x2_aesni.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#ifdef __clang__
2121
# pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
2222
#elif defined(__GNUC__)
23-
# pragma GCC push_options
2423
# pragma GCC target("aes,avx")
2524
#endif
2625

@@ -112,8 +111,6 @@ struct aegis128x2_implementation aegis128x2_aesni_implementation = {
112111

113112
#ifdef __clang__
114113
# pragma clang attribute pop
115-
#elif defined(__GNUC__)
116-
# pragma GCC pop_options
117114
#endif
118115

119116
#endif

src/aegis/aegis128x2/aegis128x2_altivec.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#ifdef __clang__
2323
# pragma clang attribute push(__attribute__((target("altivec,crypto"))), apply_to = function)
2424
#elif defined(__GNUC__)
25-
# pragma GCC push_options
2625
# pragma GCC target("altivec,crypto")
2726
#endif
2827

@@ -107,8 +106,6 @@ struct aegis128x2_implementation aegis128x2_altivec_implementation = {
107106

108107
#ifdef __clang__
109108
# pragma clang attribute pop
110-
#elif defined(__GNUC__)
111-
# pragma GCC pop_options
112109
#endif
113110

114111
#endif

src/aegis/aegis128x2/aegis128x2_armcrypto.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
# pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), \
3737
apply_to = function)
3838
#elif defined(__GNUC__)
39-
# pragma GCC push_options
4039
# pragma GCC target("+simd+crypto")
4140
#endif
4241

@@ -121,8 +120,6 @@ struct aegis128x2_implementation aegis128x2_armcrypto_implementation = {
121120

122121
#ifdef __clang__
123122
# pragma clang attribute pop
124-
#elif defined(__GNUC__)
125-
# pragma GCC pop_options
126123
#endif
127124

128125
#endif

src/aegis/aegis128x2/aegis128x2_avx2.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#ifdef __clang__
2323
# pragma clang attribute push(__attribute__((target("vaes,avx2"))), apply_to = function)
2424
#elif defined(__GNUC__)
25-
# pragma GCC push_options
2625
# pragma GCC target("vaes,avx2")
2726
#endif
2827

@@ -107,8 +106,6 @@ struct aegis128x2_implementation aegis128x2_avx2_implementation = {
107106

108107
#ifdef __clang__
109108
# pragma clang attribute pop
110-
#elif defined(__GNUC__)
111-
# pragma GCC pop_options
112109
#endif
113110

114111
#endif /* HAVE_VAESINTRIN_H */

src/aegis/aegis128x4/aegis128x4_aesni.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#ifdef __clang__
2121
# pragma clang attribute push(__attribute__((target("aes,avx"))), apply_to = function)
2222
#elif defined(__GNUC__)
23-
# pragma GCC push_options
2423
# pragma GCC target("aes,avx")
2524
#endif
2625

@@ -121,8 +120,6 @@ struct aegis128x4_implementation aegis128x4_aesni_implementation = {
121120

122121
#ifdef __clang__
123122
# pragma clang attribute pop
124-
#elif defined(__GNUC__)
125-
# pragma GCC pop_options
126123
#endif
127124

128125
#endif

src/aegis/aegis128x4/aegis128x4_altivec.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#ifdef __clang__
2323
# pragma clang attribute push(__attribute__((target("altivec,crypto"))), apply_to = function)
2424
#elif defined(__GNUC__)
25-
# pragma GCC push_options
2625
# pragma GCC target("altivec,crypto")
2726
#endif
2827

@@ -115,8 +114,6 @@ struct aegis128x4_implementation aegis128x4_altivec_implementation = {
115114

116115
#ifdef __clang__
117116
# pragma clang attribute pop
118-
#elif defined(__GNUC__)
119-
# pragma GCC pop_options
120117
#endif
121118

122119
#endif

src/aegis/aegis128x4/aegis128x4_armcrypto.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
# pragma clang attribute push(__attribute__((target("neon,crypto,aes"))), \
3737
apply_to = function)
3838
#elif defined(__GNUC__)
39-
# pragma GCC push_options
4039
# pragma GCC target("+simd+crypto")
4140
#endif
4241

@@ -129,8 +128,6 @@ struct aegis128x4_implementation aegis128x4_armcrypto_implementation = {
129128

130129
#ifdef __clang__
131130
# pragma clang attribute pop
132-
#elif defined(__GNUC__)
133-
# pragma GCC pop_options
134131
#endif
135132

136133
#endif

0 commit comments

Comments
 (0)