MIPS: Fix binutils-all tests for r6 triples

Message ID 20231113095458.1066529-1-yunqiang.su@cipunited.com
State Accepted
Headers
Series MIPS: Fix binutils-all tests for r6 triples |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

YunQiang Su Nov. 13, 2023, 9:54 a.m. UTC
  For MIPSr6, MIPS16e is not supported by ISA, and
microMIPS is not support by binutils, and we have
no plan to support it.

Let's add `-march=from-abi` option to
mips16-extend-noinsn.d and mixed-mips16-micromips.d.
---
 binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d   | 1 +
 binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d | 1 +
 2 files changed, 2 insertions(+)
  

Comments

Nick Clifton Nov. 13, 2023, 4 p.m. UTC | #1
Hi YunQiang Su,

> For MIPSr6, MIPS16e is not supported by ISA, and
> microMIPS is not support by binutils, and we have
> no plan to support it. >
> Let's add `-march=from-abi` option to
> mips16-extend-noinsn.d and mixed-mips16-micromips.d.

Patch approved and applied.

Note  - whilst I was looking at this patch I noticed that the
-march=from-abi option was not included in the assembler documentation
so I have committed an extra patch of my own to remedy this.

Cheers
   Nick

diff --git a/gas/doc/c-mips.texi b/gas/doc/c-mips.texi
index f1eee0ed197..3e072513d37 100644
--- a/gas/doc/c-mips.texi
+++ b/gas/doc/c-mips.texi
@@ -468,6 +468,11 @@ For compatibility reasons, @samp{@var{n}x} and @samp{@var{b}fx} are
  accepted as synonyms for @samp{@var{n}f1_1}.  These values are
  deprecated.

+In addition the special name @samp{from-abi} can be used, in which
+case the assembler will select an architecture suitable for whichever
+ABI has been selected, either via the @option{-mabi=} command line
+option or the built in default.
+
  @item -mtune=@var{cpu}
  Schedule and tune for a particular MIPS CPU.  Valid @var{cpu} values are
  identical to @samp{-march=@var{cpu}}.
  
Maciej W. Rozycki Feb. 20, 2024, 8:56 p.m. UTC | #2
On Mon, 13 Nov 2023, Nick Clifton wrote:

> > For MIPSr6, MIPS16e is not supported by ISA, and
> > microMIPS is not support by binutils, and we have
> > no plan to support it. >
> > Let's add `-march=from-abi` option to
> > mips16-extend-noinsn.d and mixed-mips16-micromips.d.
> 
> Patch approved and applied.

 This narrows coverage to the `from-abi' architectures however (MIPS I and 
MIPS III for o32 and n32/n64 ABIs respectively).  Instead the tests should 
be excluded from R6 verification.

  Maciej
  

Patch

diff --git a/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
index 41bb49e6ac7..e6ceca8f35e 100644
--- a/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
+++ b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
@@ -1,4 +1,5 @@ 
 #PROG: objcopy
+#as: -march=from-abi
 #objdump: -d --prefix-addresses --show-raw-insn
 #name: MIPS16 unsupported EXTEND and undefined opcode disassembly
 
diff --git a/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d b/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d
index 4a53dfb8578..65459d510d3 100644
--- a/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d
+++ b/binutils/testsuite/binutils-all/mips/mixed-mips16-micromips.d
@@ -1,4 +1,5 @@ 
 #PROG: objcopy
+#as: -march=from-abi
 #objdump: -drt
 #name: Mixed MIPS16 and microMIPS disassembly