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

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

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

revision 1155, Wed Mar 20 20:52:51 2002 UTC revision 1156, Thu Mar 21 22:01:11 2002 UTC
# Line 172  Line 172 
172         | LOCK_XADDL "lock\n\txaddl"         | LOCK_XADDL "lock\n\txaddl"
173    
174        (* One operand opcodes *)        (* One operand opcodes *)
175        datatype multDivOp! = MULL1 "mull" | IDIVL1 "idivl" | DIVL1 "divl"        datatype multDivOp! =
176                   IMULL1 "imull" | MULL1 "mull" | IDIVL1 "idivl" | DIVL1 "divl"
177    
178        datatype unaryOp! = DECL | INCL | NEGL | NOTL        datatype unaryOp! = DECL | INCL | NEGL | NOTL
179                          | DECW | INCW | NEGW | NOTW                          | DECW | INCW | NEGW | NOTW
# Line 182  Line 183 
183                          | LOCK_NEGL "lock\n\tnegl"                          | LOCK_NEGL "lock\n\tnegl"
184                          | LOCK_NOTL "lock\n\tnotl"                          | LOCK_NOTL "lock\n\tnotl"
185    
186          datatype shiftOp! = SHLDL | SHRDL
187    
188        datatype bitOp! = BTW        datatype bitOp! = BTW
189                        | BTL                        | BTL
190                        | LOCK_BTW "lock\n\tbtw"                        | LOCK_BTW "lock\n\tbtw"
# Line 602  Line 605 
605        val emit_addr = emit_operand        val emit_addr = emit_operand
606        val emit_src1 = emit_operand        val emit_src1 = emit_operand
607        val emit_ea = emit_operand        val emit_ea = emit_operand
608          val emit_count = emit_operand
609    end (* Assembly *)    end (* Assembly *)
610    
611    
# Line 709  Line 713 
713               | _ => ``<binOp>\t<src>, <dst>''               | _ => ``<binOp>\t<src>, <dst>''
714               )               )
715          (*rtl: ``<binOp>''*)          (*rtl: ``<binOp>''*)
716        | SHIFT of {shiftOp:shiftOp, src:operand, dst:operand, count:operand}
717            asm: (case count of (* must be %ecx if it is a register *)
718                    I.Direct ecx => ``<shiftOp>\t<src>, <dst>''
719                  | _            => ``<shiftOp>\t<src>, <count>, <dst>''
720                 )
721    
722      | CMPXCHG of {lock:bool, sz:isize, src: operand, dst:operand}      | CMPXCHG of {lock:bool, sz:isize, src: operand, dst:operand}
723          asm: (if lock then ``lock\n\t'' else ();          asm: (if lock then ``lock\n\t'' else ();
# Line 725  Line 734 
734    
735      | MUL3 of {dst: $GP, src2: Int32.int, src1:operand}      | MUL3 of {dst: $GP, src2: Int32.int, src1:operand}
736          (* Fermin: constant operand must go first *)          (* Fermin: constant operand must go first *)
737          asm: ``imul\t$<emitInt32 src2>, <src1>, <dst>''          asm: ``imull\t$<emitInt32 src2>, <src1>, <dst>''
738    
739      | UNARY of {unOp:unaryOp, opnd:operand}      | UNARY of {unOp:unaryOp, opnd:operand}
740          asm: ``<unOp>\t<opnd>''          asm: ``<unOp>\t<opnd>''
# Line 796  Line 805 
805      | FCOMPP      | FCOMPP
806          ``fcompp''          ``fcompp''
807    
808        | FCOMI of operand
809            ``fcomi\t<operand>''
810    
811        | FCOMIP of operand
812            ``fcomip\t<operand>''
813    
814        | FUCOMI of operand
815            ``fucomi\t<operand>''
816    
817        | FUCOMIP of operand
818            ``fucomip\t<operand>''
819    
820      | FXCH of {opnd: $FP}      | FXCH of {opnd: $FP}
821          ``fxch\t<opnd>''          ``fxch\t<opnd>''
822    
# Line 889  Line 910 
910          ``<unOp><fsize>\t<src>, <dst>''          ``<unOp><fsize>\t<src>, <dst>''
911          (* rtl: [[unOp fsize]] *)          (* rtl: [[unOp fsize]] *)
912    
913      | FCMP of {fsize:fsize, lsrc:operand, rsrc:operand}      | FCMP of {i:bool,fsize:fsize, lsrc:operand, rsrc:operand}
914          ``fcmp<fsize>\t<lsrc>, <rsrc>''          asm: (if i then ``fcmp'' else ``fcmpi''; ``<fsize>\t<lsrc>, <rsrc>'')
915          (* rtl: [["FCMP" fsize]] *)          (* rtl: [["FCMP" fsize]] *)
916    
917     (* misc *)     (* misc *)

Legend:
Removed from v.1155  
changed lines
  Added in v.1156

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