From fd3c05b551cee43749b85427fb4cae3645822e44 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 5 Dec 2007 22:12:33 +0000 Subject: Make the CPU_88100 and CPU_88110 constants match the architectural number field from the processor identification register; this allows .S code which needs to decide on the cpu type at runtime to check quicker, without needing to access memory. No functional change. --- sys/arch/m88k/include/param.h | 6 +++--- sys/arch/m88k/m88k/eh_common.S | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'sys/arch/m88k') diff --git a/sys/arch/m88k/include/param.h b/sys/arch/m88k/include/param.h index 563bf09528a..f643deefa85 100644 --- a/sys/arch/m88k/include/param.h +++ b/sys/arch/m88k/include/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.10 2007/05/28 21:02:49 thib Exp $ */ +/* $OpenBSD: param.h,v 1.11 2007/12/05 22:12:32 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1988 University of Utah. @@ -124,8 +124,8 @@ extern int cputyp; /* * Values for the cputyp variable. */ -#define CPU_88100 0x100 -#define CPU_88110 0x110 +#define CPU_88100 0x00 +#define CPU_88110 0x01 #ifdef M88100 #ifdef M88110 diff --git a/sys/arch/m88k/m88k/eh_common.S b/sys/arch/m88k/m88k/eh_common.S index 9d8ba04cc6b..1946b9c4a8c 100644 --- a/sys/arch/m88k/m88k/eh_common.S +++ b/sys/arch/m88k/m88k/eh_common.S @@ -1,4 +1,4 @@ -/* $OpenBSD: eh_common.S,v 1.41 2007/12/02 21:32:08 miod Exp $ */ +/* $OpenBSD: eh_common.S,v 1.42 2007/12/05 22:12:32 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -2273,11 +2273,10 @@ ASGLOBAL(ast_done) /* reload the control regs*/ #if defined(M88100) && defined(M88110) - or.u r1, r0, hi16(_C_LABEL(cputyp)) - ld r30, r1, lo16(_C_LABEL(cputyp)) - cmp r1, r30, CPU_88110 - bb1 ne, r1, _ASM_LABEL(m88100_user_rte) - br _ASM_LABEL(m88110_user_rte) + ldcr r1, PID + extu r30, r1, 8<8> + bcnd ne0, r30, _ASM_LABEL(m88110_user_rte) + /* FALLTHROUGH */ #endif #ifdef M88100 -- cgit v1.2.3