[v2,1/2] RISC-V: Make .insn tests stricter

Message ID fdcd78c77ec384da0cb74a6d91c1e7f00bdde6cf.1669192210.git.research_trasio@irq.a4lg.com
State Accepted
Headers
Series RISC-V: Better support for long instructions (64 < x <= 176 [bits]) |

Checks

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

Commit Message

Tsukasa OI Nov. 23, 2022, 8:30 a.m. UTC
  From: Tsukasa OI <research_trasio@irq.a4lg.com>

To make sure that all instruction bits are dumped through ".byte", this
commit makes matching patterns stricter (to cover all instruction bits).

gas/ChangeLog:

	* testsuite/gas/riscv/insn.d: Make pattern stricter.
	* testsuite/gas/riscv/insn-na.d: Likewise.
---
 gas/testsuite/gas/riscv/insn-na.d | 20 ++++++++++----------
 gas/testsuite/gas/riscv/insn.d    | 10 +++++-----
 2 files changed, 15 insertions(+), 15 deletions(-)
  

Patch

diff --git a/gas/testsuite/gas/riscv/insn-na.d b/gas/testsuite/gas/riscv/insn-na.d
index 66dce71ebc21..be6c9f9dd66a 100644
--- a/gas/testsuite/gas/riscv/insn-na.d
+++ b/gas/testsuite/gas/riscv/insn-na.d
@@ -61,15 +61,15 @@  Disassembly of section .text:
 [^:]+:[ 	]+022180d7[ 	]+vadd\.vv[ 	]+v1,v2,v3
 [^:]+:[ 	]+0001[ 	]+c\.addi[ 	]+zero,0
 [^:]+:[ 	]+00000013[ 	]+addi[ 	]+zero,zero,0
-[^:]+:[ 	]+001f 0000 0000[ 	].*
-[^:]+:[ 	]+0000003f 00000000[ 	].*
-[^:]+:[ 	]+007f 0000 0000 0000 0000[ 	]+[._a-z].*
-[^:]+:[ 	]+0000107f 00000000 00000000[ 	]+[._a-z].*
-[^:]+:[ 	]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ 	]+[._a-z].*
+[^:]+:[ 	]+001f 0000 0000[ 	]+\.byte[ 	]+0x1f, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+0000003f 00000000[ 	]+\.8byte[ 	]+0x3f
+[^:]+:[ 	]+007f 0000 0000 0000 0000[ 	]+\.byte[ 	]+0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+0000107f 00000000 00000000[ 	]+\.byte[ 	]+0x7f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ 	]+\.byte[ 	]+0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 [^:]+:[ 	]+0001[ 	]+c\.addi[ 	]+zero,0
 [^:]+:[ 	]+00000013[ 	]+addi[ 	]+zero,zero,0
-[^:]+:[ 	]+001f 0000 0000[ 	].*
-[^:]+:[ 	]+0000003f 00000000[ 	].*
-[^:]+:[ 	]+007f 0000 0000 0000 0000[ 	]+[._a-z].*
-[^:]+:[ 	]+0000107f 00000000 00000000[ 	]+[._a-z].*
-[^:]+:[ 	]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ 	]+[._a-z].*
+[^:]+:[ 	]+001f 0000 0000[ 	]+\.byte[ 	]+0x1f, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+0000003f 00000000[ 	]+\.8byte[ 	]+0x3f
+[^:]+:[ 	]+007f 0000 0000 0000 0000[ 	]+\.byte[ 	]+0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+0000107f 00000000 00000000[ 	]+\.byte[ 	]+0x7f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+607f 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000[ 	]+\.byte[ 	]+0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
diff --git a/gas/testsuite/gas/riscv/insn.d b/gas/testsuite/gas/riscv/insn.d
index 2e5d35b39702..cf84f177af39 100644
--- a/gas/testsuite/gas/riscv/insn.d
+++ b/gas/testsuite/gas/riscv/insn.d
@@ -83,12 +83,12 @@  Disassembly of section .text:
 [^:]+:[ 	]+0000 0000 0000 ?
 [^:]+:[ 	]+0001[ 	]+nop
 [^:]+:[ 	]+00000013[ 	]+nop
-[^:]+:[ 	]+001f 0000 0000[ 	].*
-[^:]+:[ 	]+0000003f 00000000[ 	].*
-[^:]+:[ 	]+007f 0000 0000 0000[ 	]+[._a-z].*
+[^:]+:[ 	]+001f 0000 0000[ 	]+\.byte[ 	]+0x1f, 0x00, 0x00, 0x00, 0x00, 0x00
+[^:]+:[ 	]+0000003f 00000000[ 	]+\.8byte[ 	]+0x3f
+[^:]+:[ 	]+007f 0000 0000 0000[ 	]+\.byte[ 	]+0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 [^:]+:[ 	]+0000 ?
-[^:]+:[ 	]+0000107f 00000000[ 	]+[._a-z].*
+[^:]+:[ 	]+0000107f 00000000[ 	]+\.byte[ 	]+0x7f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 [^:]+:[ 	]+00000000 ?
-[^:]+:[ 	]+607f 0000 0000 0000[ 	]+[._a-z].*
+[^:]+:[ 	]+607f 0000 0000 0000[ 	]+\.byte[ 	]+0x7f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 [^:]+:[ 	]+0000 0000 0000 0000 ?
 [^:]+:[ 	]+0000 0000 0000 ?