[PATCH] D114318: [clang] Add missing CPUID feature bit masks
Adam Bruce via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 20 12:56:33 PST 2021
adamdb5 created this revision.
Herald added a subscriber: pengfei.
adamdb5 retitled this revision from "Whilst working on a project which uses the x86 CPUID instruction, I noticed the header provided by clang (cpuid.h), is missing some bit masks for the feature registers." to "Add missing CPUID bit masks.".
adamdb5 edited the summary of this revision.
adamdb5 retitled this revision from "Add missing CPUID bit masks." to "Add missing CPUID feature bit masks.".
adamdb5 retitled this revision from "Add missing CPUID feature bit masks." to "Add missing CPUID feature bit masks".
adamdb5 retitled this revision from "Add missing CPUID feature bit masks" to "[clang] Add missing CPUID feature bit masks".
adamdb5 added a project: clang.
adamdb5 updated this revision to Diff 388718.
adamdb5 added a comment.
adamdb5 added reviewers: pengfei, chenyang.liu, xiangzhangllvm.
adamdb5 published this revision for review.
Herald added a subscriber: cfe-commits.
ran clang-format
adamdb5 added a comment.
[clang] Add missing CPUID feature bit masks
Whilst working on a project which uses the x86 CPUID instruction, I noticed the header provided by clang (cpuid.h), is missing some bit masks for the feature registers.
I've implemented the missing masks, and also noticed that the previous mask
for PKU was shifted one bit too far to the right. It was 0b100, when it
should have been 0b1000.
Sources:
https://www.scss.tcd.ie/~jones/CS4021/processor-identification-cpuid-instruction-note.pdf
https://www.felixcloutier.com/x86/cpuid
This is my first commit, so please let me know if this is worth considering,
and any feedback is appreciated.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D114318
Files:
clang/lib/Headers/cpuid.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114318.388718.patch
Type: text/x-patch
Size: 16994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211120/5e8b4573/attachment-0001.bin>
More information about the cfe-commits
mailing list