Skip to content

Commit 29dcd67

Browse files
Blackhexgithub-actions
authored andcommitted
0001-Cygwin-use-SysV-ABI-on-x86_64.patch
1 parent a1ad5c5 commit 29dcd67

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

gcc/builtin-attrs.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ DEF_ATTR_IDENT (ATTR_TYPEGENERIC, "type generic")
119119
DEF_ATTR_IDENT (ATTR_TM_REGPARM, "*tm regparm")
120120
DEF_ATTR_IDENT (ATTR_TM_TMPURE, "transaction_pure")
121121
DEF_ATTR_IDENT (ATTR_RETURNS_TWICE, "returns_twice")
122+
DEF_ATTR_IDENT (ATTR_SYSV_ABI, "sysv_abi")
122123
DEF_ATTR_IDENT (ATTR_RETURNS_NONNULL, "returns_nonnull")
123124
DEF_ATTR_IDENT (ATTR_WARN_UNUSED_RESULT, "warn_unused_result")
124125

@@ -401,6 +402,8 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST,
401402
ATTR_TM_REGPARM, ATTR_NULL, ATTR_CONST_NOTHROW_LIST)
402403
DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_LIST,
403404
ATTR_RETURNS_TWICE, ATTR_NULL, ATTR_TM_NOTHROW_LIST)
405+
DEF_ATTR_TREE_LIST (ATTR_TM_NOTHROW_RT_SYSV_LIST,
406+
ATTR_SYSV_ABI, ATTR_NULL, ATTR_TM_NOTHROW_RT_LIST)
404407

405408
/* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in. */
406409
DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST,

gcc/gtm-builtins.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DEF_TM_BUILTIN (BUILT_IN_TM_START, "_ITM_beginTransaction",
2-
BT_FN_UINT32_UINT32_VAR, ATTR_TM_NOTHROW_RT_LIST)
2+
BT_FN_UINT32_UINT32_VAR, ATTR_TM_NOTHROW_RT_SYSV_LIST)
33

44
DEF_TM_BUILTIN (BUILT_IN_TM_COMMIT, "_ITM_commitTransaction",
55
BT_FN_VOID, ATTR_TM_NOTHROW_LIST)

libitm/libitm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ extern "C" {
4545

4646
#define ITM_NORETURN __attribute__((noreturn))
4747
#define ITM_PURE __attribute__((transaction_pure))
48+
#define ITM_SYSV __attribute__((sysv_abi))
4849
#ifdef _GLIBCXX_NOTHROW
4950
# define _ITM_NOTHROW _GLIBCXX_NOTHROW
5051
#elif !defined (__cplusplus)
@@ -154,7 +155,7 @@ typedef uint64_t _ITM_transactionId_t; /* Transaction identifier */
154155

155156
extern _ITM_transactionId_t _ITM_getTransactionId(void) ITM_REGPARM;
156157

157-
extern uint32_t _ITM_beginTransaction(uint32_t, ...) ITM_REGPARM;
158+
extern uint32_t _ITM_beginTransaction(uint32_t, ...) ITM_REGPARM ITM_SYSV;
158159

159160
extern void _ITM_abortTransaction(_ITM_abortReason) ITM_REGPARM ITM_NORETURN;
160161

libitm/libitm_i.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ struct gtm_thread
294294
// Invoked from assembly language, thus the "asm" specifier on
295295
// the name, avoiding complex name mangling.
296296
static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *)
297-
__asm__(UPFX "GTM_begin_transaction") ITM_REGPARM;
297+
__asm__(UPFX "GTM_begin_transaction") ITM_REGPARM ITM_SYSV;
298298
// In eh_cpp.cc
299299
void init_cpp_exceptions ();
300300
void revert_cpp_exceptions (gtm_transaction_cp *cp = 0);
@@ -328,7 +328,7 @@ namespace GTM HIDDEN {
328328
extern uint64_t gtm_spin_count_var;
329329

330330
extern "C" uint32_t GTM_longjmp (uint32_t, const gtm_jmpbuf *, uint32_t)
331-
ITM_NORETURN ITM_REGPARM;
331+
ITM_NORETURN ITM_REGPARM ITM_SYSV;
332332

333333
extern "C" void GTM_LB (const void *, size_t) ITM_REGPARM;
334334

0 commit comments

Comments
 (0)