dtrace: implement dtrace_instr_size() for arm64

Reviewed by:	markj
Approved by;	markj (mentor)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39955
This commit is contained in:
Christos Margiolis 2023-05-23 17:19:15 +03:00
parent 27ff920e6a
commit db05f9fbfb
3 changed files with 19 additions and 1 deletions

View File

@ -131,6 +131,10 @@ SRCS+= instr_size.c
DSRCS+= regs_riscv.d
.endif
.if ${MACHINE_CPUARCH} == "aarch64"
SRCS+= instr_size.c
.endif
YFLAGS+=-d
LIBADD= ctf elf proc pthread rtld_db

View File

@ -0,0 +1,14 @@
/*
* SPDX-License-Identifier: CDDL 1.0
*
* Copyright 2023 Christos Margiolis <christos@FreeBSD.org>
*/
#include <sys/types.h>
#include <sys/dtrace.h>
int
dtrace_instr_size(uint8_t *instr __unused)
{
return (INSN_SIZE);
}

View File

@ -24,7 +24,7 @@ CFLAGS+= -I${SYSDIR}/cddl/contrib/opensolaris/uts/intel \
-I${SYSDIR}/cddl/dev/dtrace/x86
.endif
.if ${MACHINE_CPUARCH} == "riscv"
.if ${MACHINE_CPUARCH} == "riscv" || ${MACHINE_CPUARCH} == "aarch64"
SRCS+= instr_size.c
.endif