aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-02 15:53:43 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-12-05 10:05:45 +0000
commit2438b771ee07be19d5b01ea55e077dd8b7cef445 (patch)
treee101b74fec42b0e6a71dde75130cf351af01996d /binutils
parent47afa56ee2bba22111df848ebeeec8c0a616ae73 (diff)
downloadgdb-2438b771ee07be19d5b01ea55e077dd8b7cef445.zip
gdb-2438b771ee07be19d5b01ea55e077dd8b7cef445.tar.gz
gdb-2438b771ee07be19d5b01ea55e077dd8b7cef445.tar.bz2
opcodes/mips: use .word/.short for undefined instructions
While working on disassembler styling for MIPS, I noticed that undefined instructions are printed by the disassembler as raw number with no assembler directive prefix (e.g. without .word or .short). I think adding something like .word, or .short, helps to make it clearer the size of the value that is being displayed, and is inline with what many of the other libopcode disassemblers do. In this commit I've added the .word and .short directives, and updated all the tests that I spotted that failed as a result.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-ase-1.d2
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-xpa-virt-1.d4
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-xpa-virt-2.d4
-rw-r--r--binutils/testsuite/binutils-all/mips/mips-xpa-virt-3.d2
-rw-r--r--binutils/testsuite/binutils-all/mips/mips1-branch-alias.d4
-rw-r--r--binutils/testsuite/binutils-all/mips/mips1-branch-noalias.d4
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d24
-rw-r--r--binutils/testsuite/binutils-all/mips/mips16-pcrel.d16
-rw-r--r--binutils/testsuite/binutils-all/mips/mips32r6-branch-alias.d4
-rw-r--r--binutils/testsuite/binutils-all/mips/mips32r6-branch-noalias.d4
10 files changed, 34 insertions, 34 deletions
diff --git a/binutils/testsuite/binutils-all/mips/mips-ase-1.d b/binutils/testsuite/binutils-all/mips/mips-ase-1.d
index cfcefdd..8d9a1a8 100644
--- a/binutils/testsuite/binutils-all/mips/mips-ase-1.d
+++ b/binutils/testsuite/binutils-all/mips/mips-ase-1.d
@@ -22,7 +22,7 @@ FLAGS 1: .*
FLAGS 2: .*
Disassembly of section \.text:
-[0-9a-f]+ <[^>]*> 7aa2080b 0x7aa2080b
+[0-9a-f]+ <[^>]*> 7aa2080b .word 0x7aa2080b
[0-9a-f]+ <[^>]*> 46c520c0 add\.ps \$f3,\$f4,\$f5
[0-9a-f]+ <[^>]*> 46c83998 addr\.ps \$f6,\$f7,\$f8
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips-xpa-virt-1.d b/binutils/testsuite/binutils-all/mips/mips-xpa-virt-1.d
index 1fe1c2f..228a9bd 100644
--- a/binutils/testsuite/binutils-all/mips/mips-xpa-virt-1.d
+++ b/binutils/testsuite/binutils-all/mips/mips-xpa-virt-1.d
@@ -8,6 +8,6 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 40020800 mfc0 v0,c0_random
[0-9a-f]+ <[^>]*> 40420800 cfc0 v0,\$1
-[0-9a-f]+ <[^>]*> 40620800 0x40620800
-[0-9a-f]+ <[^>]*> 40620c00 0x40620c00
+[0-9a-f]+ <[^>]*> 40620800 .word 0x40620800
+[0-9a-f]+ <[^>]*> 40620c00 .word 0x40620c00
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips-xpa-virt-2.d b/binutils/testsuite/binutils-all/mips/mips-xpa-virt-2.d
index 2be4c8a..b254a29 100644
--- a/binutils/testsuite/binutils-all/mips/mips-xpa-virt-2.d
+++ b/binutils/testsuite/binutils-all/mips/mips-xpa-virt-2.d
@@ -8,6 +8,6 @@
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 40020800 mfc0 v0,c0_random
[0-9a-f]+ <[^>]*> 40420800 mfhc0 v0,c0_random
-[0-9a-f]+ <[^>]*> 40620800 0x40620800
-[0-9a-f]+ <[^>]*> 40620c00 0x40620c00
+[0-9a-f]+ <[^>]*> 40620800 .word 0x40620800
+[0-9a-f]+ <[^>]*> 40620c00 .word 0x40620c00
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips-xpa-virt-3.d b/binutils/testsuite/binutils-all/mips/mips-xpa-virt-3.d
index cc4b34c..20c8635 100644
--- a/binutils/testsuite/binutils-all/mips/mips-xpa-virt-3.d
+++ b/binutils/testsuite/binutils-all/mips/mips-xpa-virt-3.d
@@ -9,5 +9,5 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 40020800 mfc0 v0,c0_random
[0-9a-f]+ <[^>]*> 40420800 cfc0 v0,\$1
[0-9a-f]+ <[^>]*> 40620800 mfgc0 v0,c0_random
-[0-9a-f]+ <[^>]*> 40620c00 0x40620c00
+[0-9a-f]+ <[^>]*> 40620c00 .word 0x40620c00
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips1-branch-alias.d b/binutils/testsuite/binutils-all/mips/mips1-branch-alias.d
index 467775f..1e6305c 100644
--- a/binutils/testsuite/binutils-all/mips/mips1-branch-alias.d
+++ b/binutils/testsuite/binutils-all/mips/mips1-branch-alias.d
@@ -12,6 +12,6 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 04100000 bltzal zero,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 10200000 beqz at,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 14200000 bnez at,[0-9a-f]+ <[^>]*>
-[0-9a-f]+ <[^>]*> 50200000 0x50200000
-[0-9a-f]+ <[^>]*> 54200000 0x54200000
+[0-9a-f]+ <[^>]*> 50200000 .word 0x50200000
+[0-9a-f]+ <[^>]*> 54200000 .word 0x54200000
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips1-branch-noalias.d b/binutils/testsuite/binutils-all/mips/mips1-branch-noalias.d
index b3fa8a0..6cc62e6 100644
--- a/binutils/testsuite/binutils-all/mips/mips1-branch-noalias.d
+++ b/binutils/testsuite/binutils-all/mips/mips1-branch-noalias.d
@@ -12,6 +12,6 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 04100000 bltzal zero,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 10200000 beq at,zero,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 14200000 bne at,zero,[0-9a-f]+ <[^>]*>
-[0-9a-f]+ <[^>]*> 50200000 0x50200000
-[0-9a-f]+ <[^>]*> 54200000 0x54200000
+[0-9a-f]+ <[^>]*> 50200000 .word 0x50200000
+[0-9a-f]+ <[^>]*> 54200000 .word 0x54200000
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
index 5200efe..41bb49e 100644
--- a/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
+++ b/binutils/testsuite/binutils-all/mips/mips16-extend-noinsn.d
@@ -17,22 +17,22 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 1c00 0000 jalx 00000000 <foo>
[0-9a-f]+ <[^>]*> 6500 nop
[0-9a-f]+ <[^>]*> f123 extend 0x123
-[0-9a-f]+ <[^>]*> 6621 0x6621
+[0-9a-f]+ <[^>]*> 6621 .short 0x6621
[0-9a-f]+ <[^>]*> f456 extend 0x456
-[0-9a-f]+ <[^>]*> e935 0xe935
+[0-9a-f]+ <[^>]*> e935 .short 0xe935
[0-9a-f]+ <[^>]*> f765 extend 0x765
-[0-9a-f]+ <[^>]*> ea60 0xea60
+[0-9a-f]+ <[^>]*> ea60 .short 0xea60
[0-9a-f]+ <[^>]*> f432 extend 0x432
-[0-9a-f]+ <[^>]*> ece0 0xece0
+[0-9a-f]+ <[^>]*> ece0 .short 0xece0
[0-9a-f]+ <[^>]*> f5aa extend 0x5aa
-[0-9a-f]+ <[^>]*> e971 0xe971
+[0-9a-f]+ <[^>]*> e971 .short 0xe971
[0-9a-f]+ <[^>]*> f655 extend 0x655
-[0-9a-f]+ <[^>]*> ebf1 0xebf1
-[0-9a-f]+ <[^>]*> 6621 0x6621
-[0-9a-f]+ <[^>]*> e935 0xe935
-[0-9a-f]+ <[^>]*> ea60 0xea60
-[0-9a-f]+ <[^>]*> ece0 0xece0
-[0-9a-f]+ <[^>]*> e971 0xe971
-[0-9a-f]+ <[^>]*> ebf1 0xebf1
+[0-9a-f]+ <[^>]*> ebf1 .short 0xebf1
+[0-9a-f]+ <[^>]*> 6621 .short 0x6621
+[0-9a-f]+ <[^>]*> e935 .short 0xe935
+[0-9a-f]+ <[^>]*> ea60 .short 0xea60
+[0-9a-f]+ <[^>]*> ece0 .short 0xece0
+[0-9a-f]+ <[^>]*> e971 .short 0xe971
+[0-9a-f]+ <[^>]*> ebf1 .short 0xebf1
[0-9a-f]+ <[^>]*> 6500 nop
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips16-pcrel.d b/binutils/testsuite/binutils-all/mips/mips16-pcrel.d
index 9ce5cb3..898f2f5 100644
--- a/binutils/testsuite/binutils-all/mips/mips16-pcrel.d
+++ b/binutils/testsuite/binutils-all/mips/mips16-pcrel.d
@@ -108,21 +108,21 @@ Disassembly of section \.text:
00005020 <[^>]*> fcbf ld a1,00005110 <foo5\+0x110>
\.\.\.
00006000 <[^>]*> 6500 nop
-00006002 <[^>]*> e860 0xe860
+00006002 <[^>]*> e860 .short 0xe860
00006004 <[^>]*> 0aff la v0,00006400 <foo6\+0x400>
00006006 <[^>]*> 6500 nop
00006008 <[^>]*> 6500 nop
-0000600a <[^>]*> e860 0xe860
+0000600a <[^>]*> e860 .short 0xe860
0000600c <[^>]*> b3ff lw v1,00006408 <foo6\+0x408>
0000600e <[^>]*> 6500 nop
00006010 <[^>]*> 6500 nop
-00006012 <[^>]*> e860 0xe860
+00006012 <[^>]*> e860 .short 0xe860
00006014 <[^>]*> fe9f dla a0,00006090 <foo6\+0x90>
00006016 <[^>]*> 6500 nop
00006018 <[^>]*> 6500 nop
0000601a <[^>]*> 6500 nop
0000601c <[^>]*> 6500 nop
-0000601e <[^>]*> e860 0xe860
+0000601e <[^>]*> e860 .short 0xe860
00006020 <[^>]*> fcbf ld a1,00006118 <foo6\+0x118>
\.\.\.
00007000 <[^>]*> 6500 nop
@@ -180,20 +180,20 @@ Disassembly of section \.text:
00009020 <[^>]*> fcbf ld a1,00009118 <foo9\+0x118>
\.\.\.
0000a000 <[^>]*> 6500 nop
-0000a002 <[^>]*> e960 0xe960
+0000a002 <[^>]*> e960 .short 0xe960
0000a004 <[^>]*> 0aff la v0,0000a400 <fooa\+0x400>
0000a006 <[^>]*> 6500 nop
0000a008 <[^>]*> 6500 nop
-0000a00a <[^>]*> e960 0xe960
+0000a00a <[^>]*> e960 .short 0xe960
0000a00c <[^>]*> b3ff lw v1,0000a408 <fooa\+0x408>
0000a00e <[^>]*> 6500 nop
0000a010 <[^>]*> 6500 nop
-0000a012 <[^>]*> e960 0xe960
+0000a012 <[^>]*> e960 .short 0xe960
0000a014 <[^>]*> fe9f dla a0,0000a090 <fooa\+0x90>
0000a016 <[^>]*> 6500 nop
0000a018 <[^>]*> 6500 nop
0000a01a <[^>]*> 6500 nop
0000a01c <[^>]*> 6500 nop
-0000a01e <[^>]*> e960 0xe960
+0000a01e <[^>]*> e960 .short 0xe960
0000a020 <[^>]*> fcbf ld a1,0000a118 <fooa\+0x118>
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips32r6-branch-alias.d b/binutils/testsuite/binutils-all/mips/mips32r6-branch-alias.d
index aebbb26..002cdf8 100644
--- a/binutils/testsuite/binutils-all/mips/mips32r6-branch-alias.d
+++ b/binutils/testsuite/binutils-all/mips/mips32r6-branch-alias.d
@@ -12,6 +12,6 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 04100000 nal
[0-9a-f]+ <[^>]*> 10200000 beqz at,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 14200000 bnez at,[0-9a-f]+ <[^>]*>
-[0-9a-f]+ <[^>]*> 50200000 0x50200000
-[0-9a-f]+ <[^>]*> 54200000 0x54200000
+[0-9a-f]+ <[^>]*> 50200000 .word 0x50200000
+[0-9a-f]+ <[^>]*> 54200000 .word 0x54200000
\.\.\.
diff --git a/binutils/testsuite/binutils-all/mips/mips32r6-branch-noalias.d b/binutils/testsuite/binutils-all/mips/mips32r6-branch-noalias.d
index d7d512f..b219b01 100644
--- a/binutils/testsuite/binutils-all/mips/mips32r6-branch-noalias.d
+++ b/binutils/testsuite/binutils-all/mips/mips32r6-branch-noalias.d
@@ -12,6 +12,6 @@ Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 04100000 nal
[0-9a-f]+ <[^>]*> 10200000 beq at,zero,[0-9a-f]+ <[^>]*>
[0-9a-f]+ <[^>]*> 14200000 bne at,zero,[0-9a-f]+ <[^>]*>
-[0-9a-f]+ <[^>]*> 50200000 0x50200000
-[0-9a-f]+ <[^>]*> 54200000 0x54200000
+[0-9a-f]+ <[^>]*> 50200000 .word 0x50200000
+[0-9a-f]+ <[^>]*> 54200000 .word 0x54200000
\.\.\.