This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
[patch] MAX_UNITS for sid profiling
- From: Dave Brolley <brolley at redhat dot com>
- To: cgen at sources dot redhat dot com, sid at sources dot redhat dot com
- Date: Tue, 21 Oct 2003 12:44:54 -0400
- Subject: [patch] MAX_UNITS for sid profiling
- Organization: Red Hat Canada, Ltd
Hi,
I've committed this patch which generates MAX_UNITS as a static const
int instead of a #define so that it will be correctly encapsulated
within the namespace it's declared in. This allows the existency of
profiling models for multiple cpus with potentially different values of
MAX_UNITS.
The patch also corrects a typo in a call to 'logit'.
Dave
2003-10-21 Dave Brolley <brolley@redhat.com>
* sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
a static const int.
* decode.scm (-opcode-slots): Correct typo in logit call.
Index: cgen/decode.scm
===================================================================
RCS file: /cvs/src/src/cgen/decode.scm,v
retrieving revision 1.8
diff -c -p -r1.8 decode.scm
*** cgen/decode.scm 17 Jul 2003 06:19:35 -0000 1.8
--- cgen/decode.scm 21 Oct 2003 16:39:53 -0000
***************
*** 451,457 ****
(opcode-mask (compute (insn-base-mask insn) insn-len decode-len bitnums))
(indices (missing-bit-indices opcode-mask (- (integer-expt 2 decode-len) 1))))
(logit 3 "insn =" (obj:name insn)
! " insn-base-value=" (insn-base-value insn)
" insn-base-mask=" (insn-base-mask insn)
" insn-len=" insn-len
" decode-len=" decode-len
--- 451,457 ----
(opcode-mask (compute (insn-base-mask insn) insn-len decode-len bitnums))
(indices (missing-bit-indices opcode-mask (- (integer-expt 2 decode-len) 1))))
(logit 3 "insn =" (obj:name insn)
! " insn-value=" (insn-value insn)
" insn-base-mask=" (insn-base-mask insn)
" insn-len=" insn-len
" decode-len=" decode-len
Index: cgen/sid-model.scm
===================================================================
RCS file: /cvs/src/src/cgen/sid-model.scm,v
retrieving revision 1.7
diff -c -p -r1.7 sid-model.scm
*** cgen/sid-model.scm 16 Jul 2003 05:35:47 -0000 1.7
--- cgen/sid-model.scm 21 Oct 2003 16:39:53 -0000
*************** static const MACH_IMP_PROPERTIES @cpu@_i
*** 249,255 ****
" };\n\n"
; FIXME: revisit MAX_UNITS
! " #define MAX_UNITS ("
(number->string
(let ((insn-list (non-multi-insns (real-insns (current-insn-list)))))
(if (null? insn-list)
--- 249,255 ----
" };\n\n"
; FIXME: revisit MAX_UNITS
! " static const int MAX_UNITS = "
(number->string
(let ((insn-list (non-multi-insns (real-insns (current-insn-list)))))
(if (null? insn-list)
*************** static const MACH_IMP_PROPERTIES @cpu@_i
*** 264,270 ****
(length (timing:units (cdr insn-timing))))
timing))))
insn-list))))))
! ")\n"
)
)
--- 264,270 ----
(length (timing:units (cdr insn-timing))))
timing))))
insn-list))))))
! ";\n"
)
)