[mips] Big-endian code generation for atomic instructions.

Patch by Jyun-Yan You.