This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] PowerPC objdump -Mraw


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0067be51e9436c5bbd961a4f54c10dbd50c491ea

commit 0067be51e9436c5bbd961a4f54c10dbd50c491ea
Author: Alan Modra <amodra@gmail.com>
Date:   Sat May 11 09:42:00 2019 +0930

    PowerPC objdump -Mraw
    
    	* ppc-dis.c (print_insn_powerpc) Don't skip optional operands
    	when -Mraw is in effect.

Diff:
---
 opcodes/ChangeLog | 5 +++++
 opcodes/ppc-dis.c | 8 +++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 331932c..aa78ea9 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2019-05-11  Alan Modra  <amodra@gmail.com>
+
+	* ppc-dis.c (print_insn_powerpc) Don't skip optional operands
+	when -Mraw is in effect.
+
 2019-05-09  Matthew Malcomson  <matthew.malcomson@arm.com>
 
 	* aarch64-dis-2.c: Regenerate.
diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index d9ae42a..e9e3b36 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -749,9 +749,11 @@ print_insn_powerpc (bfd_vma memaddr,
 
 	  operand = powerpc_operands + *opindex;
 
-	  /* If all of the optional operands have the value zero,
-	     then don't print any of them.  */
-	  if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0)
+	  /* If all of the optional operands past this one have their
+	     default value, then don't print any of them.  Except in
+	     raw mode, print them all.  */
+	  if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
+	      && (dialect & PPC_OPCODE_RAW) == 0)
 	    {
 	      if (!skip_optional)
 		skip_optional = skip_optional_operands (opindex, insn, dialect);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]