This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
Re: Problem with object->string Change in sid-cpu.scm -- patch committed
- From: Dave Brolley <brolley at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: cgen at sources dot redhat dot com
- Date: Tue, 09 May 2006 15:04:23 -0400
- Subject: Re: Problem with object->string Change in sid-cpu.scm -- patch committed
- References: <4460D7F3.2020706@redhat.com> <20060509180030.GB13413@redhat.com> <4460DEBE.801@redhat.com> <20060509184422.GC13413@redhat.com>
Frank Ch. Eigler wrote:
OK. Other places in sid-cpu.scm apply symbol->string to mode values,
so that should be safe here. So might obj:name.
That does the trick. Thanks! The attached patch has been committed.
Dave
2006-05-09 Dave Brolley <brolley@redhat.com>
* sid-cpu.scm (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
object->string om the mode.
(-hw-gen-write-stack-decl): Likewise.
Index: cgen/sid-cpu.scm
===================================================================
RCS file: /cvs/src/src/cgen/sid-cpu.scm,v
retrieving revision 1.16
diff -c -p -r1.16 sid-cpu.scm
*** cgen/sid-cpu.scm 9 May 2006 18:07:51 -0000 1.16
--- cgen/sid-cpu.scm 9 May 2006 18:57:12 -0000
*************** namespace @arch@ {
*** 212,218 ****
(write-stacks
(map (lambda (n) (sa n "_writes"))
(append (map (lambda (r) (gen-c-symbol (obj:name r))) regs)
! (map (lambda (m) (sa (object->string m) "_memory")) useful-mode-names))))
(stream-reg (lambda (r)
(let ((rname (sa "hardware." (gen-c-symbol (obj:name r)))))
(if (hw-scalar? r)
--- 212,218 ----
(write-stacks
(map (lambda (n) (sa n "_writes"))
(append (map (lambda (r) (gen-c-symbol (obj:name r))) regs)
! (map (lambda (m) (sa (symbol->string m) "_memory")) useful-mode-names))))
(stream-reg (lambda (r)
(let ((rname (sa "hardware." (gen-c-symbol (obj:name r)))))
(if (hw-scalar? r)
*************** typedef struct {
*** 406,415 ****
; (pipe-sz (+ 1 (max-delay (cpu-max-delay (current-cpu)))))
; (sz (* pipe-sz (-worst-case-number-of-writes-to nm))))
! (mode-pad (spaces (- 4 (string-length (object->string mode)))))
(stack-name (string-append nm "_writes")))
(string-append
! " write_stack< write<" (object->string mode) "> >" mode-pad "\t" stack-name "\t[pipe_sz];\n")))
(define (-hw-gen-write-struct-decl)
--- 406,415 ----
; (pipe-sz (+ 1 (max-delay (cpu-max-delay (current-cpu)))))
; (sz (* pipe-sz (-worst-case-number-of-writes-to nm))))
! (mode-pad (spaces (- 4 (string-length (symbol->string mode)))))
(stack-name (string-append nm "_writes")))
(string-append
! " write_stack< write<" (symbol->string mode) "> >" mode-pad "\t" stack-name "\t[pipe_sz];\n")))
(define (-hw-gen-write-struct-decl)