From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24699 invoked by alias); 9 May 2006 19:04:28 -0000 Received: (qmail 24691 invoked by uid 22791); 9 May 2006 19:04:27 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 09 May 2006 19:04:25 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k49J4Oro026003 for ; Tue, 9 May 2006 15:04:24 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k49J4Nis020823; Tue, 9 May 2006 15:04:23 -0400 Received: from [172.16.14.227] (IDENT:G+mpV1rOl3KN1saNfmYCPyODP65EaqFl@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k49J4NAc015299; Tue, 9 May 2006 15:04:23 -0400 Message-ID: <4460E7B7.8030305@redhat.com> Date: Tue, 09 May 2006 19:04:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: "Frank Ch. Eigler" CC: cgen@sources.redhat.com 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> In-Reply-To: <20060509184422.GC13413@redhat.com> Content-Type: multipart/mixed; boundary="------------050409050405040308000402" X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2006-q2/txt/msg00022.txt.bz2 This is a multi-part message in MIME format. --------------050409050405040308000402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 229 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 --------------050409050405040308000402 Content-Type: text/plain; name="cgen-symbol.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-symbol.ChangeLog" Content-length: 196 2006-05-09 Dave Brolley * 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. --------------050409050405040308000402 Content-Type: text/plain; name="cgen-symbol.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-symbol.patch.txt" Content-length: 1926 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) --------------050409050405040308000402--