Fix bug where SRR1 (%r2) was being accidently misused and modifed

in place of segreg (%r1).

From Konrad Karpowicz <konradk at pacomp dot pl>.
This commit is contained in:
matt 2008-08-01 16:32:03 +00:00
parent d172dc9df5
commit c54e2d5527

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap_subr.S,v 1.64 2008/05/24 21:39:01 phx Exp $ */
/* $NetBSD: trap_subr.S,v 1.65 2008/08/01 16:32:03 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@ -591,7 +591,7 @@ _C_LABEL(tlbdsmiss):
mfsrin %r1,%r3 /* get the segment register */
mfsrr1 %r3
rlwinm %r3,%r3,18,31,31 /* get PR-bit */
rlwnm. %r2,%r2,%r3,1,1 /* get the key */
rlwnm. %r1,%r1,%r3,1,1 /* get the key */
bne- 9b /* protection violation */
8: /* found, set reference/change bits */
ldreg %r1,4(%r2) /* reload tlb entry */