RFR: 8280867: Cpuid1Ecx feature parsing is incorrect for AMD CPUs
Aleksey Shipilev
shade at openjdk.java.net
Mon Jan 31 13:19:28 UTC 2022
See discussion in the bug. AFAICS, the fix is to "just" shift the flags by one to match both Intel and AMD specs. I believe this is not a serious bug, because adjacent bits in AMD case are set on modern chips, and Intel detection code only uses `lzcnt` and `prefetchw` out of these flags, both with Intel-specific hacks that are dropped now.
Additional testing:
- [x] Linux x86_64 fastdebug on TR 3970X (Zen 2)
- [x] Linux x86_64 fastdebug on i5-11500 (Rocket Lake)
- [x] Eyeballing `-Xlog:os+cpu` on TR 3970X (Zen 2) -- no change in detected flags
- [x] Eyeballing `-Xlog:os+cpu` on i5-11500 (Rocket Lake) -- no change in detected flags
-------------
Commit messages:
- ...and copyright dates.
- Add braces, while we are at it
- Fix
Changes: https://git.openjdk.java.net/jdk/pull/7287/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7287&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8280867
Stats: 9 lines in 1 file changed: 0 ins; 1 del; 8 mod
Patch: https://git.openjdk.java.net/jdk/pull/7287.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7287/head:pull/7287
PR: https://git.openjdk.java.net/jdk/pull/7287
More information about the hotspot-dev
mailing list