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 4861, Wed Sep 26 12:04:42 2018 UTC revision 4862, Wed Sep 26 12:53:42 2018 UTC
# Line 82  Line 82 
82          g(mlrisc, C.empty)          g(mlrisc, C.empty)
83        end        end
84    
85      (* conversions *)    (* conversions to fixed-precision integers*)
     val itow = Word.fromInt  
     val wtoi = Word.toInt  
86      fun toInt32 i = T.I.toInt32(32, i)      fun toInt32 i = T.I.toInt32(32, i)
87      fun toInt64 i = T.I.toInt64(64, i)      fun toInt64 i = T.I.toInt64(64, i)
     val w32toi32 = Word32.toLargeIntX  
     val i32tow32 = Word32.fromLargeInt  
     (* One day, this is going to bite us when precision(LargeInt)>32 *)  
     fun wToInt32 w = Int32.fromLarge(Word32.toLargeIntX w)  
88    
89      fun fitsIn32Bits z = z < IntInf.<< (1, 0w31)  (* QUESTION: what about negative numbers? *)
90        fun fitsIn32Bits (z : IntInf.int) = (z < 0x80000000)
91    
92      fun move64 (src, dst) = I.move {mvOp=I.MOVABSQ, src=src, dst=dst}      fun move64 (src, dst) = I.move {mvOp=I.MOVABSQ, src=src, dst=dst}
93    

Legend:
Removed from v.4861  
changed lines
  Added in v.4862

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