Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/x86/instructions/x86FreqProps.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/x86/instructions/x86FreqProps.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 427 - (download) (annotate)
Wed Sep 8 09:40:08 1999 UTC (20 years, 3 months ago) by monnier
File size: 632 byte(s)
Initial revision
(*
 * Extract frequency information from the X86 architecture
 *
 * -- Allen
 *)
functor X86FreqProps(X86Instr : X86INSTR) : FREQUENCY_PROPERTIES =
struct

   structure I = X86Instr

   fun branchProb(I.ANNOTATION{a=BasicAnnotations.BRANCH_PROB b,...}) = b
     | branchProb(I.ANNOTATION{i,...}) = branchProb i
     | branchProb(I.JCC{cond=I.EQ,...}) = 10
     | branchProb(I.JCC{cond=I.O,...}) = 0 (* overflow *)
     | branchProb(I.JCC{cond=I.NE,...}) = 90
     | branchProb(I.JCC{cond=I.NO,...}) = 100
     | branchProb(I.JCC _) = 50 (* default *)
     | branchProb(I.JMP _) = 100 
     | branchProb _ = 0 (* non-branch *)

end


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0