From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13280 invoked by alias); 21 Oct 2003 16:44:56 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 13229 invoked from network); 21 Oct 2003 16:44:54 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 21 Oct 2003 16:44:54 -0000 Received: from redhat.com (topaz.toronto.redhat.com [172.16.14.227]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 6EC0E80040B; Tue, 21 Oct 2003 12:44:54 -0400 (EDT) Message-ID: <3F956286.4000604@redhat.com> Date: Tue, 21 Oct 2003 16:44:00 -0000 From: Dave Brolley Organization: Red Hat Canada, Ltd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021216 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cgen@sources.redhat.com, sid@sources.redhat.com Subject: [patch] MAX_UNITS for sid profiling Content-Type: multipart/mixed; boundary="------------010400000608090001020003" X-SW-Source: 2003-q4/txt/msg00011.txt.bz2 This is a multi-part message in MIME format. --------------010400000608090001020003 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 358 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 --------------010400000608090001020003 Content-Type: text/plain; name="MAX_UNITS.ChangeLog" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="MAX_UNITS.ChangeLog" Content-length: 194 2003-10-21 Dave Brolley * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as a static const int. * decode.scm (-opcode-slots): Correct typo in logit call. --------------010400000608090001020003 Content-Type: text/plain; name="MAX_UNITS.patch.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="MAX_UNITS.patch.txt" Content-length: 2203 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" ) ) --------------010400000608090001020003--