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 623, Thu Apr 20 17:24:37 2000 UTC revision 624, Fri Apr 21 03:06:21 2000 UTC
# Line 39  Line 39 
39    type instrStream = (I.instruction,C.regmap,C.cellset) T.stream    type instrStream = (I.instruction,C.regmap,C.cellset) T.stream
40    type mltreeStream = (T.stm,C.regmap,T.mlrisc list) T.stream    type mltreeStream = (T.stm,C.regmap,T.mlrisc list) T.stream
41    
42      val (intTy,naturalWidths) = if bit64mode then (64,[32,64]) else (32,[32])
43    structure Gen = MLTreeGen    structure Gen = MLTreeGen
44      (structure T = T      (structure T = T
45       val (intTy,naturalWidths) = if bit64mode then (64,[32,64]) else (32,[32])       val intTy = intTy
46         val naturalWidths = naturalWidths
47       datatype rep = SE | ZE | NEITHER       datatype rep = SE | ZE | NEITHER
48       val rep = NEITHER       val rep = NEITHER
49      )      )
# Line 366  Line 368 
368    
369          (* Emit an integer store *)          (* Emit an integer store *)
370        and store(ty, ea, data, mem, an) =        and store(ty, ea, data, mem, an) =
371            let val (st,size) = case (ty,Gen.size ea) of            let val (st,size) = case (ty,Gen.Size.size ea) of
372                           (8,32)  => (I.STB,signed16)                           (8,32)  => (I.STB,signed16)
373                         | (8,64)  => (I.STBE,signed12)                         | (8,64)  => (I.STBE,signed12)
374                         | (16,32) => (I.STH,signed16)                         | (16,32) => (I.STH,signed16)
# Line 380  Line 382 
382    
383          (* Emit a floating point store *)          (* Emit a floating point store *)
384        and fstore(ty, ea, data, mem, an) =        and fstore(ty, ea, data, mem, an) =
385            let val (st,size) = case (ty,Gen.size ea) of            let val (st,size) = case (ty,Gen.Size.size ea) of
386                           (32,32) => (I.STFS,signed16)                           (32,32) => (I.STFS,signed16)
387                         | (32,64) => (I.STFSE,signed12)                         | (32,64) => (I.STFSE,signed12)
388                         | (64,32) => (I.STFD,signed16)                         | (64,32) => (I.STFD,signed16)
# Line 421  Line 423 
423        (* Generate a load and annotate the instruction *)        (* Generate a load and annotate the instruction *)
424        and load(ld32, ld64, ea, mem, rt, an) =        and load(ld32, ld64, ea, mem, rt, an) =
425            let val (ld,size) =            let val (ld,size) =
426                if bit64mode andalso Gen.size ea = 64                if bit64mode andalso Gen.Size.size ea = 64
427                then (ld64,signed12)                then (ld64,signed12)
428                else (ld32,signed16)                else (ld32,signed16)
429                val (r, disp) = addr(size,ea)                val (r, disp) = addr(size,ea)
# Line 627  Line 629 
629        (* Generate a floating point load *)        (* Generate a floating point load *)
630        and fload(ld32, ld64, ea, mem, ft, an) =        and fload(ld32, ld64, ea, mem, ft, an) =
631            let val (ld,size) =            let val (ld,size) =
632                 if bit64mode andalso Gen.size ea = 64 then (ld64,signed12)                 if bit64mode andalso Gen.Size.size ea = 64 then (ld64,signed12)
633                 else (ld32,signed16)                 else (ld32,signed16)
634                val (r, disp) = addr(size,ea)                val (r, disp) = addr(size,ea)
635            in  mark(I.LF{ld=ld, ft=ft, ra=r, d=disp, mem=mem}, an) end            in  mark(I.LF{ld=ld, ft=ft, ra=r, d=disp, mem=mem}, an) end

Legend:
Removed from v.623  
changed lines
  Added in v.624

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