Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/x86/mltree/x86-fp.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/mltree/x86-fp.sml

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

revision 1333, Thu May 22 17:12:13 2003 UTC revision 1334, Thu May 22 22:46:30 2003 UTC
# Line 979  Line 979 
979             fun split(targetId, edges) =             fun split(targetId, edges) =
980             let val stackIn = valOf(A.sub(bindingsIn,targetId))             let val stackIn = valOf(A.sub(bindingsIn,targetId))
981                 fun log(s, t, e) =                 fun log(s, t, e) =
982                 let val SOME stackOut = A.sub(bindingsOut,s)                     case A.sub (bindingsOut, s) of
983                 in  pr("SPLIT "^i2s s^"->"^i2s t^" "^                         SOME stackOut =>
984                           (pr("SPLIT "^i2s s^"->"^i2s t^" "^
985                        ST.stackToString stackOut^"->"^                        ST.stackToString stackOut^"->"^
986                        ST.stackToString stackIn^"\n")                             ST.stackToString stackIn^"\n"))
987                 end                       | NONE => error "split:stackOut"
988                 val _ = if debug andalso !traceOn then app log edges else ()                 val _ = if debug andalso !traceOn then app log edges else ()
989             in  if ST.depth stackIn = 0 then genPoppingCode(targetId, edges)             in  if ST.depth stackIn = 0 then genPoppingCode(targetId, edges)
990                 else genRepairCode(targetId, stackIn, edges)                 else genRepairCode(targetId, stackIn, edges)
# Line 1458  Line 1459 
1459                  * If a source is a last and unique use, then we                  * If a source is a last and unique use, then we
1460                  * can simply rename it to appropriate destination register.                  * can simply rename it to appropriate destination register.
1461                  *)                  *)
1462                 fun fcopy(I.COPY{dst,src,tmp,...}) =                 fun fcopy(I.COPY{dst,src,tmp,...}) = let
1463                 let fun loop([], [], copies, renames) = (copies, renames)                     fun loop([], [], copies, renames) = (copies, renames)
1464                       | loop(fd::fds, fs::fss, copies, renames) =                       | loop(fd::fds, fs::fss, copies, renames) =
1465                         let val fsx = CB.registerNum fs                         let val fsx = CB.registerNum fs
1466                         in  if isLastUse fsx then                         in  if isLastUse fsx then
# Line 1513  Line 1514 
1514                     | _ => ();                     | _ => ();
1515                     DONE code                     DONE code
1516                 end                 end
1517                    | fcopy _ = error "fcopy"
1518    
1519                 fun call(instr, return) = let                 fun call(instr, return) = let
1520                   val code = mark(I.INSTR instr, an)::code                   val code = mark(I.INSTR instr, an)::code

Legend:
Removed from v.1333  
changed lines
  Added in v.1334

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