summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-01-10 21:45:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-01-10 21:45:34 +0000
commit700c7dd0b4ec1939100e428c0d958736eb913db3 (patch)
tree55aa10eac7081fcaeb15c3f953187ac880f1c88c /sys
parent5455632f6a58915f40286cfac5256ff5f8489720 (diff)
Replace asm statements with stuff from asm*.h, or even simple equivalent
C statements. As a bonus this gets rid of the incorrect gcc 2.95 warnings in machdep.c
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/mvme88k/locore_c_routines.c10
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c28
2 files changed, 19 insertions, 19 deletions
diff --git a/sys/arch/mvme88k/mvme88k/locore_c_routines.c b/sys/arch/mvme88k/mvme88k/locore_c_routines.c
index 7f75a49dac7..dc528cbf9db 100644
--- a/sys/arch/mvme88k/mvme88k/locore_c_routines.c
+++ b/sys/arch/mvme88k/mvme88k/locore_c_routines.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore_c_routines.c,v 1.21 2001/12/22 19:27:48 smurph Exp $ */
+/* $OpenBSD: locore_c_routines.c,v 1.22 2002/01/10 21:45:33 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -328,10 +328,10 @@ vector_init(m88k_exception_vector_area *vector, unsigned *vector_init_list)
for (num = 0; (vec = vector_init_list[num]) != END_OF_VECTOR_LIST; num++) {
if (vec != PREDEFINED_BY_ROM)
SET_VECTOR(num, to, vec);
- __asm__ ("or r0, r0, r0");
- __asm__ ("or r0, r0, r0");
- __asm__ ("or r0, r0, r0");
- __asm__ ("or r0, r0, r0");
+ __asm__ (NOP_STRING);
+ __asm__ (NOP_STRING);
+ __asm__ (NOP_STRING);
+ __asm__ (NOP_STRING);
}
switch (cputyp) {
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index f603f93318a..973caa4d29e 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.83 2002/01/07 02:34:04 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.84 2002/01/10 21:45:33 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -1757,8 +1757,8 @@ m187_ext_int(u_int v, struct m88100_saved_state *eframe)
u_char vec;
/* get level and mask */
- __asm __volatile("ld.b %0,%1" : "=r" (mask) : "" (*md.intr_mask));
- __asm __volatile("ld.b %0,%1" : "=r" (level) : "" (*md.intr_ipl));
+ mask = *md.intr_mask;
+ level = *md.intr_ipl;
/*
* It is really bizarre for the mask and level to the be the same.
@@ -1792,13 +1792,13 @@ m187_ext_int(u_int v, struct m88100_saved_state *eframe)
}
/* generate IACK and get the vector */
- __asm __volatile("tb1 0, r0, 0");
+ flush_pipeline();
if (guarded_access(ivec[level], 1, &vec) == EFAULT) {
panic("Unable to get vector for this interrupt (level %x)\n", level);
}
- __asm __volatile("tb1 0, r0, 0");
- __asm __volatile("tb1 0, r0, 0");
- __asm __volatile("tb1 0, r0, 0");
+ flush_pipeline();
+ flush_pipeline();
+ flush_pipeline();
if (vec > 0xFF) {
panic("interrupt vector %x greater than 255", vec);
@@ -1873,8 +1873,8 @@ m197_ext_int(u_int v, struct m88100_saved_state *eframe)
u_char vec;
/* get src and mask */
- __asm __volatile("ld.b %0,%1" : "=r" (mask) : "" (*md.intr_mask));
- __asm __volatile("ld.b %0,%1" : "=r" (src) : "" (*md.intr_src));
+ mask = *md.intr_mask;
+ src = *md.intr_src;
if (v == T_NON_MASK) {
/* This is the abort switch */
@@ -1882,7 +1882,7 @@ m197_ext_int(u_int v, struct m88100_saved_state *eframe)
vec = BS_ABORTVEC;
} else {
/* get level */
- __asm __volatile("ld.b %0,%1" : "=r" (level) : "" (*md.intr_ipl));
+ level = *md.intr_ipl;
}
/*
@@ -1907,13 +1907,13 @@ m197_ext_int(u_int v, struct m88100_saved_state *eframe)
if (v != T_NON_MASK) {
/* generate IACK and get the vector */
- __asm __volatile("tb1 0, r0, 0");
+ flush_pipeline();
if (guarded_access(ivec[level], 1, &vec) == EFAULT) {
panic("Unable to get vector for this interrupt (level %x)\n", level);
}
- __asm __volatile("tb1 0, r0, 0");
- __asm __volatile("tb1 0, r0, 0");
- __asm __volatile("tb1 0, r0, 0");
+ flush_pipeline();
+ flush_pipeline();
+ flush_pipeline();
}
if (vec > 0xFF) {