How can I make tc-cpu.c/h file?
Paul Brook
paul@codesourcery.com
Tue Dec 9 11:39:00 GMT 2003
(Sorry if you get this twice, the first one got eaten by the spam blocker).
On Tuesday 09 December 2003 11:17 am, JongHee Youn[윤종희] wrote:
> Hi,
>
> Thanks for your tip, and I understand the meaning of md_begin(),
> md_assemble().
>
> But I can't find the functions, parse_insn() and parse_operand().
>
> Where are this functions? (My target cpu is similar to 'mips', and also
> tc-arm.c hasn't that functions...)
They are called from md_assemble, and only used within the arch-specific
file. See tc-i386.c for one that does. tc-arm.c does things slightly
differently. It does a hash lookup on the insn name instead of calling a
parse_insn(). The data for each insn then contains a callback function
specifying how to parse the operands. ie. there are selerate parse_operand
routines (named do_*) for each different class of insn.
I'm not sure about mips, but it looks like it may do something similar to
arm.
Paul
More information about the Binutils
mailing list