This is the mail archive of the cgen@sourceware.org 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]

sid-20110801 Patch for cgen setter error


Generating sim files from a cpu file containing:

(define-operand
  (name drli)
  (comment "destination register")
  (type h-gr)
  (index f-dli)
  (setter () (set (reg h-gr f-dli) newval))
)

works fine, however generating sid files gives:

Generating tomibf-semantics.cxx ...
Canonicalizing instruction semantics ...
Done canonicalization.
Analyzing instruction set ...
Performing sanity checks ...
Done analysis.
Computing sformat argument buffers ...
ERROR: send: not an object VOID

Backtrace:
In ../../../../../../src/sid/src/sid/component/cgen-cpu/tomi/../../../../cgen/cos.scm:
255:  0  [error "send: not an object" VOID]
In unknown file:
   ?:  1  [/object-error "send" VOID "not an object"]
In ../../../../../../src/sid/src/sid/component/cgen-cpu/tomi/../../../../cgen/cos.scm:
245:  2  [apply #<procedure /object-error #> #]
244:  3* (if (not #) (apply /object-error #))
1112:  4* [/object-check VOID "send"]
In unknown file:
    ?:  5  [send VOID get-name]
In ../../../../../../src/sid/src/sid/component/cgen-cpu/tomi/../../../../cgen/utils-cgen.scm:
213:  6  [obj-name VOID]
In ../../../../../../src/sid/src/sid/component/cgen-cpu/tomi/../../../../cgen/rtl-c.scm:
322:  7* [obj:name VOID]
322:  8* [rtx-canonicalize #f ...
322:  9  (let* ((canonical-rtl #) (estate #)) (rtl-c-with-estate estate mode ...))
In ./../../../../../../src/sid/src/sid/component/cgen-cpu/tomi/../../../../cgen/sid.scm:
1098: 10  [rtl-c VOID (tomi) ...]
1096: 11  (let ((args #) (expr #)) (rtl-c (quote VOID) (obj-isa-list op) ...))
1095: 12* (if (op:setter op) (let (# #) (rtl-c # # ...)) ...)

If I comment out the setter, then the sid files generate fine.

The problem appears to be a typo in sid.scm.  Patch enclosed.

-- John
   john@cybersashi.com
------------------------8<------------------------------8<---------------
--- sid.scm.ORIGINAL    2010-01-24 19:40:29.000000000 -0500
+++ sid.scm     2011-08-29 00:46:05.000000000 -0400
@@ -1095,7 +1095,7 @@
    (if (op:setter op)
        (let ((args (car (op:setter op)))
             (expr (cadr (op:setter op))))
-        (rtl-c 'VOID
+        (rtl-c VOID
                (obj-isa-list op)
                (if (= (length args) 0)
                    (list (list 'newval mode "opval"))
-------------------------------------------------------------------------


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