diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-02-02 17:19:51 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-02-02 17:19:51 +0000 |
| commit | f7144a9c4a11214a71a3091ce1b232a8243b83ea (patch) | |
| tree | 9092493f1b37c4293147d264995a1c3915b51c3e | |
| parent | 03d8ac948b1ad9c419b294c3129b7da58d818363 (diff) | |
sdt: Use the "cc" operand modifier for the address of probes for GCC 15+
This is required for GCC on RISC-V. The GCC 15 docs claim that "cc" is
similar to "c" except that it "tries harder".
NB: I have not yet found a way to make the DTrace probes compile on
RISC-V with older versions of GCC.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54964
| -rw-r--r-- | sys/sys/sdt.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index f705be915684..0be4e9ba6240 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -194,8 +194,12 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); #define _SDT_ASM_PROBE_CONSTRAINT "i" #endif #ifndef _SDT_ASM_PROBE_OPERAND +#if !defined(__clang__) && __GNUC_PREREQ__(15, 0) +#define _SDT_ASM_PROBE_OPERAND "cc" +#else #define _SDT_ASM_PROBE_OPERAND "c" #endif +#endif /* * The asm below generates records corresponding to the structure's layout, so |
