Add clang support of RTM from TSX
authorMichael Liao <michael.liao@intel.com>
Sat, 10 Nov 2012 05:17:46 +0000 (05:17 +0000)
committerMichael Liao <michael.liao@intel.com>
Sat, 10 Nov 2012 05:17:46 +0000 (05:17 +0000)
commit625a875f052027e770ad360a10096220d63143ae
tree6a3b83981907db0a08991009b28517573c2c6aed
parent9fbda3953b0666e288156c54f5f6973e9dd4019e
Add clang support of RTM from TSX

- New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature
- Builtin macro '__RTM__' is defined if RTM feature is enabled
- RTM intrinsic header is added and introduces 3 new intrinsics, namely
  '_xbegin', '_xend', and '_xabort'.
- 3 new builtins are added to keep compatible with gcc, namely
  '__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'.
- Test cases for pre-defined macro and new intrinsic codegen are added.

llvm-svn: 167665
clang/include/clang/Basic/BuiltinsX86.def
clang/include/clang/Driver/Options.td
clang/lib/Basic/Targets.cpp
clang/lib/Headers/CMakeLists.txt
clang/lib/Headers/immintrin.h
clang/lib/Headers/rtmintrin.h [new file with mode: 0644]
clang/test/CodeGen/rtm-builtins.c [new file with mode: 0644]
clang/test/Preprocessor/predefined-arch-macros.c