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]
Other format: [Raw text]

play.cpu or parallel semantics broken


#guile
guile> (load "dev.scm")
[...]
guile> (load-sim)
[...]
guile> (cload #:arch "cpu/play")
[...]
guile> (cgen-sem-switch.c)
Generating cpuf sem-switch.c ...
Analyzing instruction set ...
[...]
Processing semantic switch case for "add $dr,$sr" ...
[ Note that this is actually addv2; they confusingly have the
same "syntax". ]

Backtrace:
32* [#<procedure (e)> (parallel () DFLT ...)]
33* [rtl-c-with-estate #(# #) #(# #) (parallel () DFLT () ...)]
34  [cx:c ...
35*  [rtl-c-get #(# #) #(# #) ...
36*   [rtx-eval-with-estate (parallel () DFLT () ...) #(# #) #(# #)]
37    (if (pair? expr) (let* (# #) (if fn # ...)) ...)
      ...
38    [s-parallel #(#("object" # #f ...) (# #f # ...)) (set () DFLT ...) ...]
39    (let* ((set-dests #) (temps #)) (set! -par-temp-list temps) ...)
40*   [string-map #<procedure (e)> ...
41*    [-par-replace-set-dests #(# #) (# # #)]
42     (let ((sets (list # # # #))) (letrec ((replace #)) (map replace exprs)))
       ...
43     [map #<procedure replace (expr)> (# # #)]
44*    [replace (set () DFLT ...)]
45*    (let (# # #) (if # # #))
46     (if (memq name sets) (list name options ...) ...)
47     [list set () DFLT ...
48*     [-par-new-temp! ...
49*      (if (mode:eq? # mode) (rtx-lvalue-mode-name estate #) mode)
50       [rtx-lvalue-mode-name #(# #) (local () DFLT tmp1)]
         ...
51       [error "rtx-lvalue-mode-name: not an operand or hardware reference:" $

./rtl.scm:437:6: In procedure error in expression (error "rtx-lvalue-mode-name: not an operand or hardware reference:" x):
./rtl.scm:437:6: rtx-lvalue-mode-name: not an operand or hardware reference: (local () DFLT tmp1)
ABORT: (misc-error)

Also happens with (cgen-semantics.c).  And this also happens
without my recent pmacros.scm patch. ;-)

It looks like a parallel does not inherit the variables of a
surrounding sequence; in this case tmp1.  Not that I need that
feature, but I think play.cpu shouldn't fail.  An easy way out
is to just remove addv2.

brgds, H-P


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