diff options
| author | iximeow <me@iximeow.net> | 2026-05-04 03:46:22 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-05-04 03:46:22 +0000 |
| commit | 49edfcf4382a434c6cb1e0c0cf4773fa65ec311c (patch) | |
| tree | 6b3b99821dfebc3f146f994e8757612292fb267e /src | |
| parent | 41e37448e78121266ef3e2612b4cf2822bfa68c0 (diff) | |
feature guard for key locker
Diffstat (limited to 'src')
| -rw-r--r-- | src/isa_settings.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/isa_settings.rs b/src/isa_settings.rs index c996bd2..76eb795 100644 --- a/src/isa_settings.rs +++ b/src/isa_settings.rs @@ -758,6 +758,21 @@ macro_rules! gen_isa_settings { return Err(<$decode_err>::InvalidOpcode); } } + <$opcode>::AESDEC128KL | + <$opcode>::AESDEC256KL | + <$opcode>::AESDECWIDE128KL | + <$opcode>::AESDECWIDE256KL | + <$opcode>::AESENC128KL | + <$opcode>::AESENC256KL | + <$opcode>::AESENCWIDE128KL | + <$opcode>::AESENCWIDE256KL | + <$opcode>::ENCODEKEY128 | + <$opcode>::ENCODEKEY256 | + <$opcode>::LOADIWKEY => { + if !settings.keylocker() { + return Err(<$decode_err>::InvalidOpcode); + } + } <$opcode>::MONITORX | <$opcode>::MWAITX | // these are gated on the `monitorx` and `mwaitx` cpuid bits, but are AMD-only. <$opcode>::CLZERO | <$opcode>::RDPRU => { // again, gated on specific cpuid bits, but AMD-only. if !settings.amd_quirks() { @@ -941,6 +956,8 @@ macro_rules! gen_arch_isa_settings { avx512_vnni, with_avx512_vnni = 109; avx512_ifma, with_avx512_ifma = 110; + keylocker, with_keylocker = 111; + { sse4 = { sse4_1, |
