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

# SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/mltree/mltree-mult.sig
 [smlnj] / sml / trunk / src / MLRISC / mltree / mltree-mult.sig

# Annotation of /sml/trunk/src/MLRISC/mltree/mltree-mult.sig

Original Path: sml/branches/SMLNJ/src/MLRISC/mltree/mltree-mult.sig

 1 : monnier 409 (* 2 : * Let's generate good multiplication/division code! 3 : * 4 : * -- Allen 5 : *) 6 : signature MLTREE_MULT_DIV = 7 : sig 8 : 9 : structure T : MLTREE 10 : structure I : INSTRUCTIONS 11 : structure C : CELLS 12 : sharing C = I.C 13 : sharing I.Constant = T.Constant 14 : 15 : exception TooComplex 16 : 17 : monnier 429 val multiply : {r:C.cell,i:int,d:C.cell} -> I.instruction list 18 : monnier 409 19 : (* The semantics of roundToZero{r,i,d} is: 20 : * if r >= 0 then d <- r 21 : * else d <- r + i 22 : *) 23 : 24 : val divide : { mode:T.rounding_mode, 25 : monnier 429 roundToZero : {ty:T.ty,r:C.cell,i:int,d:C.cell} 26 : monnier 409 -> unit 27 : } -> 28 : monnier 429 {r:C.cell,i:int,d:C.cell} -> I.instruction list 29 : monnier 409 30 : end