public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* opcodes port
@ 2002-12-31 13:11 David Carney
  2003-01-02  1:43 ` Ben Elliston
  0 siblings, 1 reply; 2+ messages in thread
From: David Carney @ 2002-12-31 13:11 UTC (permalink / raw)
  To: cgen

I'm following the instructions in section 5.5 of the cgen manual regarding an 
opcodes port and have a couple questions:

i) step 7. says to repeat steps 4, 5, and 6 until the output looks reasonable.  
What is the definition of "reasonable" output?

ii) how do I get Guile to actually output and write the generated files to 
disk?  I.e. when I run (cgen-desc.h) I get a nice header file listing, but 
it's not saved anywhere.  Should I just cut-and-paste, or is there some 
Guile/scheme command to redirect output?  I'm assuming that the makefiles in 
binutils are responsible for running cgen and generating the appropriate 
files, but I'm unclear as to how to configure them to point to the directory 
in which I have cgen installed and, furthermore, how to actually have the 
makefile autogenerate the files for my new architecture...

iii) the opcode-port directions say nothing about how to configure binutils.  
Simply going to a "clean" opcodes directory and editing Makefile.am is 
clearly not enough to allow you to run a successful 'make dep' (as no 
makefile actually exists until 'configure' is run from the parent directory).  
Doesn't the configure script need to be modified also?  What about 
Makefile.in?

iv) and because my understanding of binutils is rather vague...  what will 
running make dep in /opcodes actually produce for me?  what do I need to do 
with the resultant files?

Overall, I'm getting a handle on how to write a .cpu file, but I'm still 
virtually clueless when it comes to using it in conjunction with binutils to 
produce an assembler...

Dave Carney

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: opcodes port
  2002-12-31 13:11 opcodes port David Carney
@ 2003-01-02  1:43 ` Ben Elliston
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2003-01-02  1:43 UTC (permalink / raw)
  To: cgen

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-02  1:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-31 13:11 opcodes port David Carney
2003-01-02  1:43 ` Ben Elliston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).