public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* A binutils 2.9 bug on MIPS
@ 1998-04-16  8:40 H.J. Lu
  1998-04-16  9:17 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 1998-04-16  8:40 UTC (permalink / raw)
  To: gas2

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?

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
---x.s--
	move	$fp,$sp

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A binutils 2.9 bug on MIPS
  1998-04-16  9:17 ` Ian Lance Taylor
@ 1998-04-16  9:17   ` H.J. Lu
  0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 1998-04-16  9:17 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gas2

> 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.
> 

Thanks for the patch.

If there is a 2.9.1, I do have a few patches. Please give me a few days
to test them first.


H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: A binutils 2.9 bug on MIPS
  1998-04-16  8:40 A binutils 2.9 bug on MIPS H.J. Lu
@ 1998-04-16  9:17 ` Ian Lance Taylor
  1998-04-16  9:17   ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 1998-04-16  9:17 UTC (permalink / raw)
  To: hjl; +Cc: gas2

   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':

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-04-16  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-16  8:40 A binutils 2.9 bug on MIPS H.J. Lu
1998-04-16  9:17 ` Ian Lance Taylor
1998-04-16  9:17   ` H.J. Lu

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).