148 if (UseAES) {
149 if (FLAG_IS_DEFAULT(UseAESIntrinsics)) {
150 FLAG_SET_DEFAULT(UseAESIntrinsics, true);
151 }
152 }
153 if (UseAESIntrinsics && !has_Crypto_AES()) {
154 warning("AES intrinsics are not available on this CPU");
155 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
156 }
157 if (UseAESIntrinsics && !UseAES) {
158 warning("AES intrinsics require UseAES flag to be enabled. Intrinsics will be disabled.");
159 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
160 }
161
162 // TODO: implement AES/CTR intrinsics
163 if (UseAESCTRIntrinsics) {
164 warning("AES/CTR intrinsics are not available on this CPU");
165 FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
166 }
167
168 // TODO: implement GHASH intrinsics
169 if (UseGHASHIntrinsics) {
170 warning("GHASH intrinsics are not available on this CPU");
171 FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
172 }
173
174 if (FLAG_IS_DEFAULT(UseFMA)) {
175 FLAG_SET_DEFAULT(UseFMA, true);
176 }
177
178 // On z/Architecture, we take UseSHA as the general switch to enable/disable the SHA intrinsics.
179 // The specific switches UseSHAxxxIntrinsics will then be set depending on the actual
180 // machine capabilities.
181 // Explicitly setting them via CmdLine option takes precedence, of course.
182 if (FLAG_IS_DEFAULT(UseSHA) && has_Crypto_SHA()) {
183 FLAG_SET_DEFAULT(UseSHA, true);
184 }
185 if (UseSHA && !has_Crypto_SHA()) {
186 warning("SHA instructions are not available on this CPU");
187 FLAG_SET_DEFAULT(UseSHA, false);
188 }
189 if (UseSHA && has_Crypto_SHA1()) {
|
148 if (UseAES) {
149 if (FLAG_IS_DEFAULT(UseAESIntrinsics)) {
150 FLAG_SET_DEFAULT(UseAESIntrinsics, true);
151 }
152 }
153 if (UseAESIntrinsics && !has_Crypto_AES()) {
154 warning("AES intrinsics are not available on this CPU");
155 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
156 }
157 if (UseAESIntrinsics && !UseAES) {
158 warning("AES intrinsics require UseAES flag to be enabled. Intrinsics will be disabled.");
159 FLAG_SET_DEFAULT(UseAESIntrinsics, false);
160 }
161
162 // TODO: implement AES/CTR intrinsics
163 if (UseAESCTRIntrinsics) {
164 warning("AES/CTR intrinsics are not available on this CPU");
165 FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
166 }
167
168 if (FLAG_IS_DEFAULT(UseGHASHIntrinsics) && has_Crypto_GHASH()) {
169 FLAG_SET_DEFAULT(UseGHASHIntrinsics, true);
170 }
171 if (UseGHASHIntrinsics && !has_Crypto_GHASH()) {
172 warning("GHASH intrinsics are not available on this CPU");
173 FLAG_SET_DEFAULT(UseGHASHIntrinsics, false);
174 }
175
176 if (FLAG_IS_DEFAULT(UseFMA)) {
177 FLAG_SET_DEFAULT(UseFMA, true);
178 }
179
180 // On z/Architecture, we take UseSHA as the general switch to enable/disable the SHA intrinsics.
181 // The specific switches UseSHAxxxIntrinsics will then be set depending on the actual
182 // machine capabilities.
183 // Explicitly setting them via CmdLine option takes precedence, of course.
184 if (FLAG_IS_DEFAULT(UseSHA) && has_Crypto_SHA()) {
185 FLAG_SET_DEFAULT(UseSHA, true);
186 }
187 if (UseSHA && !has_Crypto_SHA()) {
188 warning("SHA instructions are not available on this CPU");
189 FLAG_SET_DEFAULT(UseSHA, false);
190 }
191 if (UseSHA && has_Crypto_SHA1()) {
|