]> granicus.if.org Git - clang/commit
Add Hardware Transactional Memory (HTM) Support
authorKit Barton <kbarton@ca.ibm.com>
Wed, 25 Mar 2015 19:41:41 +0000 (19:41 +0000)
committerKit Barton <kbarton@ca.ibm.com>
Wed, 25 Mar 2015 19:41:41 +0000 (19:41 +0000)
commitbf6ca3f158dc63d783afcd68e9845f9580126b63
treeaf8779bbf7779317108ff575b5dc2607bfcf6a55
parent61dc389d9368f99eb73d3b10ac8324c548c4cc44
Add Hardware Transactional Memory (HTM) Support

This patch adds Hardware Transaction Memory (HTM) support supported by ISA 2.07
(POWER8). The intrinsic support is based on GCC one [1], with both 'PowerPC HTM
Low Level Built-in Functions' and 'PowerPC HTM High Level Inline Functions'
implemented.

Along with builtins a new driver switch is added to enable/disable HTM
instruction support (-mhtm) and a header with common definitions (mostly to
parse the TFHAR register value). The HTM switch also sets a preprocessor builtin
HTM.

The HTM usage requires a recently newer kernel with PPC HTM enabled. Tested on
powerpc64 and powerpc64le.

This is send along a llvm patch to enabled the builtins and option switch.

[1]
https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Hardware-Transactional-Memory-Built-in-Functions.html

Phabricator Review: http://reviews.llvm.org/D8248

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233205 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/BuiltinsPPC.def
include/clang/Driver/Options.td
lib/Basic/Targets.cpp
lib/CodeGen/CGBuiltin.cpp
lib/Headers/htmintrin.h [new file with mode: 0644]
lib/Headers/htmxlintrin.h [new file with mode: 0644]
test/CodeGen/builtins-ppc-htm.c [new file with mode: 0644]