1 Aug 2009 16:13
4 Aug 2009 02:11
4 Aug 2009 19:38
Delayed Memory Writes
Joseph A <joseph.altmaier <at> gmail.com>
2009-08-04 17:38:29 GMT
2009-08-04 17:38:29 GMT
When I write a line of code such as (set (delay 2 (mem SI r)) a) or (set (delay 2 (reg SI h-memory r)) a) I get the error "ERROR: Unbound variable: set". Is there some special notation for delayed memory stores, or a different way to accomplish this? Thanks Joseph -- -- View this message in context: http://www.nabble.com/Delayed-Memory-Writes-tp24813100p24813100.html Sent from the Sourceware - cgen list mailing list archive at Nabble.com.
4 Aug 2009 19:44
Re: Delayed Memory Writes
Frank Ch. Eigler <fche <at> redhat.com>
2009-08-04 17:44:48 GMT
2009-08-04 17:44:48 GMT
Hi - > When I write a line of code such as > (set (delay 2 (mem SI r)) a) > or > (set (delay 2 (reg SI h-memory r)) a) > I get the error "ERROR: Unbound variable: set". Is there some special > notation for delayed memory stores, or a different way to accomplish this? It nests the other way: (delay 1 (set FOO BAR)) - FChE
4 Aug 2009 20:57
Re: Delayed Memory Writes
Joseph A <joseph.altmaier <at> gmail.com>
2009-08-04 18:57:48 GMT
2009-08-04 18:57:48 GMT
Frank Ch. Eigler wrote: > > > It nests the other way: > > (delay 1 (set FOO BAR)) > > - FChE > > When nested this way I get the error "ERROR: In procedure string-append: ERROR: Wrong type argument (expecting STRINGP): set" The code (set (delay 2 (reg SI h-gr r)) a) works fine, as do delayed sets of hardware other than memory. The error only appears when I try to do a delayed memory set. The mt port uses delays nested in this manner, and the sh port uses delays nested in the manner you suggested. I'm a little confused. Are they both valid? Perhaps I'm using an old version? Thanks Joseph -- -- View this message in context: http://www.nabble.com/Delayed-Memory-Writes-tp24813100p24814271.html Sent from the Sourceware - cgen list mailing list archive at Nabble.com.(Continue reading)
6 Aug 2009 18:49
improvements in error reporting
Doug Evans <dje <at> sebabeach.org>
2009-08-06 16:49:37 GMT
2009-08-06 16:49:37 GMT
Hi. fyi, I checked this in. It's a step in improving error messages. [plus some minor cleanup] More to follow .... 2009-08-05 Doug Evans <dje <at> sebabeach.org> Track source location better, for better error messages. * pmacros.scm (-pmacro-eval): Delete, unused. (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated. (-pmacro-expand-expr-list, -smacro-apply): Ditto. (scan-list, scan): Ditto. (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if, -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin, -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto. (scan-list1): New function. (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite. * read.scm (<reader>): New member `location'. (-reader-lookup-command): Renamed from reader-lookup-command, all callers updated. (reader-error): Rewrite to produce better source location info. (current-reader-location): New function. (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1. All callers updated. Record source location of expression. (reader-process-expanded!): Renamed from reader-process-expanded. All callers updated. (-reader-process!): Renamed from reader-process. New arg `loc'. All callers updated. Record source location of define-pmacro.(Continue reading)
7 Aug 2009 23:33
tracing commands, pmacros
Doug Evans <dje <at> sebabeach.org>
2009-08-07 21:33:15 GMT
2009-08-07 21:33:15 GMT
Hi. fyi, I checked in a patch to add a -t option to allow tracing of commands and pmacros. E.g. cd obj/opcodes make stamp-m32r CGENFLAGS='-v -b -t all' 2009-08-07 Doug Evans <dje <at> sebabeach.org> Add -t option for tracing things like commands, pmacro expansion. * dev.scm (cload): New arg #:trace. * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing. (pmacro-trace): New arg `loc'. Rewrite pmacro tracing. (pmacro-debug): Call pmacro-trace instead of -pmacro-expand. * read.scm (<reader>): New members trace-commands?, trace-pmacros?. (-reader-process-expanded-1!): Trace commands if requested. (-reader-process!): Call pmacro-trace of pmacro tracing requested. (-set-trace-options!): New function. (-init-reader!): New function. (cpu-load): New arg trace-options, all callers updated. Call -init-reader! and -set-trace-options!. (cgen-usage): Improve output formatting. (common-arguments): New option -t. (-cgen): Process -t. * utils-cgen.scm (single-(Continue reading)location-≥string): Renamed from pretty-print-single-location. All callers updated.
13 Aug 2009 00:38
cleanup of parsing error reporting
Doug Evans <dje <at> sebabeach.org>
2009-08-12 22:38:35 GMT
2009-08-12 22:38:35 GMT
Hi. This patch is a follow-up to http://sourceware.org/ml/cgen/2009-q3/msg00049.html The old "errtxt" argument of the parsing routines has been replaced with a <context> object, and everything now consistently uses it. Gone are several fixmes too. Tested by regenerating binutils, sid, intrinsics, and doc files. 2009-08-12 Doug Evans <dje <at> sebabeach.org> Clean up cpu file parsing, pass context consistently instead of the old "errtxt" argument. NOTE: ACU == "All Callers Updated". * attr.scm (-parse-simple-attribute): Renamed from parse-simple-attribute, ACU. (-attr-parse): Change errtxt argument to context, ACU. (-attr-read): Ditto. (atlist-parse): Ditto. Put context arg first. (attr-parse): Use parse-error instead of context-error. * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU. (-enum-parse-prefix, -enum-parse, -enum-read): Ditto. * hardware.scm (-keyword-parse): Renamed from keyword-parse. `context' arg is now a <context> object. ACU. (-keyword-read): `context' arg is now a <context> object. ACU. (-hw-parse-indices): Change errtxt argument to context, ACU. (-hw-parse-values, -hw-parse-handlers): Ditto. (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.(Continue reading)
13 Aug 2009 19:14
pmacro expansion snafu?
Doug Evans <dje <at> sebabeach.org>
2009-08-13 17:14:47 GMT
2009-08-13 17:14:47 GMT
I'm adding pmacro builtin .let*. No point in leaving it out.
Anyways, I was adding another testcase for .let and found some
unintuitive behaviour.
guile> (pmacro-trace '(.let ((x y) (y 2)) (.list x y)) (make <location> nil))
Pmacro expanding: (.let ((x y) (y 2)) (.list x y))
Pmacro location: standard input:11:16
Expanding: (.list x y)
env: ((x . y) (y . 2))
location: standard input:11:36
result: (2 2)
Pmacro result: (2 2)
(2 2)
guile> (pmacro-trace '(.let ((x z) (y 2)) (.list x y)) (make <location> nil))
Pmacro expanding: (.let ((x z) (y 2)) (.list x y))
Pmacro location: standard input:14:16
Expanding: (.list x y)
env: ((x . z) (y . 2))
location: standard input:14:36
result: (z 2)
Pmacro result: (z 2)
(z 2)
guile>
The problem is cgen's pmacro expansion will re-evaluate an expanded
pmacro if the expansion also happens to be a pmacro.
So in the first case x -> y, y is also a pmacro, so x -> y -> 2.
The following is even less unintuitive (I think).
(Continue reading)
13 Aug 2009 19:58
.let*
Doug Evans <dje <at> sebabeach.org>
2009-08-13 17:58:45 GMT
2009-08-13 17:58:45 GMT
I checked in support for .let*. 2009-08-13 Doug Evans <dje <at> sebabeach.org> Add .let* pmacro builtin. * pmacros.scm (-pmacro-builtin-let*): New function. (pmacros-init!): Add .let*. * doc/pmacros.texi: Document .let*. * testsuite/pmacros-1.test: Test .let*.
Hope this helps,
B
RSS Feed