Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/mid-to-low/mk-low-ir.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/mid-to-low/mk-low-ir.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3745, Tue Apr 12 10:40:01 2016 UTC revision 3746, Tue Apr 12 11:49:43 2016 UTC
# Line 36  Line 36 
36      val realDiv : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var      val realDiv : AvailRHS.t * LowIR.var * LowIR.var -> LowIR.var
37      val realNeg : AvailRHS.t * LowIR.var -> LowIR.var      val realNeg : AvailRHS.t * LowIR.var -> LowIR.var
38    
39      (* scalar math functions *)
40        val realSqrt   : AvailRHS.t * LowIR.var -> LowIR.var
41        val realCos    : AvailRHS.t * LowIR.var -> LowIR.var
42        val realArcCos : AvailRHS.t * LowIR.var -> LowIR.var
43        val realSin    : AvailRHS.t * LowIR.var -> LowIR.var
44        val realArcSin : AvailRHS.t * LowIR.var -> LowIR.var
45        val realTan    : AvailRHS.t * LowIR.var -> LowIR.var
46        val realArcTan : AvailRHS.t * LowIR.var -> LowIR.var
47    
48    (* vector arithmetic *)    (* vector arithmetic *)
49      val vecAdd   : AvailRHS.t * int * LowIR.var * LowIR.var -> LowIR.var      val vecAdd   : AvailRHS.t * int * LowIR.var * LowIR.var -> LowIR.var
50      val vecSub   : AvailRHS.t * int * LowIR.var * LowIR.var -> LowIR.var      val vecSub   : AvailRHS.t * int * LowIR.var * LowIR.var -> LowIR.var
# Line 100  Line 109 
109    
110    (* scalar arithmetic *)    (* scalar arithmetic *)
111      local      local
112          fun scalarOp1 rator (avail, x) = add (avail, "r", Ty.realTy, IR.OP(rator, [x]))
113        fun scalarOp2 rator (avail, x, y) = add (avail, "r", Ty.realTy, IR.OP(rator, [x, y]))        fun scalarOp2 rator (avail, x, y) = add (avail, "r", Ty.realTy, IR.OP(rator, [x, y]))
114      in      in
115      val realAdd = scalarOp2 Op.RAdd      val realAdd = scalarOp2 Op.RAdd
116      val realSub = scalarOp2 Op.RSub      val realSub = scalarOp2 Op.RSub
117      val realMul = scalarOp2 Op.RMul      val realMul = scalarOp2 Op.RMul
118      val realDiv = scalarOp2 Op.RDiv      val realDiv = scalarOp2 Op.RDiv
119      fun realNeg (avail, x) = add (avail, "r", Ty.realTy, IR.OP(Op.RNeg, [x]))      val realNeg = scalarOp1 Op.RNeg
120        val realSqrt = scalarOp1 Op.Sqrt
121        val realCos = scalarOp1 Op.Cos
122        val realArcCos = scalarOp1 Op.ArcCos
123        val realSin = scalarOp1 Op.Sin
124        val realArcSin = scalarOp1 Op.ArcSin
125        val realTan = scalarOp1 Op.Tan
126        val realArcTan = scalarOp1 Op.ArcTan
127      end (* local *)      end (* local *)
128    
129    (* vector arithmetic *)    (* vector arithmetic *)

Legend:
Removed from v.3745  
changed lines
  Added in v.3746

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