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/omit-frameptr/x86omit-frameptr.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/x86/omit-frameptr/x86omit-frameptr.sml

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

revision 1008, Fri Dec 14 21:01:29 2001 UTC revision 1009, Wed Jan 9 19:44:22 2002 UTC
# Line 239  Line 239 
239             | I.PUSHW opnd => changedto(I.PUSHW(operand(opnd)), addToDelta(2))             | I.PUSHW opnd => changedto(I.PUSHW(operand(opnd)), addToDelta(2))
240             | I.PUSHB opnd => changedto(I.PUSHB(operand(opnd)), addToDelta(1))             | I.PUSHB opnd => changedto(I.PUSHB(operand(opnd)), addToDelta(1))
241             | I.POP opnd => changedto(I.POP(operand(opnd)), addToDelta(~4))             | I.POP opnd => changedto(I.POP(operand(opnd)), addToDelta(~4))
            | I.COPY{dst:CB.cell list, src:CB.cell list, tmp:I.operand option} => let  
               (* the situation where SP <- FP is somewhat complicated.  
                * The copy must be extracted, and a lea generated.  
                * Should it be before or after the parallel copy? Depends on if SP is used.  
                * However, will such a thing ever exist in a parallel copy!?  
                *)  
               fun okay(s, d, acc) =  
                 (case (which s, which d)  
                  of (FP, SP) => true  
                   | (SP, FP) => error "COPY:SP<-FP; lazy!"  
                   | (SP, OTHER) => error "COPY:SP<-OTHER"  
                   | (FP, OTHER) => error "COPY:FP<-OTHER"  
                   | (OTHER, SP) => error "COPY:OTHER<-SP"  
                   | (OTHER, FP)  => error "COPY:OTHER<-FP"  
                   | _ => acc  
                 (*esac*))  
              in changedto(instr, if ListPair.foldl okay false (dst, src) then SOME 0 else delta)  
              end  
242             | I.FBINARY{binOp:I.fbinOp, src:I.operand, dst:I.operand} =>             | I.FBINARY{binOp:I.fbinOp, src:I.operand, dst:I.operand} =>
243                unchanged(I.FBINARY{binOp=binOp, src=operand(src), dst=operand(dst)})                unchanged(I.FBINARY{binOp=binOp, src=operand(src), dst=operand(dst)})
244             | I.FIBINARY{binOp:I.fibinOp, src:I.operand} =>             | I.FIBINARY{binOp:I.fibinOp, src:I.operand} =>
# Line 302  Line 284 
284                  of NONE => (NONE, delta)                  of NONE => (NONE, delta)
285                   | SOME(i) => annotate(I.ANNOTATION{i=i, a=a}, delta)                   | SOME(i) => annotate(I.ANNOTATION{i=i, a=a}, delta)
286               end               end
287               | I.COPY{k=CB.GP, dst, src, ...} => let
288                  (* the situation where SP <- FP is somewhat complicated.
289                   * The copy must be extracted, and a lea generated.
290                   * Should it be before or after the parallel copy? Depends on if SP is used.
291                   * However, will such a thing ever exist in a parallel copy!?
292                   *)
293                  fun okay(s, d, acc) =
294                    (case (which s, which d)
295                     of (FP, SP) => true
296                      | (SP, FP) => error "COPY:SP<-FP; lazy!"
297                      | (SP, OTHER) => error "COPY:SP<-OTHER"
298                      | (FP, OTHER) => error "COPY:FP<-OTHER"
299                      | (OTHER, SP) => error "COPY:OTHER<-SP"
300                      | (OTHER, FP)  => error "COPY:OTHER<-FP"
301                      | _ => acc
302                    (*esac*))
303                 in annotate(instr, if ListPair.foldl okay false (dst, src) then SOME 0 else delta)
304                 end
305             | I.INSTR instr => doX86Instr instr             | I.INSTR instr => doX86Instr instr
306             | _ => error "doInstr"             | _ => annotate(instr, delta)                        (* unchanged *)
307        end (*doInstr*)        end (*doInstr*)
308    
309        (* rewrite instructions *)        (* rewrite instructions *)

Legend:
Removed from v.1008  
changed lines
  Added in v.1009

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