This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: opcodes port
- From: Ben Elliston <bje at redhat dot com>
- To: cgen at sources dot redhat dot com
- Date: 02 Jan 2003 12:43:14 +1100
- Subject: Re: opcodes port
- Organization: Red Hat Asia-Pacific Pty Ltd
- References: <200212311611.15926.dfcarney@net-itech.com>
Hi David,
>>>>> "David" == David Carney <dfcarney@net-itech.com> writes:
David> I'm following the instructions in section 5.5 of the cgen
David> manual regarding an opcodes port and have a couple questions:
David> i) step 7. says to repeat steps 4, 5, and 6 until the output
David> looks reasonable. What is the definition of "reasonable"
David> output?
This comment made more sense in the early days of CGEN development. I
would not pay too much attention to it now. If you are happy with
your .cpu input file, then you should deem that the output "looks
reasonable". ;-)
David> ii) how do I get Guile to actually output and write the
David> generated files to disk? I.e. when I run (cgen-desc.h) I get
David> a nice header file listing, but it's not saved anywhere.
David> Should I just cut-and-paste, or is there some Guile/scheme
David> command to redirect output? I'm assuming that the makefiles
David> in binutils are responsible for running cgen and generating
David> the appropriate files, but I'm unclear as to how to configure
David> them to point to the directory in which I have cgen installed
David> and, furthermore, how to actually have the makefile
David> autogenerate the files for my new architecture...
Just mimic one of the existing ports in opcodes/Makefile.am. Take
fr30 as an example; search through Makefile.am for all occurrences of
`fr30' and follow in a near-identical fashion.
One that is done, run `automake' in the opcodes source tree. Then
configure an opcodes build directory:
$ mkdir build && cd build
$ /path/to/src/opcodes/configure
$ make stamp-foo
(where `foo' is your target architecture).
David> iv) and because my understanding of binutils is rather
David> vague... what will running make dep in /opcodes actually
David> produce for me? what do I need to do with the resultant
David> files?
make dep will update the dependencies in Makefile.am, I believe.
David> Overall, I'm getting a handle on how to write a .cpu file,
David> but I'm still virtually clueless when it comes to using it in
David> conjunction with binutils to produce an assembler...
Understandable! :)
Hope this helps,
Ben