This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
[patch][commit] Corner Case in Processing of Timing Data
- From: Dave Brolley <brolley at redhat dot com>
- To: cgen at sources dot redhat dot com
- Date: Tue, 09 May 2006 14:37:04 -0400
- Subject: [patch][commit] Corner Case in Processing of Timing Data
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
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.
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"