patch: wire up -mcx16

Nick Lewycky nlewycky at google.com
Fri Oct 4 18:04:42 PDT 2013


GCC has an x86 feature flag, "-mcx16" which enables support for CMPXCHG16B.
This feature already exists as a feature flag in llvm's x86 backend, but
there is no matching flag in clang (it is automatically enabled/disabled by
-march=). This patch has an llvm part and a clang part that wires up -mcx16
to the existing flag.

One note. There is a discrepancy between clang and gcc on -march= k8-sse3,
opteron-sse3, athlon64-sse3 and amdfam10, where our X86.td claims those
architectures support cmpxchg16b but gcc does not define the relevant
macro. I've gone ahead and made clang define the macro in the same cases
that gcc does, but have not changed which processors claim to support the
instruction in X86.td.

Please review!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131004/f56a31f1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcx16-1.patch
Type: application/octet-stream
Size: 6888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131004/f56a31f1/attachment.obj>


More information about the llvm-commits mailing list