mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-17 08:04:36 +00:00
The patch was submitted by Will Schmidt (will_schmidt@vnet.ibm.com). Patches 4 and 5 need to be applied together. Add convenience function for processing hwcap entries. Add logic to check for HTM support in compiler. Bugzilla 34979 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15423
26 lines
757 B
C
26 lines
757 B
C
#include <stdio.h>
|
|
|
|
int main (void) {
|
|
#ifdef SUPPORTS_HTM
|
|
/* Just get the compiler to generate each of the TM instructions
|
|
* so we can verify that valgrind recognizes them.
|
|
* For now, only the tbegin instruction does anything in valgrind.
|
|
* The rest are just treated as NOPS.
|
|
*/
|
|
__builtin_tabort (0);
|
|
__builtin_tabortdc (0,0,0);
|
|
__builtin_tabortdci (0,0,0);
|
|
__builtin_tabortwc (0,0,0);
|
|
__builtin_tabortwci (0,0,0);
|
|
__builtin_tbegin (0);
|
|
__builtin_tend (0);
|
|
// __builtin_tcheck (0); tcheck not recognized by compiler
|
|
__builtin_trechkpt (); // not recognized by early HW
|
|
__builtin_treclaim (0); // not recognized by early HW
|
|
__builtin_tsr (0);
|
|
#else
|
|
printf ("No HTM support.");
|
|
#endif
|
|
return 0;
|
|
}
|