From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor 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 Message-id: <199804161609.MAA22723@subrogation.cygnus.com> References: X-SW-Source: 1998/msg00136.html 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':