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

SCM Repository

[smlnj] Diff of /MLRISC/trunk/amd64/mltree/amd64-gen.sml
ViewVC logotype

Diff of /MLRISC/trunk/amd64/mltree/amd64-gen.sml

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

revision 2637, Wed May 30 20:23:59 2007 UTC revision 2638, Wed May 30 21:34:40 2007 UTC
# Line 830  Line 830 
830                mark (I.FBINOP {binOp=binOp, dst=d, src=bReg}, an)                mark (I.FBINOP {binOp=binOp, dst=d, src=bReg}, an)
831              end              end
832    
833            and fsqrt (fty, d, a, an) = let
834                val aOpnd = foperand (fty, a)
835                val oper = (case fty
836                      of 32 => I.FSQRTS
837                       | 64 => I.FSQRTD
838                       | _ => error "fsqrt"
839                      (* end case *))
840                in
841                  mark (oper {src=aOpnd, dst=I.FDirect d}, an)
842                end
843    
844          and convertf2f (fromTy, toTy, e, d, an) = let          and convertf2f (fromTy, toTy, e, d, an) = let
845              val fmvOp = (case (fromTy, toTy)              val fmvOp = (case (fromTy, toTy)
846              of (32, 64) => I.CVTSS2SD              of (32, 64) => I.CVTSS2SD
# Line 866  Line 877 
877                 (* unary operators *)                 (* unary operators *)
878                 | T.FNEG (_, a) => raise Fail "todo"                 | T.FNEG (_, a) => raise Fail "todo"
879                 | T.FABS (_, a) => raise Fail "todo"                 | T.FABS (_, a) => raise Fail "todo"
880                 | T.FSQRT (_, a) => raise Fail "todo"                 | T.FSQRT (fty, a) => fsqrt (fty, d, a, an)
881                 (* conversions *)                 (* conversions *)
882                 | T.CVTF2F (fTy, tTy, e) => convertf2f (fTy, tTy, e, d, an)                 | T.CVTF2F (fTy, tTy, e) => convertf2f (fTy, tTy, e, d, an)
883                 | T.CVTI2F (fty, ty, e) => converti2f (fty, ty, e, d, an)                 | T.CVTI2F (fty, ty, e) => converti2f (fty, ty, e, d, an)

Legend:
Removed from v.2637  
changed lines
  Added in v.2638

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