diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-02-05 17:30:24 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-02-05 17:30:24 +0000 |
commit | 8600a3043da9598b34ffebd924c85e1c763e4b45 (patch) | |
tree | 0b83bfd670af8d768a5eb3d2a115918e8dbc5ef2 | |
parent | 1e56cd253ab7a3976ea09946af1b6ac4661ec248 (diff) |
Pull in some of the changes from NetBSD's revision 1.63:
thorpej
Sat Feb 1 23:55:54 PST 1997
...
- Eliminate some unnecessary cpu/mmu checks, based on what CPUs
the kernel was compiled for.
- Add some comments about possible further optimization.
...
-rw-r--r-- | sys/arch/hp300/hp300/locore.s | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s index 735ee0ec998..28ce12e5e2a 100644 --- a/sys/arch/hp300/hp300/locore.s +++ b/sys/arch/hp300/hp300/locore.s @@ -1,5 +1,5 @@ -/* $OpenBSD: locore.s,v 1.9 1997/02/03 15:54:43 deraadt Exp $ */ -/* $NetBSD: locore.s,v 1.62 1996/11/06 20:19:30 cgd Exp $ */ +/* $OpenBSD: locore.s,v 1.10 1997/02/05 17:30:23 downsj Exp $ */ +/* $NetBSD: locore.s,v 1.63 1997/02/02 07:55:52 thorpej Exp $ */ /* * Copyright (c) 1997 Theo de Raadt @@ -133,8 +133,10 @@ _buserr: jbsr _longjmp | longjmp(nofault) Lberr: #if defined(M68040) +#if defined(M68020) || defined(M68030) cmpl #MMU_68040,_mmutype | 68040? jne _addrerr | no, skip +#endif clrl sp@- | stack adjust count moveml #0xFFFF,sp@- | save user registers movl usp,a0 | save the user SP @@ -168,8 +170,10 @@ _addrerr: movl a0,sp@(FR_SP) | in the savearea lea sp@(FR_HW),a1 | grab base of HW berr frame #if defined(M68040) +#if defined(M68020) || defined(M68030) cmpl #MMU_68040,_mmutype | 68040? jne Lbenot040 | no, skip +#endif movl a1@(8),sp@- | yes, push fault address clrl sp@- | no SSW for address fault jra Lisaerr | go deal with it @@ -217,8 +221,10 @@ Lbe10: cmpw #12,d0 | address error vector? jeq Lisaerr | yes, go to it #if defined(M68K_MMU_MOTOROLA) +#if defined(M68K_MMU_HP) tstl _mmutype | HP MMU? jeq Lbehpmmu | yes, skip +#endif movl d1,a0 | fault address movl sp@,d0 | function code from ssw btst #8,d0 | data fault? @@ -290,7 +296,7 @@ Lstkadj: /* * FP exceptions. */ -_fpfline: +_fpfline: /* XXXthorpej - candidate for vector patch */ #if defined(M68040) cmpw #0x202c,sp@(6) | format type 2? jne _illinst | no, not an FP emulation @@ -307,7 +313,7 @@ _fpfline: jra _illinst #endif -_fpunsupp: +_fpunsupp: /* XXXthorpej - candidate for vector patch */ #if defined(M68040) cmpl #MMU_68040,_mmutype | 68040? jne _illinst | no, treat as illinst @@ -1461,8 +1467,10 @@ Lswnochg: lea tmpstk,sp | now goto a tmp stack for NMI #if defined(M68040) +#if defined(M68020) || defined(M68030) cmpl #MMU_68040,_mmutype | 68040? jne Lres1a | no, skip +#endif .word 0xf518 | yes, pflusha movl a1@(PCB_USTP),d0 | get USTP moveq #PGSHIFT,d1 @@ -1474,8 +1482,10 @@ Lres1a: movl #CACHE_CLR,d0 movc d0,cacr | invalidate cache(s) #if defined(M68K_MMU_MOTOROLA) +#if defined(M68K_MMU_HP) tstl _mmutype | HP MMU? jeq Lhpmmu4 | yes, skip +#endif pflusha | flush entire TLB movl a1@(PCB_USTP),d0 | get USTP moveq #PGSHIFT,d1 @@ -1505,8 +1515,10 @@ Lcxswdone: tstb a0@ | null state frame? jeq Lresfprest | yes, easy #if defined(M68040) +#if defined(M68020) || defined(M68030) cmpl #MMU_68040,_mmutype | 68040? jne Lresnot040 | no, skip +#endif clrl sp@- | yes... frestore sp@+ | ...magic! Lresnot040: |