This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH v1] Add Loongson2F specific NOP instruction
- From: Wu Zhangjin <wuzhangjin at gmail dot com>
- To: binutils at sourceware dot org
- Cc: "Alfred M. Szmidt" <ams at gnu dot org>, zhangfx at lemote dot com, yanh at lemote dot com, Wu Zhangjin <wuzhangjin at gmail dot com>
- Date: Fri, 13 Nov 2009 17:02:56 +0800
- Subject: [PATCH v1] Add Loongson2F specific NOP instruction
This is a patch to work around a possible cpu pipeline issue. Without this,
under extreme cases, cpu might deadlock.(e.g. some have seen this with binutils
2.18, ld dies when compiling)
The changed instruction has no real effect since it does nothing except
an extra writing operation, which is the key to prevent issue. The issue
has been solved in latest processor batches.
2009-11-13 Wu Zhangjin <wuzhangjin@gmail.com>
* mips-opc.c (mips_builtin_opcodes): Add NOP instruction for
Lemote Loongson 2F.
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index caeef72..c430b02 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -187,6 +187,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
/* name, args, match, mask, pinfo, pinfo2, membership */
{"pref", "k,o(b)", 0xcc000000, 0xfc000000, RD_b, 0, I4_32|G3 },
{"prefx", "h,t(b)", 0x4c00000f, 0xfc0007ff, RD_b|RD_t|FP_S, 0, I4_33 },
+{"nop", "", 0x00021021, 0xffffffff, 0, INSN2_ALIAS, IL2F }, /* addu v0,zero,v0 */
{"nop", "", 0x00000000, 0xffffffff, 0, INSN2_ALIAS, I1 }, /* sll */
{"ssnop", "", 0x00000040, 0xffffffff, 0, INSN2_ALIAS, I32|N55 }, /* sll */
{"ehb", "", 0x000000c0, 0xffffffff, 0, INSN2_ALIAS, I33 }, /* sll */