summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-11-22 23:31:56 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-11-22 23:31:56 +0000
commit79e55465d6c12494010768e51cdd362382c795c9 (patch)
tree36117ff26e37e1542c16928dcd863a877ca8337b /sys/arch/mvme88k/include
parentf759cbc10fee3cc3cceb8babff7e53b3e00f9c28 (diff)
Introduce an inline function to skip an instruction on 88110 and use it
whenever necessary, instead of duplicating the same code 10+ times.
Diffstat (limited to 'sys/arch/mvme88k/include')
-rw-r--r--sys/arch/mvme88k/include/m88110.h12
1 files changed, 11 insertions, 1 deletions
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__ */