summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-10-05 20:25:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-10-05 20:25:09 +0000
commitf2d9588f8a014d214667991ae0da96d66b2df72a (patch)
treeadec51b1ceee3efa55e0e52b28f65e7c797e447d
parent19c8093cf1709730e5210400ee3b336e5b338f4b (diff)
De-register
-rw-r--r--sys/arch/mvme88k/ddb/db_disasm.c122
-rw-r--r--sys/arch/mvme88k/dev/nvram.c30
-rw-r--r--sys/arch/mvme88k/dev/sclock.c70
-rw-r--r--sys/arch/mvme88k/include/asm.h4
-rw-r--r--sys/arch/mvme88k/include/asm_macro.h22
-rw-r--r--sys/arch/mvme88k/include/cpu_number.h20
-rw-r--r--sys/arch/mvme88k/include/profile.h8
-rw-r--r--sys/arch/mvme88k/include/trap.h4
-rw-r--r--sys/arch/mvme88k/mvme88k/autoconf.c22
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c16
-rw-r--r--sys/arch/mvme88k/mvme88k/dkbad.c8
11 files changed, 158 insertions, 168 deletions
diff --git a/sys/arch/mvme88k/ddb/db_disasm.c b/sys/arch/mvme88k/ddb/db_disasm.c
index 047121b7497..c5bbf03118c 100644
--- a/sys/arch/mvme88k/ddb/db_disasm.c
+++ b/sys/arch/mvme88k/ddb/db_disasm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_disasm.c,v 1.11 2002/05/16 13:01:41 art Exp $ */
+/* $OpenBSD: db_disasm.c,v 1.12 2003/10/05 20:25:06 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -46,7 +46,7 @@ static char *instwidth[4] = {
static char *condname[6] = {
"gt0 ", "eq0 ", "ge0 ", "lt0 ", "ne0 ", "le0 "
-};
+};
static char *m88100_ctrlreg[64] = {
"cr0(PID) ",
@@ -164,17 +164,17 @@ void bitman(int, char *, long);
void immem(int, char *, long);
void nimmem(int, char *, long);
void lognim(int, char *, long);
-void onimmed(int, char *, long);
+void onimmed(int, char *, long);
/* Handlers immediate integer arithmetic instructions */
void
oimmed(int inst, char *opcode, long iadr)
{
- register int Linst = inst & 0177777;
- register int Hinst = inst >> 16;
- register int H6inst = Hinst >> 10;
- register int rs1 = Hinst & 037;
- register int rd = ( Hinst >> 5 ) & 037;
+ int Linst = inst & 0177777;
+ int Hinst = inst >> 16;
+ int H6inst = Hinst >> 10;
+ int rs1 = Hinst & 037;
+ int rd = ( Hinst >> 5 ) & 037;
if (( H6inst > 017 ) && ( H6inst < 030 ) && ( H6inst & 01) == 1 )
db_printf("\t%s.u",opcode);
@@ -191,18 +191,18 @@ oimmed(int inst, char *opcode, long iadr)
void
ctrlregs(int inst, char *opcode, long iadr)
{
- register int L6inst = (inst >> 11) & 037;
- register int creg = (inst >> 5) & 077;
- register int rd = (inst >> 21) & 037;
- register int rs1 = (inst >> 16) & 037;
+ int L6inst = (inst >> 11) & 037;
+ int creg = (inst >> 5) & 077;
+ int rd = (inst >> 21) & 037;
+ int rs1 = (inst >> 16) & 037;
db_printf("\t%s",opcode);
if ( L6inst == 010 || L6inst == 011 )
- db_printf("\t\tr%-3d,%s", rd,
+ db_printf("\t\tr%-3d,%s", rd,
cputyp == CPU_88100 ? m88100_ctrlreg[creg] : m88110_ctrlreg[creg]);
else if ( L6inst == 020 || L6inst == 021 )
- db_printf("\t\tr%-3d,%s", rs1,
+ db_printf("\t\tr%-3d,%s", rs1,
cputyp == CPU_88100 ? m88100_ctrlreg[creg] : m88110_ctrlreg[creg]);
else
db_printf("\t\tr%-3d,r%-3d,%s", rd, rs1,
@@ -223,13 +223,13 @@ printsod(int t)
void
sindou(int inst, char *opcode, long iadr)
{
- register int rs2 = inst & 037;
- register int td = ( inst >> 5 ) & 03;
- register int t2 = ( inst >> 7 ) & 03;
- register int t1 = ( inst >> 9 ) & 03;
- register int rs1 = ( inst >> 16 ) & 037;
- register int rd = ( inst >> 21 ) & 037;
- register int checkbits = ( inst >> 11 ) & 037;
+ int rs2 = inst & 037;
+ int td = ( inst >> 5 ) & 03;
+ int t2 = ( inst >> 7 ) & 03;
+ int t1 = ( inst >> 9 ) & 03;
+ int rs1 = ( inst >> 16 ) & 037;
+ int rd = ( inst >> 21 ) & 037;
+ int checkbits = ( inst >> 11 ) & 037;
db_printf("\t%s.",opcode);
printsod(td);
@@ -250,8 +250,8 @@ sindou(int inst, char *opcode, long iadr)
void
jump(int inst, char *opcode, long iadr)
{
- register int rs2 = inst & 037;
- register int Nbit = ( inst >> 10 ) & 01;
+ int rs2 = inst & 037;
+ int Nbit = ( inst >> 10 ) & 01;
db_printf("\t%s",opcode);
if ( Nbit == 1 )
@@ -262,15 +262,15 @@ jump(int inst, char *opcode, long iadr)
}
-/* Handles ff1, ff0, tbnd and rte instructions */
+/* Handles ff1, ff0, tbnd and rte instructions */
void
instset(int inst, char *opcode, long iadr)
{
- register int rs2 = inst & 037;
- register int rs1 = ( inst >> 16 ) & 037;
- register int rd = ( inst >> 21 ) & 037;
- register int checkbits = ( inst >> 10 ) & 077;
- register int H6inst = ( inst >> 26 ) & 077;
+ int rs2 = inst & 037;
+ int rs1 = ( inst >> 16 ) & 037;
+ int rd = ( inst >> 21 ) & 037;
+ int checkbits = ( inst >> 10 ) & 077;
+ int H6inst = ( inst >> 26 ) & 077;
db_printf("\t%s",opcode);
if ( H6inst == 076 ) {
@@ -334,7 +334,7 @@ brcond(int inst, char *opcode, long iadr)
case 12: db_printf("%s,", condname[3]); break;
case 13: db_printf("%s,", condname[4]); break;
case 14: db_printf("%s,", condname[5]); break;
- default: printval(match);
+ default: printval(match);
db_printf(",");
} else {
printval(match);
@@ -380,13 +380,13 @@ obit(int inst, char *opcode, long iadr)
int rs = ( inst >> 16 ) & 037;
int rd = ( inst >> 21 ) & 037;
int width = ( inst >> 5 ) & 037;
- int offset = ( inst & 037 );
+ int offset = ( inst & 037 );
- db_printf("\t%s\t\tr%-3d,r%-3d,", opcode, rd, rs);
+ db_printf("\t%s\t\tr%-3d,r%-3d,", opcode, rd, rs);
if ( ( ( inst >> 10 ) & 077 ) == 052 ) {
- db_printf("<");
- printval(offset);
- db_printf(">");
+ db_printf("<");
+ printval(offset);
+ db_printf(">");
} else {
printval(width);
db_printf("<");
@@ -413,11 +413,11 @@ bitman(int inst, char *opcode, long iadr)
void
immem(int inst, char *opcode, long iadr)
{
- register int immed = inst & 0xFFFF;
- register int rd = (inst >> 21) & 037;
- register int rs = (inst >> 16) & 037;
- register int st_lda = (inst >> 28) & 03;
- register int aryno = (inst >> 26) & 03;
+ int immed = inst & 0xFFFF;
+ int rd = (inst >> 21) & 037;
+ int rs = (inst >> 16) & 037;
+ int st_lda = (inst >> 28) & 03;
+ int aryno = (inst >> 26) & 03;
char c = ' ';
if (!st_lda) {
@@ -433,7 +433,7 @@ immem(int inst, char *opcode, long iadr)
if (st_lda == 01)
opcode = "ld";
- db_printf("\t%s%s%c\t\tr%-3d,r%-3d,", opcode, instwidth[aryno],
+ db_printf("\t%s%s%c\t\tr%-3d,r%-3d,", opcode, instwidth[aryno],
c, rd, rs);
printval(immed);
}
@@ -443,13 +443,13 @@ immem(int inst, char *opcode, long iadr)
void
nimmem(int inst, char *opcode, long iadr)
{
- register int scaled = (inst >> 9) & 01;
- register int rd = (inst >> 21) & 037;
- register int rs1 = (inst >> 16) & 037;
- register int rs2 = inst & 037;
- register int st_lda = (inst >> 12) & 03;
- register int aryno = (inst >> 10) & 03;
- register int user_bit = 0;
+ int scaled = (inst >> 9) & 01;
+ int rd = (inst >> 21) & 037;
+ int rs1 = (inst >> 16) & 037;
+ int rs2 = inst & 037;
+ int st_lda = (inst >> 12) & 03;
+ int aryno = (inst >> 10) & 03;
+ int user_bit = 0;
int signed_fg = 1;
char *user = " ";
char c = ' ';
@@ -484,10 +484,10 @@ nimmem(int inst, char *opcode, long iadr)
user, rd, rs1);
} else
if (user_bit && signed_fg)
- db_printf("\t%s%s%s\tr%-3d,r%-3d", opcode,
+ db_printf("\t%s%s%s\tr%-3d,r%-3d", opcode,
instwidth[aryno], user, rd, rs1);
else
- db_printf("\t%s%s%c%s\tr%-3d,r%-3d", opcode,
+ db_printf("\t%s%s%c%s\tr%-3d,r%-3d", opcode,
instwidth[aryno], c, user, rd, rs1);
if (scaled)
@@ -501,10 +501,10 @@ nimmem(int inst, char *opcode, long iadr)
void
lognim(int inst, char *opcode, long iadr)
{
- register int rd = (inst >> 21) & 037;
- register int rs1 = (inst >> 16) & 037;
- register int rs2 = inst & 037;
- register int complemt = (inst >> 10) & 01;
+ int rd = (inst >> 21) & 037;
+ int rs1 = (inst >> 16) & 037;
+ int rs2 = inst & 037;
+ int complemt = (inst >> 10) & 01;
char *c = " ";
if (complemt)
@@ -518,12 +518,12 @@ lognim(int inst, char *opcode, long iadr)
void
onimmed(int inst, char *opcode, long iadr)
{
- register int rd = (inst >> 21) & 037;
- register int rs1 = (inst >> 16) & 037;
- register int rs2 = inst & 037;
- register int carry = (inst >> 8) & 03;
- register int nochar = (inst >> 10) & 07;
- register int nodecode = (inst >> 11) & 01;
+ int rd = (inst >> 21) & 037;
+ int rs1 = (inst >> 16) & 037;
+ int rs2 = inst & 037;
+ int carry = (inst >> 8) & 03;
+ int nochar = (inst >> 10) & 07;
+ int nodecode = (inst >> 11) & 01;
char *tab, *c ;
if (nochar > 02)
@@ -655,7 +655,7 @@ static char *badop = "\t???";
int
m88k_print_instruction(unsigned iadr, long inst)
{
- register struct opdesc *p;
+ struct opdesc *p;
/* this messes up "orb" instructions ever so slightly, */
/* but keeps us in sync between routines... */
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index e9f5a92a809..c175ebc1f23 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: nvram.c,v 1.21 2003/09/28 22:10:41 miod Exp $ */
+/* $OpenBSD: nvram.c,v 1.22 2003/10/05 20:25:08 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -25,7 +25,7 @@
* SUCH DAMAGE.
*/
-/*
+/*
* 8/22/2000 BH Cleaned up year 2000 problems with calendar hardware.
* This code will break again in 2068 or so - come dance on my grave.
*/
@@ -63,9 +63,9 @@ struct nvramsoftc {
void nvramattach(struct device *, struct device *, void *);
int nvrammatch(struct device *, void *, void *);
-struct cfattach nvram_ca = {
+struct cfattach nvram_ca = {
sizeof(struct nvramsoftc), nvrammatch, nvramattach
-};
+};
struct cfdriver nvram_cd = {
NULL, "nvram", DV_DULL, 0
@@ -145,7 +145,7 @@ nvramattach(parent, self, args)
*/
void
microtime(tvp)
- register struct timeval *tvp;
+ struct timeval *tvp;
{
int s = splhigh();
static struct timeval lasttime;
@@ -184,9 +184,9 @@ const short dayyr[12] =
u_long
chiptotime(sec, min, hour, day, mon, year)
- register int sec, min, hour, day, mon, year;
+ int sec, min, hour, day, mon, year;
{
- register int days, yr;
+ int days, yr;
sec = FROMBCD(sec);
min = FROMBCD(min);
@@ -233,9 +233,9 @@ void timetochip(struct chiptime *c);
void
timetochip(c)
- register struct chiptime *c;
+ struct chiptime *c;
{
- register int t, t2, t3, now = time.tv_sec;
+ int t, t2, t3, now = time.tv_sec;
/* January 1 1970 was a Thursday (4 in unix wdays) */
/* compute the days since the epoch */
@@ -284,7 +284,7 @@ timetochip(c)
* Set up the system's time, given a `reasonable' time value.
*/
-void
+void
inittodr(base)
time_t base;
{
@@ -304,7 +304,7 @@ inittodr(base)
badbase = 1;
}
if (brdtyp != BRD_188) {
- register struct clockreg *cl = (struct clockreg *)sc->sc_regs;
+ struct clockreg *cl = (struct clockreg *)sc->sc_regs;
cl->cl_csr |= CLK_READ; /* enable read (stop time) */
sec = cl->cl_sec;
min = cl->cl_min;
@@ -314,7 +314,7 @@ inittodr(base)
year = cl->cl_year;
cl->cl_csr &= ~CLK_READ; /* time wears on... */
} else { /* CPU_188 */
- register struct m188_clockreg *cl = (struct m188_clockreg *)sc->sc_regs;
+ struct m188_clockreg *cl = (struct m188_clockreg *)sc->sc_regs;
cl->cl_csr |= CLK_READ; /* enable read (stop time) */
sec = cl->cl_sec & 0xff;
min = cl->cl_min & 0xff;
@@ -363,7 +363,7 @@ resettodr()
struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0];
struct chiptime c;
if (brdtyp != BRD_188) {
- register struct clockreg *cl = (struct clockreg *)sc->sc_regs;
+ struct clockreg *cl = (struct clockreg *)sc->sc_regs;
if (!time.tv_sec || cl == NULL)
return;
@@ -378,7 +378,7 @@ resettodr()
cl->cl_year = c.year;
cl->cl_csr &= ~CLK_WRITE; /* load them up */
} else { /* CPU_188 */
- register struct m188_clockreg *cl = (struct m188_clockreg *)sc->sc_regs;
+ struct m188_clockreg *cl = (struct m188_clockreg *)sc->sc_regs;
if (!time.tv_sec || cl == NULL)
return;
diff --git a/sys/arch/mvme88k/dev/sclock.c b/sys/arch/mvme88k/dev/sclock.c
index 9b598fd5abd..6814ffaa40e 100644
--- a/sys/arch/mvme88k/dev/sclock.c
+++ b/sys/arch/mvme88k/dev/sclock.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: sclock.c,v 1.14 2003/06/02 23:27:51 millert Exp $ */
+/* $OpenBSD: sclock.c,v 1.15 2003/10/05 20:25:08 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -65,7 +65,7 @@
*/
/*
- * Statistics clock driver.
+ * Statistics clock driver.
*/
#include <sys/param.h>
@@ -82,12 +82,12 @@
#include <machine/autoconf.h>
#include <machine/cpu.h>
#include "pcctwo.h"
-#if NPCCTWO > 0
+#if NPCCTWO > 0
#include <mvme88k/dev/pcctwofunc.h>
#include <mvme88k/dev/pcctworeg.h>
#endif
#include "syscon.h"
-#if NSYSCON > 0
+#if NSYSCON > 0
#include <mvme88k/dev/sysconfunc.h>
#include <mvme88k/dev/sysconreg.h>
#endif
@@ -122,11 +122,11 @@ struct sclocksoftc {
struct cfattach sclock_ca = {
sizeof(struct sclocksoftc), sclockmatch, sclockattach
-};
-
-struct cfdriver sclock_cd = {
+};
+
+struct cfdriver sclock_cd = {
NULL, "sclock", DV_DULL, 0
-};
+};
int sbc_statintr(void *);
int m188_statintr(void *);
@@ -135,7 +135,7 @@ int sclockbus;
u_char stat_reset;
/*
- * Every machine needs, but doesn't have to have, a statistics clock.
+ * Every machine needs, but doesn't have to have, a statistics clock.
* For this platform, this file manages it, no matter what form it takes.
*/
int
@@ -143,8 +143,8 @@ sclockmatch(parent, vcf, args)
struct device *parent;
void *vcf, *args;
{
- register struct confargs *ca = args;
- register struct cfdata *cf = vcf;
+ struct confargs *ca = args;
+ struct cfdata *cf = vcf;
if (strcmp(cf->cf_driver->cd_name, "sclock")) {
return (0);
@@ -172,7 +172,7 @@ sclockattach(parent, self, args)
sclockbus = ca->ca_bustype;
switch (sclockbus) {
-#if NPCCTWO > 0
+#if NPCCTWO > 0
case BUS_PCCTWO:
sc->sc_statih.ih_fn = sbc_statintr;
sc->sc_statih.ih_arg = 0;
@@ -184,7 +184,7 @@ sclockattach(parent, self, args)
printf(": VME1x7");
break;
#endif /* NPCCTWO */
-#if NSYSCON > 0
+#if NSYSCON > 0
case BUS_SYSCON:
sc->sc_statih.ih_fn = m188_statintr;
sc->sc_statih.ih_arg = 0;
@@ -195,19 +195,19 @@ sclockattach(parent, self, args)
printf(": VME188");
break;
#endif /* NSYSCON */
- }
+ }
printf("\n");
}
-#if NPCCTWO > 0
+#if NPCCTWO > 0
void
sbc_initstatclock(void)
{
- register int statint, minint;
+ int statint, minint;
#ifdef CLOCK_DEBUG
printf("SBC statclock init\n");
-#endif
+#endif
if (stathz == 0)
stathz = hz;
if (1000000 % stathz) {
@@ -236,13 +236,13 @@ int
sbc_statintr(eframe)
void *eframe;
{
- register u_long newint, r, var;
+ u_long newint, r, var;
sys_pcc2->pcc2_t2irq = stat_reset;
/* increment intr counter */
- intrcnt[M88K_SCLK_IRQ]++;
-
+ intrcnt[M88K_SCLK_IRQ]++;
+
statclock((struct clockframe *)eframe);
/*
@@ -265,7 +265,7 @@ sbc_statintr(eframe)
}
#endif /* NPCCTWO */
-#if NSYSCON > 0
+#if NSYSCON > 0
#define CIO_LOCK simple_lock(&cio_lock)
#define CIO_UNLOCK simple_unlock(&cio_lock)
@@ -273,12 +273,12 @@ int
m188_statintr(eframe)
void *eframe;
{
- register u_long newint, r, var;
+ u_long newint, r, var;
CIO_LOCK;
-
+
/* increment intr counter */
- intrcnt[M88K_SCLK_IRQ]++;
+ intrcnt[M88K_SCLK_IRQ]++;
statclock((struct clockframe *)eframe);
write_cio(CIO_CSR1, CIO_GCB|CIO_CIP); /* Ack the interrupt */
@@ -298,13 +298,13 @@ m188_statintr(eframe)
*/
write_cio(CIO_CT1MSB, (newint & 0xFF00) >> 8); /* Load time constant CTC #1 */
write_cio(CIO_CT1LSB, newint & 0xFF);
-
+
write_cio(CIO_CSR1, CIO_GCB|CIO_CIP); /* Start CTC #1 running */
#if 0
if (*ist & CIOI_BIT) {
printf("CIOI not clearing!\n");
}
-#endif
+#endif
CIO_UNLOCK;
return (1);
}
@@ -312,7 +312,7 @@ m188_statintr(eframe)
void
m188_initstatclock(void)
{
- register int statint, minint;
+ int statint, minint;
#ifdef CLOCK_DEBUG
printf("VME188 clock init\n");
@@ -330,8 +330,8 @@ m188_initstatclock(void)
minint = statint / 2 + 100;
while (statvar > minint)
statvar >>= 1;
- m188_cio_init(statint);
- statmin = statint - (statvar >> 1);
+ m188_cio_init(statint);
+ statmin = statint - (statvar >> 1);
}
#define CIO_CNTRL 0xFFF8300C
@@ -343,17 +343,17 @@ write_cio(reg, val)
{
int s, i;
int *volatile cio_ctrl = (int *volatile)CIO_CNTRL;
-
+
s = splclock();
CIO_LOCK;
-
+
i = *cio_ctrl; /* goto state 1 */
*cio_ctrl = 0; /* take CIO out of RESET */
i = *cio_ctrl; /* reset CIO state machine */
*cio_ctrl = (reg & 0xFF); /* Select register */
*cio_ctrl = (val & 0xFF); /* Write the value */
-
+
CIO_UNLOCK;
splx(s);
}
@@ -369,7 +369,7 @@ read_cio(reg)
s = splclock();
CIO_LOCK;
-
+
/* Select register */
*cio_ctrl = (char)(reg&0xFF);
/* Delay for a short time to allow 8536 to settle */
@@ -421,7 +421,7 @@ m188_cio_init(p)
write_cio(CIO_CT1LSB, period & 0xFF);
/* enable counter 1 */
- write_cio(CIO_MCCR, CIO_MCCR_CT1E | CIO_MCCR_PBE);
+ write_cio(CIO_MCCR, CIO_MCCR_CT1E | CIO_MCCR_PBE);
/* enable interrupts and start */
/*write_cio(CIO_IVR, SYSCV_TIMER2);*/
diff --git a/sys/arch/mvme88k/include/asm.h b/sys/arch/mvme88k/include/asm.h
index 80853f6f65c..5d73a305816 100644
--- a/sys/arch/mvme88k/include/asm.h
+++ b/sys/arch/mvme88k/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.24 2003/09/16 20:52:19 miod Exp $ */
+/* $OpenBSD: asm.h,v 1.25 2003/10/05 20:25:08 miod Exp $ */
/*
* Mach Operating System
@@ -219,7 +219,7 @@
#define FLAG_197 11 /* bit number 11 */
/* REGister OFFset into the E.F. (exception frame) */
-#define REG_OFF(reg_num) ((reg_num) * 4) /* (num * sizeof(register int)) */
+#define REG_OFF(reg_num) ((reg_num) * 4) /* (num * sizeof(register_t)) */
#define GENREG_OFF(num) (REG_OFF(EF_R0 + (num))) /* GENeral REGister OFFset */
/*
diff --git a/sys/arch/mvme88k/include/asm_macro.h b/sys/arch/mvme88k/include/asm_macro.h
index 45e4ab08b5a..a981cfeedfb 100644
--- a/sys/arch/mvme88k/include/asm_macro.h
+++ b/sys/arch/mvme88k/include/asm_macro.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm_macro.h,v 1.21 2003/08/01 07:45:43 miod Exp $ */
+/* $OpenBSD: asm_macro.h,v 1.22 2003/10/05 20:25:08 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -68,7 +68,7 @@ typedef unsigned long m88k_psr_type;
*/
static __inline__ m88k_psr_type disable_interrupts_return_psr(void)
{
- register m88k_psr_type temp, oldpsr;
+ m88k_psr_type temp, oldpsr;
__asm__ __volatile__ ("ldcr %0, cr1" : "=r" (oldpsr));
__asm__ __volatile__ ("set %1, %0, 1<1>" : "=r" (oldpsr), "=r" (temp));
__asm__ __volatile__ ("stcr %0, cr1" : "=r" (temp));
@@ -80,7 +80,7 @@ static __inline__ m88k_psr_type disable_interrupts_return_psr(void)
/*
* Sets the PSR. See comments above.
*/
-static __inline__ void set_psr(register m88k_psr_type psr)
+static __inline__ void set_psr(m88k_psr_type psr)
{
__asm__ __volatile__ ("stcr %0, cr1" :: "r" (psr));
__asm__ __volatile__ (FLUSH_PIPELINE_STRING);
@@ -91,7 +91,7 @@ static __inline__ void set_psr(register m88k_psr_type psr)
*/
static __inline__ m88k_psr_type get_psr(void)
{
- register m88k_psr_type psr;
+ m88k_psr_type psr;
__asm__ __volatile__ ("ldcr %0, cr1" : "=r" (psr));
return psr;
}
@@ -101,7 +101,7 @@ static __inline__ m88k_psr_type get_psr(void)
*/
static __inline__ m88k_psr_type enable_interrupts_return_psr(void)
{
- register m88k_psr_type temp, oldpsr; /* need a temporary register */
+ m88k_psr_type temp, oldpsr; /* need a temporary register */
__asm__ __volatile__ ("ldcr %0, cr1" : "=r" (oldpsr));
__asm__ __volatile__ ("clr %1, %0, 1<1>" : "=r" (oldpsr), "=r" (temp));
__asm__ __volatile__ ("stcr %0, cr1" : "=r" (temp));
@@ -114,19 +114,9 @@ static __inline__ m88k_psr_type enable_interrupts_return_psr(void)
#define db_disable_interrupt disable_interrupt
/*
- * Gets the current stack pointer.
- */
-static __inline__ unsigned long stack_pointer(void)
-{
- register unsigned long sp;
- __asm__ __volatile__ ("or %0,r0,r31" : "=r" (sp));
- return sp;
-}
-
-/*
* Provide access from C code to the assembly instruction ff1
*/
-static __inline__ unsigned ff1(register unsigned val)
+static __inline__ unsigned ff1(unsigned val)
{
__asm__ __volatile__ ("ff1 %0, %0" : "=r" (val) : "0" (val));
return val;
diff --git a/sys/arch/mvme88k/include/cpu_number.h b/sys/arch/mvme88k/include/cpu_number.h
index 4e0cca956cb..cc8598cafbf 100644
--- a/sys/arch/mvme88k/include/cpu_number.h
+++ b/sys/arch/mvme88k/include/cpu_number.h
@@ -1,34 +1,34 @@
-/* $OpenBSD: cpu_number.h,v 1.11 2003/09/16 20:52:19 miod Exp $ */
+/* $OpenBSD: cpu_number.h,v 1.12 2003/10/05 20:25:08 miod Exp $ */
-/*
+/*
* Mach Operating System
* Copyright (c) 1993-1992 Carnegie Mellon University
* All Rights Reserved.
- *
+ *
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
- *
+ *
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
+ *
* Carnegie Mellon requests users of this software to return to
- *
+ *
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
#ifndef _M88K_CPU_NUMBER_
#define _M88K_CPU_NUMBER_
-
+
#ifdef _KERNEL
#ifndef _LOCORE
#include <machine/param.h>
@@ -37,7 +37,7 @@ static unsigned cpu_number(void);
static __inline__ unsigned cpu_number(void)
{
- register unsigned cpu;
+ unsigned cpu;
/* XXX what about 197DP? */
if (brdtyp != BRD_188)
diff --git a/sys/arch/mvme88k/include/profile.h b/sys/arch/mvme88k/include/profile.h
index 9bfb56ace4a..6eeaad3ab5b 100644
--- a/sys/arch/mvme88k/include/profile.h
+++ b/sys/arch/mvme88k/include/profile.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: profile.h,v 1.12 2003/06/02 23:27:52 millert Exp $ */
+/* $OpenBSD: profile.h,v 1.13 2003/10/05 20:25:08 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*
* from: @(#)profile.h 8.1 (Berkeley) 6/11/93
- * $Id: profile.h,v 1.12 2003/06/02 23:27:52 millert Exp $
+ * $Id: profile.h,v 1.13 2003/10/05 20:25:08 miod Exp $
*/
#ifndef __MACHINE_PROFILE_H__
#define __MACHINE_PROFILE_H__
@@ -40,8 +40,8 @@ extern void mcount() __asm__ ("mcount"); \
void \
mcount() \
{ \
- register int selfret; \
- register int callerret; \
+ int selfret; \
+ int callerret; \
/* \
* find the return address for mcount, \
* and the return address for mcount's caller. \
diff --git a/sys/arch/mvme88k/include/trap.h b/sys/arch/mvme88k/include/trap.h
index 43393c7722f..eca40fda705 100644
--- a/sys/arch/mvme88k/include/trap.h
+++ b/sys/arch/mvme88k/include/trap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.h,v 1.19 2003/09/17 22:22:30 miod Exp $ */
+/* $OpenBSD: trap.h,v 1.20 2003/10/05 20:25:08 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1992 Carnegie Mellon University
@@ -80,7 +80,7 @@ unsigned ss_getreg_val(unsigned, struct trapframe *);
int ss_inst_branch(unsigned);
int ss_inst_delayed(unsigned);
unsigned ss_next_instr_address(struct proc *, unsigned, unsigned);
-int cpu_singlestep(register struct proc *);
+int cpu_singlestep(struct proc *);
void m88100_trap(unsigned, struct m88100_saved_state *);
void m88100_syscall(register_t, struct m88100_saved_state *);
diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c
index c097685f7dc..9dc7c8fb5a9 100644
--- a/sys/arch/mvme88k/mvme88k/autoconf.c
+++ b/sys/arch/mvme88k/mvme88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.23 2003/09/02 20:14:08 miod Exp $ */
+/* $OpenBSD: autoconf.c,v 1.24 2003/10/05 20:25:08 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -108,8 +108,8 @@ cpu_configure()
void
swapconf()
{
- register struct swdevt *swp;
- register int nblks;
+ struct swdevt *swp;
+ int nblks;
for (swp = swdevt; swp->sw_dev != NODEV; swp++)
if (bdevsw[major(swp->sw_dev)].d_psize) {
@@ -124,7 +124,7 @@ swapconf()
}
/*
- * the rest of this file was adapted from Theo de Raadt's code in the
+ * the rest of this file was adapted from Theo de Raadt's code in the
* sparc port to nuke the "options GENERIC" stuff.
*/
@@ -142,7 +142,7 @@ findblkmajor(dv)
struct device *dv;
{
char *name = dv->dv_xname;
- register int i;
+ int i;
for (i = 0; i < sizeof(nam2blk)/sizeof(nam2blk[0]); ++i)
if (strncmp(name, nam2blk[i].name, strlen(nam2blk[0].name)) == 0)
@@ -156,7 +156,7 @@ getdisk(str, len, defpart, devp)
int len, defpart;
dev_t *devp;
{
- register struct device *dv;
+ struct device *dv;
if ((dv = parsedisk(str, len, defpart, devp)) == NULL) {
printf("use one of:");
@@ -180,8 +180,8 @@ parsedisk(str, len, defpart, devp)
int len, defpart;
dev_t *devp;
{
- register struct device *dv;
- register char *cp, c;
+ struct device *dv;
+ char *cp, c;
int majdev, unit, part;
if (len == 0)
@@ -229,9 +229,9 @@ parsedisk(str, len, defpart, devp)
void
setroot()
{
- register struct swdevt *swp;
- register struct device *dv;
- register int len, majdev, unit;
+ struct swdevt *swp;
+ struct device *dv;
+ int len, majdev, unit;
dev_t nrootdev, nswapdev = NODEV;
char buf[128];
dev_t temp;
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index ae232a9939d..2102245da71 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -1,9 +1,9 @@
-/* $OpenBSD: disksubr.c,v 1.22 2003/08/21 20:40:33 miod Exp $ */
+/* $OpenBSD: disksubr.c,v 1.23 2003/10/05 20:25:08 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -56,7 +56,7 @@ static void printlp(struct disklabel *lp, char *str);
static void printclp(struct cpu_disklabel *clp, char *str);
#endif
-/*
+/*
* Returns the ID of the SCSI disk based on Motorola's CLUN/DLUN stuff
* bootdev == CLUN << 8 | DLUN.
* This handles SBC SCSI and MVME32[78].
@@ -108,7 +108,7 @@ dk_establish(dk, dev)
sbsc = (struct scsibus_softc *)dev->dv_parent;
target = get_target(); /* Work the Motorola Magic */
lun = 0;
-
+
if (sbsc->sc_link[target][lun] != NULL &&
sbsc->sc_link[target][lun]->device_softc == (void *)dev) {
bootdv = dev;
@@ -272,7 +272,7 @@ int
writedisklabel(dev, strat, lp, clp)
dev_t dev;
void (*strat)(struct buf *);
- register struct disklabel *lp;
+ struct disklabel *lp;
struct cpu_disklabel *clp;
{
struct buf *bp;
@@ -336,7 +336,7 @@ writedisklabel(dev, strat, lp, clp)
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
- return (error);
+ return (error);
}
@@ -707,7 +707,7 @@ printlp(lp, str)
for (i = 0; i < lp->d_npartitions; i++) {
struct partition *part = &lp->d_partitions[i];
char *fstyp = fstypenames[part->p_fstype];
-
+
printf("%c: size %10x offset %10x type %7s frag %5x cpg %3x\n",
'a' + i, part->p_size, part->p_offset, fstyp,
part->p_frag, part->p_cpg);
@@ -742,7 +742,7 @@ printclp(clp, str)
}
fstyp = fstypenames[part->p_fstype];
-
+
printf("%c: size %10x offset %10x type %7s frag %5x cpg %3x\n",
'a' + i, part->p_size, part->p_offset, fstyp,
part->p_frag, part->p_cpg);
diff --git a/sys/arch/mvme88k/mvme88k/dkbad.c b/sys/arch/mvme88k/mvme88k/dkbad.c
index bdff1ef6e64..a2eeadc8706 100644
--- a/sys/arch/mvme88k/mvme88k/dkbad.c
+++ b/sys/arch/mvme88k/mvme88k/dkbad.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkbad.c,v 1.7 2003/06/02 23:27:52 millert Exp $ */
+/* $OpenBSD: dkbad.c,v 1.8 2003/10/05 20:25:08 miod Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -46,11 +46,11 @@ int isbad(struct dkbad *, int, int, int);
int
isbad(bt, cyl, trk, sec)
- register struct dkbad *bt;
+ struct dkbad *bt;
int cyl, trk, sec;
{
- register int i;
- register long blk, bblk;
+ int i;
+ long blk, bblk;
blk = ((long)cyl << 16) + (trk << 8) + sec;
for (i = 0; i < NBT_BAD; i++) {