git: 088cf0c5db2e - main - powerpc/dtrace: Guard fuword64 usage for powerpc64 only

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Mon, 21 Nov 2022 00:48:58 UTC
The branch main has been updated by jhibbits:

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

commit 088cf0c5db2ef59642460d142af8af34e48eb414
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2022-11-21 00:47:19 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2022-11-21 00:50:45 +0000

    powerpc/dtrace: Guard fuword64 usage for powerpc64 only
    
    32-bit powerpc doesn't have a fuword64, so only use it on powerpc64.
    This could also be done elsewhere that splits 32-bit and 64-bit
    accesses, but adding ifdefs everywhere would just clutter up the source
    for little benefit.  This is the only usage of fuword64 directly; other
    archs have a dtrace_fuword64_nocheck(), but powerpc does not, and I
    don't see a need to add it currently.
    
    MFC after:      1 week
---
 sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
index 8f4db66f817d..8f370ba6a186 100644
--- a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
+++ b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
@@ -246,12 +246,16 @@ fasttrap_usdt_args(fasttrap_probe_t *probe, struct reg *rp, int argc,
 		if (x < 8)
 			argv[i] = rp->fixreg[x];
 		else
+#ifdef __powerpc64__
 			if (SV_PROC_FLAG(curproc, SV_ILP32))
+#endif
 				argv[i] = fuword32((void *)(rp->fixreg[1] + 8 +
 				    (x * sizeof(uint32_t))));
+#ifdef __powerpc64__
 			else
 				argv[i] = fuword64((void *)(rp->fixreg[1] + 48 +
 				    (x * sizeof(uint64_t))));
+#endif
 	}
 
 	for (; i < argc; i++) {