public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* a question about doing an opcodes port
@ 2002-08-26  0:21 龚 源泉
  2002-08-26  6:58 ` Ben Elliston
  0 siblings, 1 reply; 2+ messages in thread
From: 龚 源泉 @ 2002-08-26  0:21 UTC (permalink / raw)
  To: cgen

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312; format=flowed, Size: 1548 bytes --]

Dear Mr Ben,
When I was doing an opcodes port using CGEN following the 
manual:(http://sources.redhat.com/cgen/docs-1.0/cgen_5.html#SEC163)

1.Run guile. 
2.(load "dev.scm"). This loads in a set of interactive development 
routines. 
3.(load-opc). Load the opcodes support. 
4.Edit your `cpu/<arch>.cpu' and `cpu/<arch>.opc' files. 
  The `.cpu' file is the main description file. 
  The `.opc' file provides additional C support code. 
5.(cload #:arch "cpu/<arch>") 
6.Run each of: 
  (cgen-desc.h) 
  (cgen-desc.c) 
  (cgen-opc.h) 
  (cgen-opc.c) 
  (cgen-ibld.in) 
  (cgen-asm.in) 
  (cgen-dis.in) 
  (cgen-opinst.c) -- [optional] 
7.Repeat steps 4, 5 and 6 until the output looks reasonable. 
8.Add dependencies to `opcodes/Makefile.am' to generate the eight opcodes 
files    (use the M32R port as an example). 
9.Run make dep from the `opcodes' build directory. 
10.Run make all-opcodes from the top level build directory


I had the following questions:
What is the directory "opcodes" in step 8, does it refer to the opcodes 
directory in the binutils(I have downloaded binutils-2.12 from the gnu 
ftp)package? 

What does "Add dependencies to "opcodes/Makefile.am" mean?
What are the eight opcodes files?

In what directory should I run the make instruction in step 9 and 10?

By the way, could you please give me an explanation about port?

Thanks for your help!

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: 
http://messenger.microsoft.com/cn/

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

* Re: a question about doing an opcodes port
  2002-08-26  0:21 a question about doing an opcodes port 龚 源泉
@ 2002-08-26  6:58 ` Ben Elliston
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2002-08-26  6:58 UTC (permalink / raw)
  To: 龚 源泉; +Cc: cgen

>>>>> "source" == source kong <gb2312> writes:

  source> What is the directory "opcodes" in step 8, does it refer to the opcodes 
  source> directory in the binutils(I have downloaded binutils-2.12 from the gnu 
  source> ftp)package?

Yes, but the opcodes build directory needs to be configured for your
target, not a native build.

  source> What does "Add dependencies to "opcodes/Makefile.am" mean?

See opcodes/Makefile.am and look at, for example, the fr30 port.
Mimic what was done for that port.

  source> What are the eight opcodes files?

In the case of the fr30 port:

    fr30-asm.c   fr30-desc.h  fr30-ibld.c  fr30-opc.h
    fr30-desc.c  fr30-dis.c   fr30-opc.c

  source> By the way, could you please give me an explanation about
  source> port?

What kind of explanation are you looking for, specifically?

Cheers, Ben

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

end of thread, other threads:[~2002-08-26 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-26  0:21 a question about doing an opcodes port 龚 源泉
2002-08-26  6:58 ` 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).