[m68k]: patch to fix objdump/MAC/EMAC for ColdFire
Nick Clifton
nickc@redhat.com
Wed May 19 10:52:00 GMT 2004
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
More information about the Binutils
mailing list