This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [m68k]: patch to fix objdump/MAC/EMAC for ColdFire


Hi Peter,

Here's a patch to fix the objdump problem for ColdFire.  In the
process of testing it, I found that I had made mistakes in my previous
patch, including the testfiles.  I've tested this by doing a cycle of
assembling/disassembling a file, using the output of the disassembler
as the input for the second pass, and diffing the resulting
disassembler output.  I also checked over a large portion of hte
testcases just to be sure.

This is basically OK, but there are a few minor points:


* You are still using K&R style function prototypes and headers. We are using ISO C now, so it would be good if you could use their, more compact, style.

* Do you really need to use the "register" keyword ? Any modern compiler is going to produce good code with or without this keyword being present, so I tend to regard it as noise in the sources. [This is an optional change. I just bugs me that's all].

* The code to work out the fixed length portion of an instruction in match_insn_m68k() rings alarm bells to me. Having special heuristics here is just going to lead to trouble in the long run. (eg if new instructions are added which need more special case handling). A much cleaner approach would be to include this information as a new field in the m68k_opcode structure and then statically initialise it in m68k_opc.c.

Cheers
  Nick


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