[U-Boot] Is it necessary that uboot(mips) should read status register($12) before setting it

Shinya Kuribayashi
2011-10-01T03:59:20Z

On 09/28/2011 06:09 PM, RdrouterUboot Router wrote:
> 2.Is it right?I can delete this code "mfc0 $10,$12" from uboot.

You can delete that MFC0 instruction in this case and save one word.
Presumably the original code used to update the Status register value
in read-modify-write manner, and at some point someone modified into
current shape.

By the way, since the first MIPS implementation of U-Boot was merged
into the tree (by wdenk), we've been using k0($26) or t0($8) register
as a scratch pad when modifying the Status register, while your example
code uses t2($10). So it would be a custom U-Boot we don't know of.