MIPS: Backport of r15102 and r19121 that resolve cctest failures.

TEST=
BUG=