public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* opcodes port instructions  in cgen.info yield "unbound variable: opc-file-path "
@ 2008-11-11  5:18 Alan Lehotsky
  2008-11-15 14:46 ` Alan Lehotsky
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Lehotsky @ 2008-11-11  5:18 UTC (permalink / raw)
  To: cgen; +Cc: Alan Lehotsky

I've done two cgen machines (but it's been years since the last time I  
worked with this.

I've really tried hard to exactly follow the steps in Section 5.5 of  
the cgen.info file.

I tried Fche's suggestion of doing a (set! .... ), and had no  
success.    There are at least 3-4
people who've encountered this problem (as far back as 2002) and I  
don't see any indication in
the mailing-list archives that a solution has been posted...

- I've got a TARGET.cpu and TARGET.opc file.
- I've done

       cd src/cgen
       guile
       guile> (load "dev.scm")
       guile> (load-opc)
       guile> (cload #:arch "TARGET")
       ......								;; no errors or warnings here
       guile> (cgen-asm.in)

(cgen-asm.in)
Generating atdsp-asm.in ...


Backtrace:
In ./opc-asmdis.scm:
   89:  0* (opc-file-path)
   89:  1  [gen-extra-asm.c ...
In ./utils.scm:
  414:  2* [#<procedure #f ()>]
  414:  3  [-string-write #(print-state 0) ...
  412:  4* (cond ((string? expr) (display expr)) ((symbol? expr)  
(display expr)) ...)
  403:  5* [-string-write #(print-state 0) #<procedure #f ()>]
In unknown file:
    ?:  6* [#<procedure #f (elm)> #<procedure #f ()>]
In ./utils.scm:
  403:  7* [for-each #<procedure #f (elm)> ("
" #<procedure #f ()> "
" ...)]
  401:  8  (let* ((pstate (make-print-state))) (set! -current-print- 
state pstate) ...)
In ./opc-asmdis.scm:
   86:  9  [string-write "
" #<procedure #f ()> ...]
In standard input:
    5: 10* [cgen-asm.in]

./opc-asmdis.scm:89:32: In expression (opc-file-path):
./opc-asmdis.scm:89:32: Unbound variable: opc-file-path
ABORT: (unbound-variable)


I get that unbound variable complaint for ALL the file generation 

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

* Re: opcodes port instructions  in cgen.info yield "unbound variable: opc-file-path "
  2008-11-11  5:18 opcodes port instructions in cgen.info yield "unbound variable: opc-file-path " Alan Lehotsky
@ 2008-11-15 14:46 ` Alan Lehotsky
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Lehotsky @ 2008-11-15 14:46 UTC (permalink / raw)
  To: cgen; +Cc: Alan Lehotsky

I see what my problem was.  I was expecting too much from running  
interactively.

The suggestion regarding running various generators (like the `(cgen- 
asm.in)' is going to always fail complaining
about the unbound variable.  You would need to invoke guile and cgen  
with all the appropriate flags that are hidden in
the make files.  The porting suggestion is directed to the idea that  
you run interactively, looking at the generated .c and .h files
as they flash by on the screen.  Once you're happy, then you go off  
and do the

         make stamp-TARGET

or whatever in the subdirs.  I will see if I can write up a patch to  
the docs regarding this.



On Nov 11, 2008, at 00:18, Alan Lehotsky wrote:

>
> - I've got a TARGET.cpu and TARGET.opc file.
> - I've done
>
>       cd src/cgen
>       guile
>       guile> (load "dev.scm")
>       guile> (load-opc)
>       guile> (cload #:arch "TARGET")
>       ......								;; no errors or warnings here
>       guile> (cgen-asm.in)
>
> (cgen-asm.in)
> Generating atdsp-asm.in ...
>
>
> Backtrace:
> In ./opc-asmdis.scm:
>   89:  0* (opc-file-path)
>   89:  1  [gen-extra-asm.c ...
> In ./utils.scm:
>  414:  2* [#<procedure #f ()>]
>  414:  3  [-string-write #(print-state 0) ...
>  412:  4* (cond ((string? expr) (display expr)) ((symbol? expr)  
> (display expr)) ...)
>  403:  5* [-string-write #(print-state 0) #<procedure #f ()>]
> In unknown file:
>    ?:  6* [#<procedure #f (elm)> #<procedure #f ()>]
> In ./utils.scm:
>  403:  7* [for-each #<procedure #f (elm)> ("
> " #<procedure #f ()> "
> " ...)]
>  401:  8  (let* ((pstate (make-print-state))) (set! -current-print- 
> state pstate) ...)
> In ./opc-asmdis.scm:
>   86:  9  [string-write "
> " #<procedure #f ()> ...]
> In standard input:
>    5: 10* [cgen-asm.in]
>
> ./opc-asmdis.scm:89:32: In expression (opc-file-path):
> ./opc-asmdis.scm:89:32: Unbound variable: opc-file-path
> ABORT: (unbound-variable)
>
>
> I get that unbound variable complaint for ALL the file generation

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

end of thread, other threads:[~2008-11-15 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-11  5:18 opcodes port instructions in cgen.info yield "unbound variable: opc-file-path " Alan Lehotsky
2008-11-15 14:46 ` Alan Lehotsky

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).