[Pkg-mono-svn-commits] [mono] 01/03: There is a bug in the silicon on Loongson 2E and 2F processors, which can cause the traditional NOP instruction (which doesn't exist on MIPS but is an alias to 'sll 0,0,0') to fail intermittently under high load. This is worked around in binutils (https://sourceware.org/ml/binutils/2009-11/msg00387.html) but that only applies to software compiled via binutils, not via a JITter like Mono. The fix uses a different no-op instruction which does not trigger the CPU bug. Thanks to Alex Rønne Petersen for his help.

Jo Shields directhex at moszumanska.debian.org
Wed Nov 20 22:15:12 UTC 2013


This is an automated email from the git hooks/post-receive script.

directhex pushed a commit to branch master-experimental
in repository mono.

commit 8a07907bddd89c341dc0feb43471b0275af60144
Author: Jo Shields <directhex at apebox.org>
Date:   Fri Nov 15 00:00:01 2013 +0000

    There is a bug in the silicon on Loongson 2E and 2F processors, which can cause the traditional NOP instruction (which doesn't exist on MIPS but is an alias to 'sll 0,0,0') to fail intermittently under high load. This is worked around in binutils (https://sourceware.org/ml/binutils/2009-11/msg00387.html) but that only applies to software compiled via binutils, not via a JITter like Mono. The fix uses a different no-op instruction which does not trigger the CPU bug. Thanks to Alex Rønn [...]
---
 mono/arch/mips/mips-codegen.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mono/arch/mips/mips-codegen.h b/mono/arch/mips/mips-codegen.h
index dc4df7d..1dbd1c6 100644
--- a/mono/arch/mips/mips-codegen.h
+++ b/mono/arch/mips/mips-codegen.h
@@ -334,7 +334,7 @@ enum {
 /* misc and coprocessor ops */
 #define mips_move(c,dest,src) mips_addu(c,dest,src,mips_zero)
 #define mips_dmove(c,dest,src) mips_daddu(c,dest,src,mips_zero)
-#define mips_nop(c) mips_sll(c,0,0,0)
+#define mips_nop(c) mips_or(c,mips_at,mips_at,0)
 #define mips_break(c,code) mips_emit32(c, ((code)<<6)|13)
 #define mips_mfhi(c,dest) mips_format_r(c,0,0,0,dest,0,16)
 #define mips_mflo(c,dest) mips_format_r(c,0,0,0,dest,0,18)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mono/packages/mono.git



More information about the Pkg-mono-svn-commits mailing list