[mips] Use "foreach" loop to make register definitions more concise.