X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=opcodes%2Fdlx-dis.c;h=aca9db45d9645b75f7e8a2cebd7f6993a48440d1;hb=c3d399e712774f8c8e4cd6b6a5bb8230c42bc760;hp=1eb2576a3fe41c03e1d491a13ffe3a7d61c0c433;hpb=9b201bb5e5daa9b4f783e6ece9cbfbdbf9f1d6f4;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/dlx-dis.c b/opcodes/dlx-dis.c index 1eb2576a3f..aca9db45d9 100644 --- a/opcodes/dlx-dis.c +++ b/opcodes/dlx-dis.c @@ -1,5 +1,5 @@ /* Instruction printing code for the DLX Microprocessor - Copyright 2002, 2005, 2007 Free Software Foundation, Inc. + Copyright 2002, 2005, 2007, 2010 Free Software Foundation, Inc. Contributed by Kuang Hwa Lin. Written by Kuang Hwa Lin, 03/2002. This file is part of the GNU opcodes library. @@ -437,19 +437,18 @@ print_insn_dlx (bfd_vma memaddr, struct disassemble_info* info) bfd_byte buffer[4]; int insn_idx; unsigned long insn_word; - unsigned char rtn_code; - unsigned long dlx_insn_type[] = + dlx_insn dlx_insn_type[] = { - (unsigned long) dlx_r_type, - (unsigned long) dlx_load_type, - (unsigned long) dlx_store_type, - (unsigned long) dlx_aluI_type, - (unsigned long) dlx_br_type, - (unsigned long) dlx_jmp_type, - (unsigned long) dlx_jr_type, - (unsigned long) NULL + dlx_r_type, + dlx_load_type, + dlx_store_type, + dlx_aluI_type, + dlx_br_type, + dlx_jmp_type, + dlx_jr_type, + (dlx_insn) NULL }; - int dlx_insn_type_num = ((sizeof dlx_insn_type) / (sizeof (unsigned long))) - 1; + int dlx_insn_type_num = ((sizeof dlx_insn_type) / (sizeof (dlx_insn))) - 1; int status = (*info->read_memory_func) (memaddr, (bfd_byte *) &buffer[0], 4, info); @@ -481,11 +480,10 @@ print_insn_dlx (bfd_vma memaddr, struct disassemble_info* info) #endif /* Scan through all the insn type and print the insn out. */ - rtn_code = 0; current_insn_addr = (unsigned long) memaddr; for (insn_idx = 0; dlx_insn_type[insn_idx] != 0x0; insn_idx++) - switch (((dlx_insn) (dlx_insn_type[insn_idx])) (info)) + switch ((dlx_insn_type[insn_idx]) (info)) { /* Found the correct opcode */ case R_TYPE: