This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: MIPS 4300 problems.


Hi!

Ok, I somehow figured out the problem. However, I also got the newest
binutils-2.9 version and I found some serious mistakes. It compiles 
fine, but 'objdump' is not disassembling the code at all. Somehow,
someone deleted an important part of mips-dis.c and I've installed 
this fix:

--- mips-dis.c~	Tue Apr  7 12:48:56 1998
+++ mips-dis.c	Thu Apr 16 20:52:17 1998
@@ -80,6 +80,100 @@
     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':

Now, I don't know where to send this; but if anyone else have problems
with 
MIPS, then it's for you.

PKE.

Jim Wilson wrote:
> 
>         I tried to compile a cross linux- MIPS 4300 compiler, but it seems like
>         the assembler has problems parsing the cvt.d.w and cvt.w.d assembly
>         floating point mnemonics.
> 
> Looking at the binutils-2.8 release, the instructions are clearly present in
> the opcodes/mips-opc.c file.
> 
> Jim


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