diff options
| author | iximeow <me@iximeow.net> | 2025-06-01 23:51:42 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2025-06-01 23:51:42 +0000 |
| commit | 016cb77445857b63b3c5ba3ea095c5a36a357fbd (patch) | |
| tree | 4110c29afa61c45234f8fd6e095fb6928feb9c00 /src/long_mode | |
| parent | cf9ab8fcd04608c565da4fd1aff5bff47a5fe385 (diff) | |
3dnow was still supported on K8, K10. 32-bit mode should learn about uarch tweaks too
Diffstat (limited to 'src/long_mode')
| -rw-r--r-- | src/long_mode/uarch.rs | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/src/long_mode/uarch.rs b/src/long_mode/uarch.rs index 5af0175..63fa972 100644 --- a/src/long_mode/uarch.rs +++ b/src/long_mode/uarch.rs @@ -35,13 +35,15 @@ pub mod amd { /// support - SSE2 and no later. pub fn k8() -> InstDecoder { InstDecoder::minimal() + .with_3dnow() + .with_3dnowprefetch() + .with_cmov() } /// `k10` was the successor to `k8`, launched in 2007. `k10` cores extended SSE support through /// to SSE4.2a, as well as consistent `cmov` support, among other features. pub fn k10() -> InstDecoder { k8() - .with_cmov() .with_cmpxchg16b() .with_svm() .with_abm() @@ -51,9 +53,20 @@ pub mod amd { } /// `Bulldozer` was the successor to `K10`, launched in 2011. `Bulldozer` cores include AVX - /// support among other extensions, and are notable for including `AESNI`. + /// support among other extensions, and are notable for including `AESNI`. `Bulldozer` was also + /// the first microarchitecture to *remove* support for 3DNow instructions. pub fn bulldozer() -> InstDecoder { - k10() + InstDecoder::minimal() + // first, apply all the K8 extensions again, sans 3DNow + // .. should be sse, sse2 + // then the K10 + .with_cmpxchg16b() + .with_svm() + .with_abm() + .with_lahfsahf() + .with_sse3() + .with_sse4a() + // now the new extensions .with_ssse3() .with_sse4() .with_sse4_2() @@ -101,9 +114,18 @@ pub mod amd { /// SHA, RDSEED, and other extensions. pub fn zen() -> InstDecoder { // no nice way to *un*set feature bits, but several extensions were dropped. - // so, start again from K10. - k10() - // first, bundle all the K10->Bulldozer features.. + // so, start again. + InstDecoder::minimal() + // first, apply all the K8 extensions again, sans 3DNow + // .. should be sse, sse2 + // then the K10 + .with_cmpxchg16b() + .with_svm() + .with_abm() + .with_lahfsahf() + .with_sse3() + .with_sse4a() + // now, bundle all the K10->Bulldozer features.. .with_ssse3() .with_sse4() .with_sse4_2() @@ -114,11 +136,8 @@ pub mod amd { .with_avx() .with_xsave() .with_skinit() - // now all the Bulldozer (/Piledriver/Steamroller/Excavator)->Zen features + // finally all the Bulldozer (/Piledriver/Steamroller/Excavator)->Zen features .with_avx2() - .with_aesni() - .with_pclmulqdq() - .with_f16c() .with_movbe() .with_bmi2() .with_adx() |
