NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-powerpc/39257: Mistake in sys/arch/powerpc/powerpc/trap_subr.S file
The following reply was made to PR port-powerpc/39257; it has been noted by
GNATS.
From: Konrad Karpowicz <konradk%pacomp.pl@localhost>
To: Havard Eidnes <he%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost,
port-powerpc-maintainer%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
konstrukcja%pacomp.pl@localhost
Subject: Re: port-powerpc/39257: Mistake in sys/arch/powerpc/powerpc/trap_subr.S
file
Date: Fri, 01 Aug 2008 14:23:29 +0200
Havard Eidnes pisze:
>> Tim Rightnour pisze:
>>
>>> I looked at the file at the location you mentioned, but I don't
>>> think the current code in CVS matches whatever you are looking
>>> at. The line numbers you gave don't match up. Can you please
>>> either tell me what the CVS revision number at the top of the
>>> file you are looking at is, or look at the most current one,
>>> which is
>>>
>> Dear Tim,
>> Thank you very much for quick answer. You are right, I was looking at
>> trap_subr.S v1.59.
>> In v 1.64 the line numbers are 540-547.
>> Lines 540 and 541: in my opinion the contents of R1 are not used anymore.
>> Line 544: change of the contents of R2 results in incorrect value loaded
>> into R1 in line 547.
>>
>
> It would probably be helpful if you quoted the actual code and gave
> a bit more context, such as which function you are talking about.
> The reason I say this is that in revision 1.64 of trap_subr.S, lines
> 540-547 look as follows:
>
> #endif
> _C_LABEL(tlbdlmsize) = .-_C_LABEL(tlbdlmiss)
>
> /* LINTSTUB: Var: int tlbdsmiss[1], tlbdsmsize[1]; */
> .globl _C_LABEL(tlbdsmiss),_C_LABEL(tlbdsmsize)
> _C_LABEL(tlbdsmiss):
> mfspr %r2,SPR_HASH1 /* get first pointer */
> li %r1,%r8
>
> which is probably not what you wanted to indicate.
>
> Regards,
>
> - Havard
Dear Havard,
Sorry again. German NetBSD FTP server has out of date NetBSD-current.
The lines are 590-597:
mfspr %r3,SPR_DMISS /* get the miss address */
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 */
bne- 9b /* protection violation */
8: /* found, set reference/change bits */
ldreg %r1,4(%r2) /* reload tlb entry */
At the moment I know which line has a bug. It is line
rlwnm. %r2,%r2,%r3,1,1 /* get the key */
and it should be:
rlwnm. %r1,%r1,%r3,1,1 /* get the key */
Now it seems to work OK. How is it possible that you haven't noticed it
before?
Kind regards,
Konrad Karpowicz
PACOMP
Home |
Main Index |
Thread Index |
Old Index