diff --git a/src/virtual_machine.cpp b/src/virtual_machine.cpp index bae1c7c0..8c738c74 100644 --- a/src/virtual_machine.cpp +++ b/src/virtual_machine.cpp @@ -111,6 +111,10 @@ namespace randomx { if (!softAes && !cpu.hasAes()) throw std::runtime_error(platformError); #else +#if defined(_M_X64) || defined(__x86_64__) || (defined(__aarch64__) && (defined(HAVE_HWCAP) || defined(__APPLE__))) + if (!softAes && !cpu.hasAes()) + throw std::runtime_error("Platform doesn't support hardware AES"); +#endif if (!softAes) { //if hardware AES is not supported, it's better to fail now than to return a ticking bomb rx_vec_i128 tmp = rx_load_vec_i128((const rx_vec_i128*)&aesDummy); tmp = rx_aesenc_vec_i128(tmp, tmp);