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 /sml/branches/num64/compiler/Semant/prim/primop-bindings.sml
ViewVC logotype

Diff of /sml/branches/num64/compiler/Semant/prim/primop-bindings.sml

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

revision 5252, Sat Jun 1 19:56:51 2019 UTC revision 5253, Sat Jun 1 21:11:08 2019 UTC
# Line 46  Line 46 
46      val numUpdTy = p2(ar(tup[tv1, BT.intTy, tv2], BT.unitTy))      val numUpdTy = p2(ar(tup[tv1, BT.intTy, tv2], BT.unitTy))
47    
48    (* size and type of LargeWord.word *)    (* size and type of LargeWord.word *)
49      val (largeWSz, largeWTy) = if (Target.fixedIntSz = 64)      val largeWSz = 64
50            then (64, BT.word64Ty)      val largeWTy = BT.word64Ty
           else (32, BT.word32Ty)  
51    
52    (* default sizes *)    (* default sizes *)
53      val intSz = Target.defaultIntSz      val intSz = Target.defaultIntSz
# Line 424  Line 423 
423              in              in
424                prims :-:                prims :-:
425              (* use type variable for 64-bit type to force boxed representation *)              (* use type variable for 64-bit type to force boxed representation *)
426                ("int64_to_pair", p1(ar(tv1, pw32)), P.EXTERN64) :-:                ("int64_to_pair", ar(BT.int64Ty, pw32), P.EXTERN64) :-:
427                ("int64_from_pair", p1(ar(pw32, tv1)), P.INTERN64) :-:                ("int64_from_pair", ar(pw32, BT.int64Ty), P.INTERN64) :-:
428                ("word64_to_pair", p1(ar(tv1, pw32)), P.EXTERN64) :-:                ("word64_to_pair", ar(BT.word64Ty, pw32), P.EXTERN64) :-:
429                ("word64_from_pair", p1(ar(pw32, tv1)), P.INTERN64)                ("word64_from_pair", ar(pw32, BT.word64Ty), P.INTERN64)
430              end              end
431    
432  (* REAL32: FIXME *)  (* REAL32: FIXME *)
# Line 462  Line 461 
461              cmp("neq", P.NEQ)              cmp("neq", P.NEQ)
462            end            end
463    
   
464    (* primops for C FFI *)    (* primops for C FFI *)
465      val prims = let      val prims = let
466          (* representation of pointers to raw values *)          (* representation of pointers to raw values *)
# Line 552  Line 550 
550        val p = PrimopBind.defnOf bind        val p = PrimopBind.defnOf bind
551        in        in
552          Control_Print.say(concat[          Control_Print.say(concat[
553              StringCvt.padLeft #" " 24 n, " = ",              StringCvt.padLeft #" " 30 n, " = ",
554              PrimopUtil.toString p, "\n"              PrimopUtil.toString p, "\n"
555            ])            ])
556        end        end

Legend:
Removed from v.5252  
changed lines
  Added in v.5253

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