From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5120 invoked by alias); 11 Feb 2003 20:18:07 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 5098 invoked from network); 11 Feb 2003 20:18:07 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 11 Feb 2003 20:18:07 -0000 Received: from redhat.com (topaz.toronto.redhat.com [172.16.14.227]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 8A98680004E for ; Tue, 11 Feb 2003 15:18:06 -0500 (EST) Message-ID: <3E495AD1.7070305@redhat.com> Date: Tue, 11 Feb 2003 20:18:00 -0000 From: Dave Brolley Organization: Red Hat Canada, Ltd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021216 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cgen@sources.redhat.com Subject: [patch][rfa]@arch@_cgen_ifld_table Content-Type: multipart/mixed; boundary="------------020105000000060807050109" X-SW-Source: 2003-q1/txt/msg00043.txt.bz2 This is a multi-part message in MIME format. --------------020105000000060807050109 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 2108 Hi, Stan Cox noticed the following when debugging a problem with one of our internal ports. I've replaced the name of the port with '@arch@' and '@ARCH@' below: ------------------------------------------------------------------------- I notice that @arch@-opc.c defines: #define F(f) & @arch@_cgen_ifld_table[@ARCH@_ ##f] so it would seem as though the members of @arch@_cgen_ifld_table should match those of enum ifield_type. However they do not always do so; they seem to get out of sync for multi-ifields. (@arch@-desc.c) { @ARCH@_F_CSRN_HI, "f-csrn-hi", 0, 32, 15, 1, { 0, { { { (1<string (ifld-word-offset ifld)) ", " ! (number->string (ifld-word-length ifld)) ", " ! (number->string (ifld-start ifld #f)) ", " ! (number->string (ifld-length ifld)) ", " (gen-obj-attr-defn 'ifld ifld all-attrs ! num-non-bools gen-A-attr-mask) " },\n"))) ifld-list) "\ --- 148,164 ---- " { " (ifld-enum ifld) ", " "\"" (obj:name ifld) "\", " ! (if ! (or (has-attr? ifld 'VIRTUAL) ! (derived-ifield? ifld)) ! "0, 0, 0, 0," ! (string-append ! (number->string (ifld-word-offset ifld)) ", " ! (number->string (ifld-word-length ifld)) ", " ! (number->string (ifld-start ifld #f)) ", " ! (number->string (ifld-length ifld)) ", ")) (gen-obj-attr-defn 'ifld ifld all-attrs ! num-non-bools gen-A-attr-mask) " },\n"))) ifld-list) "\ *************** const CGEN_HW_ENTRY @arch@_cgen_hw_table *** 404,410 **** (set! field-ref (string-append "&" (ifld-enum fld) "_MULTI_IFIELD[0]")) (set! field-count (number->string (length (elm-get fld 'subfields))))) ; else ! (set! field-ref (string-append "&@arch@_cgen_ifld_table[" (ifld-number fld) "]")))) (string-append "{ " field-count ", { (const PTR) " field-ref " } }"))) (define (gen-multi-ifield-nodes) --- 408,414 ---- (set! field-ref (string-append "&" (ifld-enum fld) "_MULTI_IFIELD[0]")) (set! field-count (number->string (length (elm-get fld 'subfields))))) ; else ! (set! field-ref (string-append "&@arch@_cgen_ifld_table[" (ifld-enum fld) "]")))) (string-append "{ " field-count ", { (const PTR) " field-ref " } }"))) (define (gen-multi-ifield-nodes) --------------020105000000060807050109 Content-Type: text/plain; name="fr30.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fr30.diff.txt" Content-length: 14916 Index: fr30-desc.c =================================================================== RCS file: /cvs/src/src/opcodes/fr30-desc.c,v retrieving revision 1.14 diff -c -p -r1.14 fr30-desc.c *** fr30-desc.c 2 Dec 2002 21:58:18 -0000 1.14 --- fr30-desc.c 11 Feb 2003 19:59:21 -0000 *************** const CGEN_IFLD fr30_cgen_ifld_table[] = *** 325,330 **** --- 325,331 ---- { FR30_F_I8, "f-i8", 0, 16, 4, 8, { 0, { (1<