Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2026 15:29:27 +0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d6e1660971ce - stable/15 - sdt: Use the "cc" operand modifier for the address of probes for GCC 15+
Message-ID:  <69eb8c57.34aae.23a17bad@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=d6e1660971ce70d2589377990e42dcd234ad2063

commit d6e1660971ce70d2589377990e42dcd234ad2063
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-02-02 17:19:51 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-04-24 15:26:39 +0000

    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
    
    (cherry picked from commit f7144a9c4a11214a71a3091ce1b232a8243b83ea)
---
 sys/sys/sdt.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h
index cd45bc1a1ffd..1913ddb5cbfa 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69eb8c57.34aae.23a17bad>