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/x86/instructions/x86Peephole.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/instructions/x86Peephole.sml

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

revision 682, Tue Jul 4 06:25:51 2000 UTC revision 683, Wed Jul 5 00:42:19 2000 UTC
# Line 30  Line 30 
30                      loop(rest, instrs)                      loop(rest, instrs)
31                 else loop(rest, i::instrs)                 else loop(rest, i::instrs)
32    
33                 (*   addl n, %esp; subl m, %esp
34                  * => addl (n-m), %esp     ;; when m < n
35                  * => -                    ;; when m = n
36                  * => subl (m-n), %esp     ;; when m > n
37                  *)
38               | ((i as I.BINARY{binOp=I.SUBL, src=I.Immed m, dst=I.Direct 4})
39                  :: (j as I.BINARY{binOp=I.ADDL, src=I.Immed n, dst=I.Direct 4})
40                  :: rest) => if (m < n)
41                      then loop(rest,
42                        I.BINARY{binOp=I.ADDL, src=I.Immed(n-m), dst=I.Direct 4}::instrs)
43                    else if (m = n)
44                      then loop (rest, instrs)
45                      else loop(rest,
46                        I.BINARY{binOp=I.SUBL, src=I.Immed(m-n), dst=I.Direct 4}::instrs)
47    
48    
49               (* push folding:               (* push folding:
50                *   subl 4, %esp                *   subl 4, %esp
51                *   movl src, 0(%esp)  (where src <> %esp !!! )                *   movl src, 0(%esp)  (where src <> %esp !!! )

Legend:
Removed from v.682  
changed lines
  Added in v.683

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