* [patch] MAX_UNITS for sid profiling
@ 2003-10-21 16:44 Dave Brolley
2003-10-22 8:55 ` Ben Elliston
0 siblings, 1 reply; 2+ messages in thread
From: Dave Brolley @ 2003-10-21 16:44 UTC (permalink / raw)
To: cgen, sid
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
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
[-- Attachment #2: MAX_UNITS.ChangeLog --]
[-- Type: text/plain, Size: 194 bytes --]
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.
[-- Attachment #3: MAX_UNITS.patch.txt --]
[-- Type: text/plain, Size: 2203 bytes --]
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"
)
)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] MAX_UNITS for sid profiling
2003-10-21 16:44 [patch] MAX_UNITS for sid profiling Dave Brolley
@ 2003-10-22 8:55 ` Ben Elliston
0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2003-10-22 8:55 UTC (permalink / raw)
To: sid; +Cc: cgen
Dave Brolley <brolley@redhat.com> writes:
> 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.
Looks good to me, Dave.
Ben
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-22 8:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-21 16:44 [patch] MAX_UNITS for sid profiling Dave Brolley
2003-10-22 8:55 ` Ben Elliston
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).