From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12749 invoked by alias); 9 May 2006 18:37:10 -0000 Received: (qmail 12741 invoked by uid 22791); 9 May 2006 18:37:10 -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 18:37:06 +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 k49Ib5Jx017394 for ; Tue, 9 May 2006 14:37:05 -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 k49Ib4Fh014256 for ; Tue, 9 May 2006 14:37:04 -0400 Received: from [172.16.14.227] (IDENT:SkQWr/4leYOgSzvco9a6/8eNV3knAI4+@topaz.toronto.redhat.com [172.16.14.227]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k49Ib4Ac014211 for ; Tue, 9 May 2006 14:37:04 -0400 Message-ID: <4460E150.9010108@redhat.com> Date: Tue, 09 May 2006 18:37:00 -0000 From: Dave Brolley User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: cgen@sources.redhat.com Subject: [patch][commit] Corner Case in Processing of Timing Data Content-Type: multipart/mixed; boundary="------------020807070809000901090807" 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/msg00019.txt.bz2 This is a multi-part message in MIME format. --------------020807070809000901090807 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 178 Hi, I've committed the attached patch which handles the case where insn-timing is null in -gen-model-class-decls in sid-model.scm and the corresponding case in sim.scm. Dave --------------020807070809000901090807 Content-Type: text/plain; name="cgen-timing.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-timing.ChangeLog" Content-length: 181 2006-05-09 Dave Brolley * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing is null. * sim.scm (-gen-arch-model-decls): Likewise. --------------020807070809000901090807 Content-Type: text/plain; name="cgen-timing.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cgen-timing.patch.txt" Content-length: 2440 Index: cgen/sid-model.scm =================================================================== RCS file: /cvs/src/src/cgen/sid-model.scm,v retrieving revision 1.8 diff -c -p -r1.8 sid-model.scm *** cgen/sid-model.scm 21 Oct 2003 16:42:01 -0000 1.8 --- cgen/sid-model.scm 9 May 2006 18:31:23 -0000 *************** *** 1,5 **** ; Simulator model support, plus misc. things associated with a cpu family. ! ; Copyright (C) 2000, 2002, 2003 Red Hat, Inc. ; This file is part of CGEN. (define (unit:enum u) --- 1,5 ---- ; Simulator model support, plus misc. things associated with a cpu family. ! ; Copyright (C) 2000, 2002, 2003, 2006 Red Hat, Inc. ; This file is part of CGEN. (define (unit:enum u) *************** static const MACH_IMP_PROPERTIES @cpu@_i *** 261,267 **** (if (null? timing) '(1) (map (lambda (insn-timing) ! (length (timing:units (cdr insn-timing)))) timing)))) insn-list)))))) ";\n" --- 261,269 ---- (if (null? timing) '(1) (map (lambda (insn-timing) ! (if (null? (cdr insn-timing)) ! '1 ! (length (timing:units (cdr insn-timing))))) timing)))) insn-list)))))) ";\n" Index: cgen/sim.scm =================================================================== RCS file: /cvs/src/src/cgen/sim.scm,v retrieving revision 1.13 diff -c -p -r1.13 sim.scm *** cgen/sim.scm 16 Jul 2003 05:35:48 -0000 1.13 --- cgen/sim.scm 9 May 2006 18:31:23 -0000 *************** *** 1,5 **** ; Simulator generator support routines. ! ; Copyright (C) 2000, 2001, 2002 Red Hat, Inc. ; This file is part of CGEN. ; One goal of this file is to provide cover functions for all methods. --- 1,5 ---- ; Simulator generator support routines. ! ; Copyright (C) 2000, 2001, 2002, 2006 Red Hat, Inc. ; This file is part of CGEN. ; One goal of this file is to provide cover functions for all methods. *************** *** 1476,1482 **** (if (null? timing) '(1) (map (lambda (insn-timing) ! (length (timing:units (cdr insn-timing)))) timing)))) (current-insn-list))))) ")\n\n" --- 1476,1484 ---- (if (null? timing) '(1) (map (lambda (insn-timing) ! (if (null? (cdr insn-timing)) ! '1 ! (length (timing:units (cdr insn-timing))))) timing)))) (current-insn-list))))) ")\n\n" --------------020807070809000901090807--