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 499 - (download) (annotate)
Tue Dec 7 15:44:50 1999 UTC (20 years ago) by monnier
File size: 669 byte(s)
This commit was generated by cvs2svn to compensate for changes in r498,
which included commits to RCS files with non-trunk default branches.
(*
 * Extract frequency information from the X86 architecture
 *
 * -- Allen
 *)
functor X86FreqProps(X86Instr : X86INSTR) : FREQUENCY_PROPERTIES =
struct

   structure I = X86Instr

   fun branchProb(I.ANNOTATION{a, i, ...}) =
        (case #peek MLRiscAnnotations.BRANCH_PROB a of
           SOME b => b
         | NONE => 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