Fix the `nop` opcode on some MIPS-based Loongson CPUs.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 15 Nov 2013 14:08:06 +0000 (15:08 +0100)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 15 Nov 2013 14:08:06 +0000 (15:08 +0100)
commita0cd023d06cb09c43d1cb93ee08bf917292e31ed
treef60ac79f6f0f5f7b2d2795c5ef354447bbfdced9
parent891d594b3f7aa112fb2d0696bf0ca15315a74911
Fix the `nop` opcode on some MIPS-based Loongson CPUs.

After much trouble building Mono in Debian/MIPS, @directhex
narrowed it down to this issue:

https://sourceware.org/ml/binutils/2009-11/msg00387.html

So since some of the 2E and 2F versions of the Loongson CPUs
break with a regular `sll zero, zero, 0` we need to issue an
`or at, at, 0`. This makes sure we don't randomly deadlock or
blow up when the CPU is under heavy load.

Yes, really.
mono/arch/mips/mips-codegen.h