This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: enums


"Frank Ch. Eigler" wrote:

> :    (values ("RESET") ("BUSERR" -) ("DPF" -) ("IPF" -)
> :            ("EXTINT" -) ("ALIGN" -) ("ILLEGAL" -) ("PEINT" -)
> :            ("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -)
> :            ("SYSCALL" -) ("BREAK" -) ("RESERVED" -))
>
> Is this intentional?  Why define the others with value "-" ?

Well, first i defined it like: ("RESET" #x100) ("BUFFER" #x200)
And that didn't work at all.  All the "-" values is just the
result of a search-and-replace.
 
> : And if I define the values like this,
> :
> :   (values ("RESET" #x100) ("BUSERR" -) ("DPF" -) ("IPF" -)
> :           ("EXTINT" -) ("ALIGN" -) ("ILLEGAL" -) ("PEINT" -)
> :           ("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -)
> :           ("SYSCALL" -) ("BREAK" -) ("RESERVED" -))
> :
> : I get the following message for CGEN:
> :   ERROR: In procedure caar:
> :   ERROR: Wrong type argument in position 1: ()
> 
> Just a bug.  Could you try running cgen with error backtracing?
> (CGENFLAGS="-b"; works for guile 1.3.*)

Ofcouse, here's the result:

ERROR: In procedure caar:
ERROR: Wrong type argument in position 1: ()

Backtrace:
 0  (begin (apply display-error #f ...) (save-stack) ...)
 1* (if (= (length args) 5) (begin (apply display-error #f ...) (save-stack) ...))
 2* [#<procedure args> wrong-type-arg "caar" ...]
 3* [caar (() (prefix E_) (values # # ...))]
 4  (let ((arg #) (elm-name #)) (case elm-name (# #) ...) ...)
 5  (if (null? arg-list) nil ...)
 6  [#<procedure (arg-list)> (() (prefix E_) (values # # ...))]
 7  (let ((arg #) (elm-name #)) (case elm-name (# #) ...) ...)
 8  (if (null? arg-list) nil ...)
 9  [#<procedure (arg-list)> ((comment "exception vectors") () (prefix E_) ...)]
10  (let ((arg #) (elm-name #)) (case elm-name (# #) ...) ...)
11  (if (null? arg-list) nil ...)
12  [#<procedure (arg-list)> ((name e-exception) (comment "exception vectors") () ...)]
13* (letrec ((loop #)) (loop arg-list))
14  (let ((name nil) (comment "") (attrs nil) ...) (letrec (#) (loop arg-list)) ...)
15  [-enum-read "define-enum" (name e-exception) ...]
16* [apply #<procedure -enum-read (errtxt . arg-list)> ("define-enum" (name e-exception) (comment "exception vectors") ...)]
17  (let ((e #)) (current-enum-add! e) ...)
18  [define-enum (name e-exception) (comment "exception vectors") ...]
19  [apply #<procedure define-enum arg-list> ((name e-exception) (comment "exception vectors") () ...)]
20  (if (< (length #) (car num-args)) (reader-error (string-append "Incorrect number of arguments to " # ...) entry ...) ...)
21  (if (cdr num-args) (if (< # #) (reader-error # entry ...) ...) ...)
22  (let* ((handler #) (arg-spec #) (num-args #)) (if (cdr num-args) (if # # ...) ...))
23  (if command (let* (# # #) (if # # ...)) ...)
24* (let ((command #)) (if command (let* # #) ...))
25  [-reader-process-expanded-1 (define-enum (name e-exception) (comment "exception vectors") ...)]
26  (if (eq? (car entry) (quote begin)) (for-each -reader-process-expanded (cdr entry)) ...)
27  [-reader-process-expanded (define-enum (name e-exception) (comment "exception vectors") ...)]
28  (let ((expansion #)) (-reader-process-expanded expansion))
29* [reader-process (define-enum (name e-exception) (comment "exception vectors") ...)]
30  (begin (reader-process entry) (loop (read)))
    ...
31  (if (eof-object? entry) #t ...)
32  [#<procedure (entry)> (define-isa (name or32) (base-insn-bitsize 32) ...)]
33  (begin (reader-process entry) (loop (read)))
34  (if (eof-object? entry) #t ...)
35  [#<procedure (entry)> (define-arch (name or32) (comment "OpenRISC 1000") ...)]
36  (begin (reader-process entry) (loop (read)))
37  (if (eof-object? entry) #t ...)
38  [#<procedure (entry)> (include "simplify.inc")]
39* (letrec ((loop #)) (loop (read)))
40* [#<procedure ()>]
41  [lazy-catch #t #<procedure ()> ...]
    ...
42  (let* () (set! srcdir (find-srcdir #)) ...)
43* [cgen-opc ("./../cgen/cgen-opc.scm" "-s" "./../cgen" ...)]
44* [primitive-load "./../cgen/cgen-opc.scm"]


-- 
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00

$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
             THEN EXCUSE/OBJECT=ME

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]