Page MenuHomePhabricator

Add more gcc compatibility names to clang's cpuid.h
ClosedPublic

Authored by dim on Jul 5 2016, 1:20 PM.

Details

Summary

Some cpuid bit defines are named slightly different from how gcc's cpuid.h calls them.

Define a few more compatibility names to appease software built for gcc:

  • bit_PCLMUL alias of bit_PCLMULQDQ
  • bit_SSE4_1 alias of bit_SSE41
  • bit_SSE4_2 alias of bit_SSE42
  • bit_AES alias of bit_AESNI
  • bit_CMPXCHG8B alias of bit_CX8

While here, add the misssing 29th bit, bit_F16C.

Diff Detail

Repository
rL LLVM

Event Timeline

dim updated this revision to Diff 62781.Jul 5 2016, 1:20 PM
dim retitled this revision from to Add more gcc compatibility names to clang's cpuid.h.
dim updated this object.
dim added reviewers: joerg, rsmith.
dim added a subscriber: cfe-commits.
bruno added a subscriber: bruno.Jul 18 2016, 11:40 AM
bruno added inline comments.
lib/Headers/cpuid.h
114 ↗(On Diff #62781)

Isn't this one also meant for gcc compat?

dim added inline comments.Jul 21 2016, 12:05 PM
lib/Headers/cpuid.h
114 ↗(On Diff #62781)

Well, we didn't have any clang-specific define, so might as well choose the same name that gcc has used?

This revision was automatically updated to reflect the committed changes.