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

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

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

revision 593, Tue Apr 4 07:26:33 2000 UTC revision 601, Thu Apr 6 04:38:14 2000 UTC
# Line 681  Line 681 
681    
682                    (* Add n to rd *)                    (* Add n to rd *)
683                fun addN n =                fun addN n =
684                  mark(I.BINARY{binOp=I.ADDL, src=I.Immed(toInt32 n),                let val n = operand n
685                                dst=rdOpnd}, an)                    val src = if isMemReg rd then immedOrReg n else n
686                  in  mark(I.BINARY{binOp=I.ADDL, src=src, dst=rdOpnd}, an) end
687    
688            in  case exp of            in  case exp of
689                 T.REG(_,rs) =>                 T.REG(_,rs) =>
# Line 708  Line 709 
709               | T.ADD(32, (T.LI 1|T.LI32 0w1), e) => unary(I.INCL, e)               | T.ADD(32, (T.LI 1|T.LI32 0w1), e) => unary(I.INCL, e)
710               | T.ADD(32, e, T.LI ~1) => unary(I.DECL, e)               | T.ADD(32, e, T.LI ~1) => unary(I.DECL, e)
711               | T.ADD(32, T.LI ~1, e) => unary(I.DECL, e)               | T.ADD(32, T.LI ~1, e) => unary(I.DECL, e)
712               | T.ADD(32, e1 as T.REG(_, rs), e2 as T.LI n) =>               | T.ADD(32, e1 as T.REG(_, rs), e2) =>
713                    if rs = rd then addN n else addition(e1, e2)                    if rs = rd then addN e2 else addition(e1, e2)
714               | T.ADD(32, e1 as T.LI n, e2 as T.REG(_, rs)) =>               | T.ADD(32, e1, e2 as T.REG(_,rs)) =>
715                    if rs = rd then addN n else addition(e1, e2)                    if rs = rd then addN e1 else addition(e1, e2)
716               | T.ADD(32, e1, e2) => addition(e1, e2)               | T.ADD(32, e1, e2) => addition(e1, e2)
717    
718                 (* 32-bit subtraction *)                 (* 32-bit subtraction *)

Legend:
Removed from v.593  
changed lines
  Added in v.601

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