public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: cgen@sources.redhat.com, sid@sources.redhat.com
Subject: [patch] MAX_UNITS for sid profiling
Date: Tue, 21 Oct 2003 16:44:00 -0000	[thread overview]
Message-ID: <3F956286.4000604@redhat.com> (raw)

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

                 reply	other threads:[~2003-10-21 16:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F956286.4000604@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=sid@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).