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 1054, Wed Feb 6 19:27:27 2002 UTC revision 1055, Thu Feb 7 20:38:59 2002 UTC
# Line 1  Line 1 
1  (* WARNING: this is generated by running 'nowhere x86Peephole.peep'.  (* WARNING: this is generated by running 'nowhere x86Peephole.peep'.
2   * Do not edit this file directly.   * Do not edit this file directly.
3   * Version 1.2   * Version 1.2.2
4   *)   *)
5    
6  (*#line 20.1 "x86Peephole.peep"*)  (*#line 20.1 "x86Peephole.peep"*)
# Line 34  Line 34 
34    
35  (*#line 35.8 "x86Peephole.peep"*)  (*#line 35.8 "x86Peephole.peep"*)
36             fun isZero (I.Immed n) = n = 0             fun isZero (I.Immed n) = n = 0
37               | isZero (I.ImmedLabel le) = (Eval.valueOf le) = 0               | isZero (I.ImmedLabel le) = ((Eval.valueOf le) = 0)handle _ => false
38    
39               | isZero _ = false               | isZero _ = false
40    
41  (*#line 39.8 "x86Peephole.peep"*)  (*#line 39.8 "x86Peephole.peep"*)
# Line 42  Line 43 
43               | isZeroOpt (SOME opn) = isZero opn               | isZeroOpt (SOME opn) = isZero opn
44    
45  (*#line 42.8 "x86Peephole.peep"*)  (*#line 42.8 "x86Peephole.peep"*)
46               fun isZeroLE le = ((Eval.valueOf le) = 0)handle _ => false
47    
48    
49    (*#line 44.8 "x86Peephole.peep"*)
50             fun loop (code, instrs) =             fun loop (code, instrs) =
51                 let val v_34 = code                 let val v_34 = code
52                     fun state_9 (v_0, v_3) =                     fun state_9 (v_0, v_3) =
# Line 52  Line 57 
57                     fun state_22 (v_0, v_17, v_3) =                     fun state_22 (v_0, v_17, v_3) =
58                         let val le = v_17                         let val le = v_17
59                             and rest = v_3                             and rest = v_3
60                         in (if ((Eval.valueOf le) = 0)                         in (if (isZeroLE le)
61                               then (loop (rest, instrs))                               then (loop (rest, instrs))
62                               else (state_9 (v_0, v_3)))                               else (state_9 (v_0, v_3)))
63                         end                         end
# Line 208  Line 213 
213                                           and le = v_21                                           and le = v_21
214                                           and r32 = v_20                                           and r32 = v_20
215                                           and rest = v_3                                           and rest = v_3
216                                       in (if (((Eval.valueOf le) = 0) andalso (CBase.sameColor (r32, base)))                                       in (if ((isZeroLE le) andalso (CBase.sameColor (r32, base)))
217                                             then (loop (rest, instrs))                                             then (loop (rest, instrs))
218                                             else (state_9 (v_0, v_3)))                                             else (state_9 (v_0, v_3)))
219                                       end                                       end

Legend:
Removed from v.1054  
changed lines
  Added in v.1055

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