public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: cgen@sources.redhat.com
Subject: [patch][commit] Corner Case in Processing of Timing Data
Date: Tue, 09 May 2006 18:37:00 -0000	[thread overview]
Message-ID: <4460E150.9010108@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

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

[-- Attachment #2: cgen-timing.ChangeLog --]
[-- Type: text/plain, Size: 181 bytes --]

2006-05-09  Dave Brolley  <brolley@redhat.com>

	* sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
	is null.
	* sim.scm (-gen-arch-model-decls): Likewise.

[-- Attachment #3: cgen-timing.patch.txt --]
[-- Type: text/plain, Size: 2440 bytes --]

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"

                 reply	other threads:[~2006-05-09 18:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4460E150.9010108@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).