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 1346, Thu Aug 28 17:40:46 2003 UTC revision 1347, Thu Aug 28 21:59:15 2003 UTC
# Line 144  Line 144 
144        val newCCreg = C.newCell CB.CC        val newCCreg = C.newCell CB.CC
145    
146    
       val int_0       = T.I.int_0  
       val int_m0x8000 = T.I.fromInt(32, ~32768)  
       val int_0x8000  = T.I.fromInt(32,  32768)  
       val int_m0x800  = T.I.fromInt(32, ~2048)  
       val int_0x800   = T.I.fromInt(32,  2048)  
147        fun LT (x,y)    = T.I.LT(32, x, y)        fun LT (x,y)    = T.I.LT(32, x, y)
148        fun LE (x,y)    = T.I.LE(32, x, y)        fun LE (x,y)    = T.I.LE(32, x, y)
149        fun toInt mi = T.I.toInt(32, mi)        fun toInt mi = T.I.toInt(32, mi)
150        fun LI i = T.I.fromInt(32, i)        fun LI i = T.I.fromInt(32, i)
151    
152        fun signed16 mi   = LE(int_m0x8000, mi) andalso LT(mi, int_0x8000)        fun signed16 mi   = LE(~0x8000, mi) andalso LT(mi, 0x8000)
153        fun signed12 mi   = LE(int_m0x800, mi) andalso LT(mi, int_0x800)        fun signed12 mi   = LE(~0x800, mi) andalso LT(mi, 0x800)
154        fun unsigned16 mi = LE(int_0, mi) andalso LT(mi, T.I.int_0x10000)        fun unsigned16 mi = LE(0, mi) andalso LT(mi, 0x10000)
155        fun unsigned5 mi  = LE(int_0, mi) andalso LT(mi, T.I.int_32)        fun unsigned5 mi  = LE(0, mi) andalso LT(mi, 32)
156        fun unsigned6 mi  = LE(int_0, mi) andalso LT(mi, T.I.int_64)        fun unsigned6 mi  = LE(0, mi) andalso LT(mi, 64)
157    
158        fun move(rs,rd,an) =        fun move(rs,rd,an) =
159          if CB.sameColor(rs,rd) then ()          if CB.sameColor(rs,rd) then ()
# Line 337  Line 332 
332            in            in
333              case (e1, e2)              case (e1, e2)
334              of (T.ANDB(_, a1, a2), T.LI z) =>              of (T.ANDB(_, a1, a2), T.LI z) =>
335                  if T.I.isZero(z) then                  if z = 0 then
336                    (case commImmedOpnd unsigned16 (a1, a2)                    (case commImmedOpnd unsigned16 (a1, a2)
337                     of (ra, I.RegOp rb) =>                     of (ra, I.RegOp rb) =>
338                          emit(I.ARITH{oper=I.AND, ra=ra, rb=rb, rt=newReg(), Rc=true, OE=false})                          emit(I.ARITH{oper=I.AND, ra=ra, rb=rb, rt=newReg(), Rc=true, OE=false})

Legend:
Removed from v.1346  
changed lines
  Added in v.1347

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