public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@cygnus.com>
To: hjl@lucon.org
Cc: gas2@cygnus.com
Subject: Re: A binutils 2.9 bug on MIPS
Date: Thu, 16 Apr 1998 09:17:00 -0000	[thread overview]
Message-ID: <199804161609.MAA22723@subrogation.cygnus.com> (raw)
In-Reply-To: <m0yPqm5-00058vC@ocean.lucon.org>

   From: hjl@lucon.org (H.J. Lu)
   Date: Thu, 16 Apr 1998 08:40:29 -0700 (PDT)

   For MIPS/ELF, I got

   # gcc -c x.s
   # objdump -d x.o
   x.o:     file format elf32-bigmips

   No symbols in "x.o".
   Disassembly of section .text:

   0000000000000000 <.text>:
      0:   03a0f021        move    # internal error, undefined modifier(d)$f0# internal error, undefined modifier(s)
	   ...

   Any ideas?

Unfortunately, the opcodes/mips-dis.c file in the binutils 2.9 release
is messed up.  This may be serious enough to warrant a 2.9.1 release.

Ian

Index: mips-dis.c
===================================================================
RCS file: /cvs/cvsfiles/devo/opcodes/mips-dis.c,v
retrieving revision 1.49.2.1
diff -u -r1.49.2.1 mips-dis.c
--- mips-dis.c	1998/03/30 20:46:12	1.49.2.1
+++ mips-dis.c	1998/04/16 16:08:36
@@ -80,6 +80,101 @@
     case ',':
     case '(':
     case ')':
+      (*info->fprintf_func) (info->stream, "%c", *d);
+      break;
+
+    case 's':
+    case 'b':
+    case 'r':
+    case 'v':
+      (*info->fprintf_func) (info->stream, "$%s",
+			     reg_names[(l >> OP_SH_RS) & OP_MASK_RS]);
+      break;
+
+    case 't':
+    case 'w':
+      (*info->fprintf_func) (info->stream, "$%s",
+			     reg_names[(l >> OP_SH_RT) & OP_MASK_RT]);
+      break;
+
+    case 'i':
+    case 'u':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			(l >> OP_SH_IMMEDIATE) & OP_MASK_IMMEDIATE);
+      break;
+
+    case 'j': /* same as i, but sign-extended */
+    case 'o':
+      delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
+      if (delta & 0x8000)
+	delta |= ~0xffff;
+      (*info->fprintf_func) (info->stream, "%d",
+			     delta);
+      break;
+
+    case 'h':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (unsigned int) ((l >> OP_SH_PREFX)
+					     & OP_MASK_PREFX));
+      break;
+
+    case 'k':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (unsigned int) ((l >> OP_SH_CACHE)
+					     & OP_MASK_CACHE));
+      break;
+
+    case 'a':
+      (*info->print_address_func)
+	(((pc & 0xF0000000) | (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2)),
+	 info);
+      break;
+
+    case 'p':
+      /* sign extend the displacement */
+      delta = (l >> OP_SH_DELTA) & OP_MASK_DELTA;
+      if (delta & 0x8000)
+	delta |= ~0xffff;
+      (*info->print_address_func)
+	((delta << 2) + pc + 4,
+	 info);
+      break;
+
+    case 'd':
+      (*info->fprintf_func) (info->stream, "$%s",
+			     reg_names[(l >> OP_SH_RD) & OP_MASK_RD]);
+      break;
+
+    case 'z':
+      (*info->fprintf_func) (info->stream, "$%s", reg_names[0]);
+      break;
+
+    case '<':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_SHAMT) & OP_MASK_SHAMT);
+      break;
+
+    case 'c':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_CODE) & OP_MASK_CODE);
+      break;
+
+    case 'C':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_COPZ) & OP_MASK_COPZ);
+      break;
+
+    case 'B':
+      (*info->fprintf_func) (info->stream, "0x%x",
+			     (l >> OP_SH_SYSCALL) & OP_MASK_SYSCALL);
+      break;
+
+    case 'S':
+    case 'V':
+      (*info->fprintf_func) (info->stream, "$f%d",
+			     (l >> OP_SH_FS) & OP_MASK_FS);
+      break;
+
 
     case 'T':
     case 'W':

  reply	other threads:[~1998-04-16  9:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-16  8:40 H.J. Lu
1998-04-16  9:17 ` Ian Lance Taylor [this message]
1998-04-16  9:17   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199804161609.MAA22723@subrogation.cygnus.com \
    --to=ian@cygnus.com \
    --cc=gas2@cygnus.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).