From 79e55465d6c12494010768e51cdd362382c795c9 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 22 Nov 2007 23:31:56 +0000 Subject: Introduce an inline function to skip an instruction on 88110 and use it whenever necessary, instead of duplicating the same code 10+ times. --- sys/arch/mvme88k/include/m88110.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/arch/mvme88k') diff --git a/sys/arch/mvme88k/include/m88110.h b/sys/arch/mvme88k/include/m88110.h index d04f3cc24e4..b727a6447d4 100644 --- a/sys/arch/mvme88k/include/m88110.h +++ b/sys/arch/mvme88k/include/m88110.h @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110.h,v 1.19 2007/11/22 05:53:57 miod Exp $ */ +/* $OpenBSD: m88110.h,v 1.20 2007/11/22 23:31:55 miod Exp $ */ #ifndef __MACHINE_M88110_H__ #define __MACHINE_M88110_H__ @@ -258,5 +258,15 @@ static __inline__ void mc88110_inval_inst(void) set_icmd(CMMU_ICMD_INV_ITIC); } +/* skip one instruction */ +static __inline__ void +m88110_skip_insn(struct trapframe *frame) +{ + if (frame->tf_exip & 1) + frame->tf_exip = frame->tf_enip; + else + frame->tf_exip += 4; +} + #endif /* _LOCORE */ #endif /* __MACHINE_M88110_H__ */ -- cgit v1.2.3