[MIPS] Type proof reimplementation of cmpxchg.