[PATCH v1] Add Loongson2F specific NOP instruction
Wu Zhangjin
wuzhangjin@gmail.com
Fri Nov 13 09:45:00 GMT 2009
I'm sorry, "addu v0,zero,v0" may make kernel hang at "ld a0,0(v0)",
I need to change it be something else.
Regards,
Wu Zhangjin
On Fri, 2009-11-13 at 17:02 +0800, Wu Zhangjin wrote:
> 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 */
More information about the Binutils
mailing list