Applying parts of a patch from Carl van Schaik to clear out bottom bits of MIPS addresses more correctly, when using large page sizes, and doing some other minor cleanup/refactoring.
Authored by: debug 2007-04-28
Parent: [r4769]
Child: [r4771]