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/trunk/src/MLRISC/ppc/mltree/ppc.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/ppc/mltree/ppc.sml

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

revision 901, Tue Aug 14 19:21:17 2001 UTC revision 909, Fri Aug 24 17:48:53 2001 UTC
# Line 30  Line 30 
30    structure CB  = CellsBasis    structure CB  = CellsBasis
31    structure W32 = Word32    structure W32 = Word32
32    structure A   = MLRiscAnnotations    structure A   = MLRiscAnnotations
33      structure CFG = ExtensionComp.CFG
34    
35    fun error msg = MLRiscErrorMsg.error("PPC",msg)    fun error msg = MLRiscErrorMsg.error("PPC",msg)
36    
37    type instrStream = (I.instruction,CB.CellSet.cellset) T.stream    type instrStream = (I.instruction, CB.CellSet.cellset, CFG.cfg) T.stream
38    type mltreeStream = (T.stm,T.mlrisc list) T.stream    type mltreeStream = (T.stm, T.mlrisc list, CFG.cfg) T.stream
39    
40    
41    val (intTy,naturalWidths) = if bit64mode then (64,[32,64]) else (32,[32])    val (intTy,naturalWidths) = if bit64mode then (64,[32,64]) else (32,[32])
# Line 156  Line 157 
157                                       | _ => SOME(I.FDirect(newFreg()))},an)                                       | _ => SOME(I.FDirect(newFreg()))},an)
158    
159        fun emitBranch{bo, bf, bit, addr, LK} =        fun emitBranch{bo, bf, bit, addr, LK} =
160        let val fallThrLab = Label.newLabel""        let val fallThrLab = Label.anon()
161            val fallThrOpnd = I.LabelOp(T.LABEL fallThrLab)            val fallThrOpnd = I.LabelOp(T.LABEL fallThrLab)
162        in        in
163            emit(I.BC{bo=bo, bf=bf, bit=bit, addr=addr, LK=LK, fall=fallThrOpnd});            emit(I.BC{bo=bo, bf=bf, bit=bit, addr=addr, LK=LK, fall=fallThrOpnd});
# Line 419  Line 420 
420        (*  Generate an overflow trap *)        (*  Generate an overflow trap *)
421        and overflowTrap() =        and overflowTrap() =
422            let val label = case !trapLabel of            let val label = case !trapLabel of
423                              NONE => let val l = Label.newLabel ""                              NONE => let val l = Label.anon()
424                                      in  trapLabel := SOME l; l end                                      in  trapLabel := SOME l; l end
425                            | SOME l => l                            | SOME l => l
426            in  emitBranch{bo=I.TRUE, bf=CR0, bit=I.SO, LK=false,            in  emitBranch{bo=I.TRUE, bf=CR0, bit=I.SO, LK=false,

Legend:
Removed from v.901  
changed lines
  Added in v.909

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