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/SMLNJ/src/compiler/CodeGen/main/mlriscGen.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/compiler/CodeGen/main/mlriscGen.sml

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

revision 288, Sat May 22 21:01:25 1999 UTC revision 289, Sat May 22 21:01:25 1999 UTC
# Line 90  Line 90 
90    
91      fun genCluster(cluster) = let      fun genCluster(cluster) = let
92        val _ = if !Control.debugging then app PPCps.printcps0 cluster else ()        val _ = if !Control.debugging then app PPCps.printcps0 cluster else ()
   
93        val sizeOfCluster = length cluster        val sizeOfCluster = length cluster
94    
95        (* per-cluster tables *)        (* per-cluster tables *)
# Line 240  Line 239 
239        end        end
240    
241        fun updtHeapPtr(hp) = let        fun updtHeapPtr(hp) = let
242          fun advBy hp = emit(M.MV(allocptrR, M.ADD(C.allocptr, M.LI hp)))          fun advBy hp =
243              emit(M.MV(allocptrR, M.ADD(C.allocptr, M.LI hp)))
244        in        in
245          (* Keep allocation pointer aligned on odd boundary *)          (* Keep allocation pointer aligned on odd boundary *)
246          (* Note: We have accounted for the extra space this eats up in  
247           *    limit.sml          (*
248             * If the allocation pointer didn't need alignment in the
249             * first place, then this just chews up an extra word
250             * unnecessarily. This may be significant as updtHeapPtr
251             * is called after every trapping instruction.
252             *
253             * The right thing to do is to add another parameter to the
254             * gen function saying if the allocation pointer should be
255             * kept aligned; I am not going to do this unless the wasted
256             * space really is a problem.
257           *)           *)
258          if hp = 0 then ()          if hp = 0 then ()
259          else if Word.andb(Word.fromInt hp, 0w4) <> 0w0 then advBy(hp+4)          else if Word.andb(Word.fromInt hp, 0w4) <> 0w0 then advBy(hp+4)
# Line 1153  Line 1162 
1162    
1163  (*  (*
1164   * $Log: mlriscGen.sml,v $   * $Log: mlriscGen.sml,v $
1165     * Revision 1.15  1999/04/16 14:53:01  george
1166     *   changes to support new x86 code generator
1167     *
1168   * Revision 1.14  1999/03/22 17:22:32  george   * Revision 1.14  1999/03/22 17:22:32  george
1169   *   Changes to support new GC API   *   Changes to support new GC API
1170   *   *

Legend:
Removed from v.288  
changed lines
  Added in v.289

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