Subject: Re: Mod against "common" codes -- NetBSD/playstation2
To: None <locore32@gaea.ocn.ne.jp>
From: None <cgd@broadcom.com>
List: port-mips
Date: 10/16/2001 22:51:30
locore32@gaea.ocn.ne.jp ("Toru Nishimura") writes:
> One point which affects NetBSD/mips in general.  It would be better to
> avoid dmtc0/dmfc0 and keep other dXXX arithmetics minimal in order to
> make entire code sane and less painfull for MIPS32 processor.  64bit pointer
> is hardly justified before NetBSD/mips64.   And MIPS32 can be considered
> as a "norm case" keeping other type processor compatiblities in mind.

Uh, what would you currently eliminate, from the uses of dm?c0 ops.

I imagine some of the TLB HI/LO, etc. uses could be removed (not sure
if it'd really be portable, though -- i'd have to check my MIPS64
specs, and i don't know that it's worth it to me to spend my time on
it.  also don't know what that'd do to e.g. phys addr size
restrictions)...

some of the uses (e.g. the badvaddr, exception/error PC, etc.)
wouldn't be _correct_ if you changed them to use just mfc0...


If the goal is to abstract old-MIPS vs. MIPS32 vs. MIPS64, etc.,
exception handlers, that's best done by... having different exception
handlers, which aren't common code.  (Or, by creating a single set of
code which can have the some instructions #defined as appropriate, and
then gets included multiple times.)



cgd