public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* [patch][commit] Corner Case in Processing of Timing Data
@ 2006-05-09 18:37 Dave Brolley
  0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2006-05-09 18:37 UTC (permalink / raw)
  To: cgen

[-- 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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-09 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 18:37 [patch][commit] Corner Case in Processing of Timing Data Dave Brolley

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).