Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/sparc/sparc




To: source-changes%NetBSD.org@localhost

Subject: CVS commit: src/sys/arch/sparc/sparc

From: "matthew green" <mrg%netbsd.org@localhost>

Date: Sun, 28 Aug 2011 10:26:15 +0000


Module Name:    src
Committed By:   mrg
Date:           Sun Aug 28 10:26:15 UTC 2011

Modified Files:
        src/sys/arch/sparc/sparc: pmap.c

Log Message:
fix sparc UP kernels with GCC 4.5, with special thanks to help from
mlelstv@ tracking down the real issue.

sp_tlb_flush() makes various assumptions about the ABI and what GCC
will do with the rest of this function.  the inputs were not referenced
by name but only as "%o0" etc inside the asm.  the result was that GCC
was not filling in the function parameters before calling it because
they were not used in the function.  so, sp_tlb_flush() was getting
random data for it's inputs.  oops.

for now, convert 2 asm() calls to pure C, and mark the inputs for
the sta calls.  this makes GCC generate the right code, but it still
isn't entirely optimal.

ideally a pure C version would exist, but that adds non-trivial
overhead (15 instructions vs 23 or so.)

one more enhancement to make here would be to assign the %o3, %o4 and
%o5 usage into explicit temp variables, instead of assuming that they
are going to be free to use.


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/arch/sparc/sparc/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.






Prev by Date: CVS commit: src/sys/dev/ic

Next by Date: CVS commit: src/crypto/external/bsd/heimdal/lib/libcom_err/compile_et

Previous by Thread: CVS commit: src/sys/dev/ic

Next by Thread: CVS commit: src/crypto/external/bsd/heimdal/lib/libcom_err/compile_et

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index