| 1 |
/* GNU compiler hardware transactional execution intrinsics |
| 2 |
Copyright (C) 2013-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by Andreas Krebbel ([email protected]) |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify it under |
| 8 |
the terms of the GNU General Public License as published by the Free |
| 9 |
Software Foundation; either version 3, or (at your option) any later |
| 10 |
version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
| 13 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 14 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 15 |
for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
#ifndef _HTMINTRIN_H |
| 22 |
#define _HTMINTRIN_H |
| 23 |
|
| 24 |
|
| 25 |
/* Condition codes generated by tbegin */ |
| 26 |
#define _HTM_TBEGIN_STARTED 0 |
| 27 |
#define _HTM_TBEGIN_INDETERMINATE 1 |
| 28 |
#define _HTM_TBEGIN_TRANSIENT 2 |
| 29 |
#define _HTM_TBEGIN_PERSISTENT 3 |
| 30 |
|
| 31 |
/* The abort codes below this threshold are reserved for machine |
| 32 |
use. */ |
| 33 |
#define _HTM_FIRST_USER_ABORT_CODE 256 |
| 34 |
|
| 35 |
/* The transaction diagnostic block is it is defined in the Principles |
| 36 |
of Operation chapter 5-91. */ |
| 37 |
|
| 38 |
struct __htm_tdb { |
| 39 |
unsigned char format; /* 0 */ |
| 40 |
unsigned char flags; |
| 41 |
unsigned char reserved1[4]; |
| 42 |
unsigned short nesting_depth; |
| 43 |
unsigned long long abort_code; /* 8 */ |
| 44 |
unsigned long long conflict_token; /* 16 */ |
| 45 |
unsigned long long atia; /* 24 */ |
| 46 |
unsigned char eaid; /* 32 */ |
| 47 |
unsigned char dxc; |
| 48 |
unsigned char reserved2[2]; |
| 49 |
unsigned int program_int_id; |
| 50 |
unsigned long long exception_id; /* 40 */ |
| 51 |
unsigned long long bea; /* 48 */ |
| 52 |
unsigned char reserved3[72]; /* 56 */ |
| 53 |
unsigned long long gprs[16]; /* 128 */ |
| 54 |
} __attribute__((__packed__, __aligned__ (8))); |
| 55 |
|
| 56 |
|
| 57 |
#endif /* _HTMINTRIN_H */ |