Skip to content

Commit ac2aa8f

Browse files
committed
libgccjit: Add the function attributes for setting the ABI
1 parent 24fb235 commit ac2aa8f

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

gcc/jit/jit-playback.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,10 @@ const char* fn_attribute_to_string (gcc_jit_fn_attribute attr)
583583
return "weak";
584584
case GCC_JIT_FN_ATTRIBUTE_NONNULL:
585585
return "nonnull";
586+
case GCC_JIT_FN_ATTRIBUTE_MS_ABI:
587+
return "ms_abi";
588+
case GCC_JIT_FN_ATTRIBUTE_SYSV_ABI:
589+
return "sysv_abi";
586590
case GCC_JIT_FN_ATTRIBUTE_MAX:
587591
return NULL;
588592
}

gcc/jit/jit-recording.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4954,6 +4954,8 @@ static const char * const fn_attribute_reproducer_strings[] =
49544954
"GCC_JIT_FN_ATTRIBUTE_CONST",
49554955
"GCC_JIT_FN_ATTRIBUTE_WEAK",
49564956
"GCC_JIT_FN_ATTRIBUTE_NONNULL",
4957+
"GCC_JIT_FN_ATTRIBUTE_MS_ABI",
4958+
"GCC_JIT_FN_ATTRIBUTE_SYSV_ABI",
49574959
};
49584960

49594961
std::string

gcc/jit/libgccjit.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,6 +2169,10 @@ enum gcc_jit_fn_attribute
21692169
GCC_JIT_FN_ATTRIBUTE_WEAK,
21702170
GCC_JIT_FN_ATTRIBUTE_NONNULL,
21712171

2172+
// x86 attributes.
2173+
GCC_JIT_FN_ATTRIBUTE_MS_ABI,
2174+
GCC_JIT_FN_ATTRIBUTE_SYSV_ABI,
2175+
21722176
/* Maximum value of this enum, should always be last. */
21732177
GCC_JIT_FN_ATTRIBUTE_MAX,
21742178
};

0 commit comments

Comments
 (0)