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 1181, Wed Mar 27 21:27:27 2002 UTC revision 1183, Fri Mar 29 19:09:48 2002 UTC
# Line 12  Line 12 
12   *   *
13   * Some changes:   * Some changes:
14   *   *
15   *  1.  REMU/REMS/REMT are now supported   *  1.  REMU/REMS are now supported
16   *  2.  COND is supported by generating SETcc and/or CMOVcc; this   *  2.  COND is supported by generating SETcc and/or CMOVcc; this
17   *      may require at least a Pentium II to work.   *      may require at least a Pentium II to work.
18   *  3.  Division by a constant has been optimized.   Division by   *  3.  Division by a constant has been optimized.   Division by
# Line 592  Line 592 
592                  | divide(signed, overflow, e1, e2) =                  | divide(signed, overflow, e1, e2) =
593                      divrem(signed, overflow, e1, e2, eax)                      divrem(signed, overflow, e1, e2, eax)
594    
595                fun rem(signed, overflow, e1, e2) =                (* rem never causes overflow *)
596                      divrem(signed, overflow, e1, e2, edx)                fun rem(signed, e1, e2) =
597                        divrem(signed, false, e1, e2, edx)
598    
599                    (* Makes sure the destination must be a register *)                    (* Makes sure the destination must be a register *)
600                fun dstMustBeReg f =                fun dstMustBeReg f =
# Line 875  Line 876 
876    
877               | T.MULU(32, x, y) => uMultiply(x, y)               | T.MULU(32, x, y) => uMultiply(x, y)
878               | T.DIVU(32, x, y) => divide(false, false, x, y)               | T.DIVU(32, x, y) => divide(false, false, x, y)
879               | T.REMU(32, x, y) => rem(false, false, x, y)               | T.REMU(32, x, y) => rem(false, x, y)
880    
881               | T.MULS(32, x, y) => multiply(x, y)               | T.MULS(32, x, y) => multiply(x, y)
882               | T.DIVS(T.DIV_TO_ZERO, 32, x, y) => divide(true, false, x, y)               | T.DIVS(T.DIV_TO_ZERO, 32, x, y) => divide(true, false, x, y)
883               | T.REMS(T.DIV_TO_ZERO, 32, x, y) => rem(true, false, x, y)               | T.REMS(T.DIV_TO_ZERO, 32, x, y) => rem(true, x, y)
884    
885               | T.ADDT(32, x, y) => (binaryComm(I.ADDL, x, y); trap())               | T.ADDT(32, x, y) => (binaryComm(I.ADDL, x, y); trap())
886               | T.SUBT(32, x, y) => (binary(I.SUBL, x, y); trap())               | T.SUBT(32, x, y) => (binary(I.SUBL, x, y); trap())
887               | T.MULT(32, x, y) => (multiply(x, y); trap())               | T.MULT(32, x, y) => (multiply(x, y); trap())
888               | T.DIVT(T.DIV_TO_ZERO, 32, x, y) => divide(true, true, x, y)               | T.DIVT(T.DIV_TO_ZERO, 32, x, y) => divide(true, true, x, y)
              | T.REMT(T.DIV_TO_ZERO, 32, x, y) => rem(true, true, x, y)  
889    
890               | T.ANDB(32, x, y) => binaryComm(I.ANDL, x, y)               | T.ANDB(32, x, y) => binaryComm(I.ANDL, x, y)
891               | T.ORB(32, x, y)  => binaryComm(I.ORL, x, y)               | T.ORB(32, x, y)  => binaryComm(I.ORL, x, y)

Legend:
Removed from v.1181  
changed lines
  Added in v.1183

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