git: 0388a0887a8d - main - dtrace: handle NOP instructions in the riscv invop handler

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 10 Apr 2023 16:14:33 UTC
The branch main has been updated by markj:

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

commit 0388a0887a8d0e6f21b130bf7d9f6b455958c7eb
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2023-04-10 15:30:48 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-04-10 16:14:11 +0000

    dtrace: handle NOP instructions in the riscv invop handler
    
    This will be used by a forthcoming port of the kinst provider.
    
    Reviewed by:    markj
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D39481
---
 sys/cddl/dev/dtrace/riscv/dtrace_subr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
index f32bb3a2343e..1717b118be7e 100644
--- a/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/riscv/dtrace_subr.c
@@ -308,6 +308,9 @@ dtrace_invop_start(struct trapframe *frame)
 		return (0);
 	}
 
+	if (match_opcode(invop, MATCH_C_NOP, MASK_C_NOP))
+		return (0);
+
 #ifdef INVARIANTS
 	panic("Instruction %x doesn't match any opcode.", invop);
 #endif