This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] [MIPS] Loongson EXT fixes
- From: Paul Hua <paul dot hua dot gm at gmail dot com>
- To: Jiaxun Yang <jiaxun dot yang at flygoat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 6 Feb 2020 14:44:50 +0800
- Subject: Re: [PATCH] [MIPS] Loongson EXT fixes
- References: <20200205124137.188485-1-jiaxun.yang@flygoat.com>
> +++ b/gas/doc/as.texi
> @@ -1644,7 +1644,7 @@ This tells the assembler to accept Loongson EXT instructions.
> @item -mloongson-ext2
> @itemx -mno-loongson-ext2
> Generate code for the Loongson EXTensions R2 (EXT2) instructions.
> -This option implies @samp{-mloongson-ext}.
> +This option implies @samp{-mloongson-ext2}.
> This tells the assembler to accept Loongson EXT2 instructions.
> @samp{-mno-loongson-ext2} turns off this option.
>
It is ok, the -mloongson-ext2 will trun on -mloongson-ext.
> diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
> index 755bbe294b..18dde79294 100644
> --- a/opcodes/mips-dis.c
> +++ b/opcodes/mips-dis.c
> @@ -824,6 +824,14 @@ mips_convert_abiflags_ases (unsigned long afl_ases)
> opcode_ases |= ASE_DSPR3;
> if (afl_ases & AFL_ASE_MIPS16E2)
> opcode_ases |= ASE_MIPS16E2;
> + if (afl_ases & AFL_ASE_LOONGSON_MMI)
> + opcode_ases |= ASE_LOONGSON_MMI;
> + if (afl_ases & AFL_ASE_LOONGSON_CAM)
> + opcode_ases |= ASE_LOONGSON_CAM;
> + if (afl_ases & AFL_ASE_LOONGSON_EXT)
> + opcode_ases |= ASE_LOONGSON_EXT;
> + if (afl_ases & AFL_ASE_LOONGSON_EXT2)
> + opcode_ases |= ASE_LOONGSON_EXT2;
> return opcode_ases;
> }
Thanks for catch this.
> diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
> index 5270aeefa8..625b745edc 100644
> --- a/opcodes/mips-opc.c
> +++ b/opcodes/mips-opc.c
> @@ -526,6 +526,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
> {"ctz", "d,s", 0x70000022, 0xfc1f07ff, WR_1|RD_2, 0, 0, LEXT2, 0 },
> {"dcto", "d,s", 0x700000e2, 0xfc1f07ff, WR_1|RD_2, 0, 0, LEXT2, 0 },
> {"dctz", "d,s", 0x700000a2, 0xfc1f07ff, WR_1|RD_2, 0, 0, LEXT2, 0 },
> +{"gsandn", "d,s,t", 0x70000483, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, LEXT2, 0 },
> +{"gsorn", "d,s,t", 0x70000486, 0xfc0007ff, WR_1|RD_2|RD_3, 0, 0, LEXT2, 0 },
>
The gsandn and gsorn belong to upcomming loongson-ext3.