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
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 409 - (view) (download) (as text)

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 :     val multiply : {r:C.register,i:int,d:C.register} -> I.instruction list
18 :    
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 :     roundToZero : {ty:T.ty,r:C.register,i:int,d:C.register}
26 :     -> unit
27 :     } ->
28 :     {r:C.register,i:int,d:C.register} -> I.instruction list
29 :    
30 :     end

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