]> Git Repo - binutils.git/blobdiff - opcodes/ppc-dis.c
Fix typo
[binutils.git] / opcodes / ppc-dis.c
index 19b16ef01e0f6c59a76b3bb14209bb89a9b04623..70716ea24715baec9dd6647b601f605076a68b23 100644 (file)
@@ -16,7 +16,7 @@ the GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this file; see the file COPYING.  If not, write to the Free
-Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <stdio.h>
 #include "ansidecl.h"
@@ -33,24 +33,28 @@ Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
                                       int bigendian, int dialect));
 
-/* Print a big endian PowerPC instruction.  */
+/* Print a big endian PowerPC instruction.  For convenience, also
+   disassemble instructions supported by the Motorola PowerPC 601.  */
 
 int
 print_insn_big_powerpc (memaddr, info)
      bfd_vma memaddr;
      struct disassemble_info *info;
 {
-  return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_PPC);
+  return print_insn_powerpc (memaddr, info, 1,
+                            PPC_OPCODE_PPC | PPC_OPCODE_601);
 }
 
-/* Print a little endian PowerPC instruction.  */
+/* Print a little endian PowerPC instruction.  For convenience, also
+   disassemble instructions supported by the Motorola PowerPC 601.  */
 
 int
 print_insn_little_powerpc (memaddr, info)
      bfd_vma memaddr;
      struct disassemble_info *info;
 {
-  return print_insn_powerpc (memaddr, info, 0, PPC_OPCODE_PPC);
+  return print_insn_powerpc (memaddr, info, 0,
+                            PPC_OPCODE_PPC | PPC_OPCODE_601);
 }
 
 /* Print a POWER (RS/6000) instruction.  */
@@ -155,7 +159,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
          else
            {
              value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
-             if (operand->signedp
+             if ((operand->flags & PPC_OPERAND_SIGNED) != 0
                  && (value & (1 << (operand->bits - 1))) != 0)
                value -= 1 << operand->bits;
            }
@@ -228,7 +232,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
     }
 
   /* We could not find a match.  */
-  (*info->fprintf_func) (info->stream, "0x%lx", insn);
+  (*info->fprintf_func) (info->stream, ".long 0x%lx", insn);
 
   return 4;
 }
This page took 0.025348 seconds and 4 git commands to generate.