public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* sid-20110801 Patch for cgen setter error
@ 2011-08-29  6:28 John Wehle
  2011-08-29 17:31 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: John Wehle @ 2011-08-29  6:28 UTC (permalink / raw)
  To: cgen


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

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

* Re: sid-20110801 Patch for cgen setter error
  2011-08-29  6:28 sid-20110801 Patch for cgen setter error John Wehle
@ 2011-08-29 17:31 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2011-08-29 17:31 UTC (permalink / raw)
  To: John Wehle; +Cc: cgen

Hi, John -

On Mon, Aug 29, 2011 at 02:28:25AM -0400, John Wehle wrote:
> [...]
> The problem appears to be a typo in sid.scm.  Patch enclosed.

Thank you very much, committed.

- FChE

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

end of thread, other threads:[~2011-08-29 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29  6:28 sid-20110801 Patch for cgen setter error John Wehle
2011-08-29 17:31 ` Frank Ch. Eigler

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