This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] S/390: Hardware transactional memory support

On Fri, Jun 21, 2013 at 12:23:14PM +0200, Andreas Krebbel wrote:
> the attached patch implements support for hardware transactional
> memory in the S/390 backend.
> The transactional execution facility has been made available with IBM
> Enterprise EC12.  Documentation can be found in the Principles of
> Operation manual:
> The patch implements a set of GCC style builtins as well as the
> builtins provided with the IBM XL compiler for compatibility reasons.
> The GCC builtins are used to implement HTM support in libitm. All
> libitm testcases succeed with this patch applied (and some libitm
> bugfixes from Torvald Riegel).
> The builtins are enabled by default when compiling with -march=zEC12.
> They can be disabled with the -mno-htm switch.
> Bootstrapped and regtested on s390 and s390x (configured with
> --with-arch=zEC12).
> Any comments?

Have you considered trying it to work even when libitm itself isn't built
for zEC12 or later only?  I mean, both the i?86/x86_64 and powerpc* libitm
HTM don't define htm_available as unconditional true, they check in some way
whether the CPU supports HTM and return true if yes, and as needed some
parts or whole of libitm is compiled with some compiler option that
allows the HTM instructions to be generated.

I see your patch will currently error out if you have HTM builtins
insode of code, -mtx and don't enable -march=zEC12, could that be changed,
so that -mtx is essentially independent on the chosen CPU?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]