[PATCH] [PATCH v4] [PowerPC] Add Hardware Transaction Memory builtins support

Adhemerval Zanella zatrazz at gmail.com
Wed Mar 11 04:59:17 PDT 2015


Hi hfinkel, kbarton, nemanjai, wschmidt,

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

http://reviews.llvm.org/D8248

Files:
  include/clang/Basic/BuiltinsPPC.def
  include/clang/Driver/Options.td
  lib/Basic/Targets.cpp
  lib/CodeGen/CGBuiltin.cpp
  lib/Headers/htmintrin.h
  lib/Headers/htmxlintrin.h
  test/CodeGen/builtins-ppc-htm.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8248.21687.patch
Type: text/x-patch
Size: 19938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150311/87d59d3f/attachment.bin>


More information about the cfe-commits mailing list