[PATCH] objdump: Don't skip NOPs at labels

Maciej W. Rozycki macro@codesourcery.com
Mon Nov 1 12:30:00 GMT 2010


Hi,

 While trying to determine why a GAS testcase regressed after some changes 
I have discovered that a NOP in a branch or jump delay slot is not 
disassembled by `objdump' if it's got a label assigned and is followed by 
further NOPs that cause the tool to produce "..." instead.  To illustrate:

$ cat label.s
	.set	noreorder
	bal	foo
bar:
	 nop
	nop
	nop
foo:
	nop
	nop
	nop
$ mips-sde-elf-as -32 -o dump.o label.s
$ mips-sde-elf-objdump -dr --prefix-addresses --show-raw-insn dump.o

dump.o:     file format elf32-tradbigmips


Disassembly of section .text:
00000000 <bar-0x4> 0411ffff 	bal	00000000 <bar-0x4>
	...
	...

This happens because code is disassembled in chunks limited by consecutive 
symbols and any trailing delay slot information from the preceding chunk 
is discarded at the beginning of a new chunk.

 While the immediate fix would simply be keeping the delay slot 
information, I have contemplated the current structure of our code a bit 
and come to the conclusion it may actually make sense to disassemble 
instructions at labels unconditionally.  They signify a piece of code 
after all, even if in the middle of a block of NOPs, and then the labels 
wouldn't be lost from output in the prefix-addresses mode this way.  To 
continue with the example, the new output would look as follows:

$ mips-sde-elf-objdump -dr --prefix-addresses --show-raw-insn dump.o

dump.o:     file format elf32-tradbigmips


Disassembly of section .text:
00000000 <bar-0x4> 04110003 	bal	00000010 <foo>
00000004 <bar> 00000000 	nop
	...
00000010 <foo> 00000000 	nop
	...

 An actual implementation follows, including testsuite adjustments as 
necessary.  What do you think?

 I realise this change affects other ports and I have refrained from 
updating the relevant testsuites deliberately to save myself extra effort 
before everyone is happy with my proposal.  I think it will be reasonable 
if I update some of the mainstream platforms once I get a go-ahead with 
this change (assuming that I do, that is) and let the more exotic platform 
maintainers update their ports themselves; this looks like a 2.22 material 
to me, so there'll be plenty of time.

2010-11-01  Maciej W. Rozycki  <macro@codesourcery.com>

binutils/
	* objdump.c (disassemble_bytes): Never skip a NOP at the
	beginning.

gas/testsuite/
	* gas/mips/branch-misc-1.d: Adjust for NOP/... handling changes.
	* gas/mips/branch-misc-1.s: Likewise.
	* gas/mips/branch-misc-2-64.d: Likewise.
	* gas/mips/branch-misc-2.d: Likewise.
	* gas/mips/branch-misc-2pic-64.d: Likewise.
	* gas/mips/branch-misc-2pic.d: Likewise.
	* gas/mips/branch-self.d: Likewise.
	* gas/mips/jalr2.d: Likewise.
	* gas/mips/mips-abi32-pic.d: Likewise.
	* gas/mips/mips-abi32-pic.s: Likewise.
	* gas/mips/mips-abi32-pic2.d: Likewise.
	* gas/mips/mips-abi32-pic2.s: Likewise.
	* gas/mips/mips-abi32.d: Likewise.
	* gas/mips/mips-abi32.s: Likewise.
	* gas/mips/mips-gp32-fp32-pic.d: Likewise.
	* gas/mips/mips-gp32-fp32-pic.s: Likewise.
	* gas/mips/mips-gp32-fp32.d: Likewise.
	* gas/mips/mips-gp32-fp32.s: Likewise.
	* gas/mips/mips-gp32-fp64-pic.d: Likewise.
	* gas/mips/mips-gp32-fp64-pic.s: Likewise.
	* gas/mips/mips-gp32-fp64.d: Likewise.
	* gas/mips/mips-gp32-fp64.s: Likewise.
	* gas/mips/mips-gp64-fp32-pic.d: Likewise.
	* gas/mips/mips-gp64-fp32-pic.s: Likewise.
	* gas/mips/mips-gp64-fp32.d: Likewise.
	* gas/mips/mips-gp64-fp32.s: Likewise.
	* gas/mips/mips-gp64-fp64-pic.d: Likewise.
	* gas/mips/mips-gp64-fp64-pic.s: Likewise.
	* gas/mips/mips-gp64-fp64.d: Likewise.
	* gas/mips/mips-gp64-fp64.s: Likewise.
	* gas/mips/mips16-64.d: Likewise.
	* gas/mips/mips16.d: Likewise.
	* gas/mips/mips16@branch-self.d
	* gas/mips/relax-swap1-mips1.d: Likewise.
	* gas/mips/relax-swap1-mips2.d: Likewise.
	* gas/mips/relax-swap1.s: Likewise.
	* gas/mips/relax-swap2.d: Likewise.
	* gas/mips/relax-swap2.s: Likewise.

ld/testsuite/
	* ld-mips-elf/branch-misc-1.d: Adjust for NOP/... handling
	changes.

  Maciej

binutils-objdump-ds.patch
Index: binutils-fsf-trunk-quilt/binutils/objdump.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/binutils/objdump.c	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/binutils/objdump.c	2010-10-28 20:28:26.000000000 +0100
@@ -1523,8 +1523,8 @@ disassemble_bytes (struct disassemble_in
 	if (data[z] != 0)
 	  break;
       if (! disassemble_zeroes
-	  && (inf->insn_info_valid == 0
-	      || inf->branch_delay_insns == 0)
+	  && (inf->insn_info_valid != 0
+	      && inf->branch_delay_insns == 0)
 	  && (z - addr_offset * opb >= skip_zeroes
 	      || (z == stop_offset * opb &&
 		  z - addr_offset * opb < skip_zeroes_at_end)))
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-1.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/branch-misc-1.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-1.d	2010-10-28 20:28:26.000000000 +0100
@@ -8,8 +8,11 @@
 .*: +file format .*mips.*
 
 Disassembly of section .text:
+0+0000 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0014 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0028 <[^>]*> 00000000 	nop
 	\.\.\.
 0+003c <[^>]*> 0411fff0 	bal	00000000 <l1>
 0+0040 <[^>]*> 00000000 	nop
@@ -24,6 +27,9 @@
 0+0064 <[^>]*> 04110010 	bal	000000a8 <l6>
 0+0068 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0080 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0094 <[^>]*> 00000000 	nop
 	\.\.\.
+0+00a8 <[^>]*> 00000000 	nop
 	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-1.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/branch-misc-1.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-1.s	2010-10-28 20:28:26.000000000 +0100
@@ -24,4 +24,5 @@
 l6:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2-64.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/branch-misc-2-64.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2-64.d	2010-10-28 20:28:26.000000000 +0100
@@ -9,8 +9,11 @@
 .*: +file format .*mips.*
 
 Disassembly of section .text:
+0+0000 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0014 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0028 <[^>]*> 00000000 	nop
 	\.\.\.
 0+003c <[^>]*> 04110000 	bal	0000000000000040 <x\+0x4>
 [ 	]*3c: R_MIPS_PC16	g1\+0xfffffffffffffffc
@@ -43,7 +46,9 @@
 [ 	]*64: R_MIPS_NONE	\*ABS\*\+0xfffffffffffffffc
 0+0068 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0080 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0094 <[^>]*> 00000000 	nop
 	\.\.\.
 0+00a8 <[^>]*> 10000000 	b	00000000000000ac <g6\+0x4>
 [ 	]*a8: R_MIPS_PC16	x1\+0xfffffffffffffffc
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/branch-misc-2.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2.d	2010-10-28 20:28:26.000000000 +0100
@@ -8,8 +8,11 @@
 .*: +file format .*mips.*
 
 Disassembly of section .text:
+0+0000 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0014 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0028 <[^>]*> 00000000 	nop
 	\.\.\.
 0+003c <[^>]*> 0411ffff 	bal	0000003c <x>
 [ 	]*3c: R_MIPS_PC16	g1
@@ -30,7 +33,9 @@
 [ 	]*64: R_MIPS_PC16	g6
 0+0068 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0080 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0094 <[^>]*> 00000000 	nop
 	\.\.\.
 0+00a8 <[^>]*> 1000ffff 	b	000000a8 <g6>
 [ 	]*a8: R_MIPS_PC16	x1
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2pic-64.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/branch-misc-2pic-64.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2pic-64.d	2010-10-28 20:28:26.000000000 +0100
@@ -9,8 +9,11 @@
 .*: +file format .*mips.*
 
 Disassembly of section .text:
+0+0000 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0014 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0028 <[^>]*> 00000000 	nop
 	\.\.\.
 0+003c <[^>]*> 04110000 	bal	0000000000000040 <x\+0x4>
 [ 	]*3c: R_MIPS_PC16	g1\+0xfffffffffffffffc
@@ -43,7 +46,9 @@
 [ 	]*64: R_MIPS_NONE	\*ABS\*\+0xfffffffffffffffc
 0+0068 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0080 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0094 <[^>]*> 00000000 	nop
 	\.\.\.
 0+00a8 <[^>]*> 10000000 	b	00000000000000ac <g6\+0x4>
 [ 	]*a8: R_MIPS_PC16	x1\+0xfffffffffffffffc
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2pic.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/branch-misc-2pic.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/branch-misc-2pic.d	2010-10-28 20:28:26.000000000 +0100
@@ -9,8 +9,11 @@
 .*: +file format .*mips.*
 
 Disassembly of section .text:
+0+0000 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0014 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0028 <[^>]*> 00000000 	nop
 	\.\.\.
 0+003c <[^>]*> 0411ffff 	bal	0000003c <x>
 [ 	]*3c: R_MIPS_PC16	g1
@@ -31,7 +34,9 @@
 [ 	]*64: R_MIPS_PC16	g6
 0+0068 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0080 <[^>]*> 00000000 	nop
 	\.\.\.
+0+0094 <[^>]*> 00000000 	nop
 	\.\.\.
 0+00a8 <[^>]*> 1000ffff 	b	000000a8 <g6>
 [ 	]*a8: R_MIPS_PC16	x1
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/jalr2.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/jalr2.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/jalr2.d	2010-10-28 20:28:26.000000000 +0100
@@ -38,4 +38,5 @@
 .*:	8fbc0010 	lw	gp,16\(sp\)
 
 .* <local>:
+.*:	00000000 	nop
 	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-abi32-pic.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic.d	2010-10-28 20:28:26.000000000 +0100
@@ -96,4 +96,5 @@
  158:	00a02021 	move	a0,a1
 
 0+015c <[^>]*>:
-	...
+ 15c:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-abi32-pic.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic.s	2010-10-28 20:28:26.000000000 +0100
@@ -141,4 +141,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic2.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-abi32-pic2.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic2.d	2010-10-28 20:28:26.000000000 +0100
@@ -71,4 +71,5 @@
 0+0c0 <[^>]*> 3c010001 	lui	at,0x1
 0+0c4 <[^>]*> 003d0821 	addu	at,at,sp
 0+0c8 <[^>]*> 8c3c0000 	lw	gp,0\(at\)
+0+0cc <[^>]*> 00000000 	nop
 	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic2.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-abi32-pic2.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32-pic2.s	2010-10-28 20:28:26.000000000 +0100
@@ -104,4 +104,5 @@
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-abi32.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32.d	2010-10-28 20:28:27.000000000 +0100
@@ -75,4 +75,5 @@
  104:	00a02021 	move	a0,a1
 
 0+0108 <[^>]*>:
-	...
+ 108:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-abi32.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-abi32.s	2010-10-28 20:28:27.000000000 +0100
@@ -97,4 +97,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32-pic.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp32-pic.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32-pic.d	2010-10-28 20:28:27.000000000 +0100
@@ -96,4 +96,5 @@
  158:	00a02021 	move	a0,a1
 
 0+015c <[^>]*>:
-	...
+ 15c:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32-pic.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp32-pic.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32-pic.s	2010-10-28 20:28:27.000000000 +0100
@@ -141,4 +141,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-      .space  8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp32.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32.d	2010-10-28 20:28:27.000000000 +0100
@@ -75,4 +75,5 @@
  104:	00a02021 	move	a0,a1
 
 0+0108 <[^>]*>:
-	...
+ 108:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp32.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp32.s	2010-10-28 20:28:27.000000000 +0100
@@ -97,4 +97,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-      .space  8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64-pic.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp64-pic.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64-pic.d	2010-10-28 20:28:27.000000000 +0100
@@ -97,4 +97,5 @@
  158:	46231040 	add.d	\$f1,\$f2,\$f3
 
 0+015c <[^>]*>:
-	...
+ 15c:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64-pic.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp64-pic.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64-pic.s	2010-10-28 20:28:27.000000000 +0100
@@ -139,4 +139,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp64.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64.d	2010-10-28 20:28:27.000000000 +0100
@@ -75,4 +75,5 @@
  100:	46231040 	add.d	\$f1,\$f2,\$f3
 
 0+0104 <[^>]*>:
-	...
+ 104:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp32-fp64.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp32-fp64.s	2010-10-28 20:28:27.000000000 +0100
@@ -94,4 +94,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32-pic.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp32-pic.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32-pic.d	2010-10-28 20:28:27.000000000 +0100
@@ -128,4 +128,5 @@
  1d4:	00000000 	nop
 
 0+01d8 <[^>]*>:
-	...
+ 1d8:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32-pic.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp32-pic.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32-pic.s	2010-10-28 20:28:27.000000000 +0100
@@ -165,4 +165,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp32.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32.d	2010-10-28 20:28:27.000000000 +0100
@@ -97,4 +97,5 @@
  158:	14200000 	bnez	at,15c <[^>]*>
 
 0+015c <[^>]*>:
-	...
+ 15c:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp32.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp32.s	2010-10-28 20:28:27.000000000 +0100
@@ -108,4 +108,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64-pic.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp64-pic.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64-pic.d	2010-10-28 20:28:27.000000000 +0100
@@ -128,4 +128,5 @@
  1d8:	46231040 	add.d	\$f1,\$f2,\$f3
 
 0+01dc <[^>]*>:
-	...
+ 1dc:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64-pic.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp64-pic.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64-pic.s	2010-10-28 20:28:27.000000000 +0100
@@ -164,4 +164,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp64.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64.d	2010-10-28 20:28:27.000000000 +0100
@@ -98,4 +98,5 @@
  15c:	46231040 	add.d	\$f1,\$f2,\$f3
 
 0+0160 <[^>]*>:
-	...
+ 160:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips-gp64-fp64.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips-gp64-fp64.s	2010-10-28 20:28:27.000000000 +0100
@@ -106,4 +106,5 @@ shared:	.word	11
 end:
 
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-	.space	8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-64.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips16-64.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16-64.d	2010-10-28 20:28:27.000000000 +0100
@@ -683,4 +683,5 @@
  866:	6500      	nop
 
 0+000868 <bar>:
-	...
+ 868:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/mips16.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/mips16.d	2010-10-28 20:28:27.000000000 +0100
@@ -680,4 +680,5 @@
  866:	6500      	nop
 
 0+000868 <bar>:
-	...
+ 868:	00000000 	nop
+	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap1-mips1.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/relax-swap1-mips1.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap1-mips1.d	2010-10-28 20:28:27.000000000 +0100
@@ -306,4 +306,5 @@
 0+03d8 <[^>]*> jalr	v0,v1
 0+03dc <[^>]*> nop
 	\.\.\.
+0+203e0 <[^>]*> nop
 	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap1-mips2.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/relax-swap1-mips2.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap1-mips2.d	2010-10-28 20:28:27.000000000 +0100
@@ -273,4 +273,5 @@
 0+0354 <[^>]*> jalr	v0,v1
 0+0358 <[^>]*> nop
 	\.\.\.
+0+2035c <[^>]*> nop
 	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap1.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/relax-swap1.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap1.s	2010-10-28 20:28:27.000000000 +0100
@@ -147,5 +147,7 @@
 
         .space  0x20000         # to make a 128kb loop body
 bar:
+
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-        .space  8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap2.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/relax-swap2.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap2.d	2010-10-28 20:28:27.000000000 +0100
@@ -132,4 +132,5 @@
 0+01a0 <[^>]*> jr	at
 0+01a4 <[^>]*> nop
 	\.\.\.
+0+201a8 <[^>]*> nop
 	\.\.\.
Index: binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap2.s
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/testsuite/gas/mips/relax-swap2.s	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/gas/testsuite/gas/mips/relax-swap2.s	2010-10-28 20:28:27.000000000 +0100
@@ -46,5 +46,7 @@
 
         .space  0x20000         # to make a 128kb loop body
 bar:
+
 # Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
-        .space  8
+	.align	2
+	.space	12
Index: binutils-fsf-trunk-quilt/ld/testsuite/ld-mips-elf/branch-misc-1.d
===================================================================
--- binutils-fsf-trunk-quilt.orig/ld/testsuite/ld-mips-elf/branch-misc-1.d	2010-10-28 20:01:43.000000000 +0100
+++ binutils-fsf-trunk-quilt/ld/testsuite/ld-mips-elf/branch-misc-1.d	2010-10-28 20:28:28.000000000 +0100
@@ -8,8 +8,11 @@
 #...
 
 Disassembly of section \.text:
+0*20000000 <[^>]*> 00000000 	nop
 	\.\.\.
+0*20000014 <[^>]*> 00000000 	nop
 	\.\.\.
+0*20000028 <[^>]*> 00000000 	nop
 	\.\.\.
 0*2000003c <[^>]*> 0411fff0 	bal	0*20000000 <[^>]*>
 0*20000040 <[^>]*> 00000000 	nop
@@ -24,7 +27,10 @@
 0*20000064 <[^>]*> 04110010 	bal	0*200000a8 <[^>]*>
 0*20000068 <[^>]*> 00000000 	nop
 	\.\.\.
+0*20000080 <[^>]*> 00000000 	nop
 	\.\.\.
+0*20000094 <[^>]*> 00000000 	nop
 	\.\.\.
+0*200000a8 <[^>]*> 00000000 	nop
 	\.\.\.
 #pass



More information about the Binutils mailing list