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

Diff of /sml/trunk/src/MLRISC/x86/instructions/x86Instr.sml

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

revision 999, Tue Nov 27 06:28:37 2001 UTC revision 1003, Fri Dec 7 02:45:32 2001 UTC
# Line 8  Line 8 
8  signature X86INSTR =  signature X86INSTR =
9  sig  sig
10     structure C : X86CELLS     structure C : X86CELLS
11       structure CB : CELLS_BASIS
12     structure T : MLTREE     structure T : MLTREE
13     structure Constant: CONSTANT     structure Constant: CONSTANT
14     structure Region : REGION     structure Region : REGION
# Line 221  Line 222 
222     | I16     | I16
223     | I32     | I32
224     | I64     | I64
225     datatype instruction =     datatype instr =
226       NOP       NOP
227     | JMP of operand * Label.label list     | JMP of operand * Label.label list
228     | JCC of {cond:cond, opnd:operand}     | JCC of {cond:cond, opnd:operand}
# Line 292  Line 293 
293     | FCMP of {fsize:fsize, lsrc:operand, rsrc:operand}     | FCMP of {fsize:fsize, lsrc:operand, rsrc:operand}
294     | SAHF     | SAHF
295     | LAHF     | LAHF
    | ANNOTATION of {i:instruction, a:Annotations.annotation}  
296     | SOURCE of {}     | SOURCE of {}
297     | SINK of {}     | SINK of {}
298     | PHI of {}     | PHI of {}
299       and instruction =
300         LIVE of {regs: C.cellset, spilled: C.cellset}
301       | KILL of {regs: C.cellset, spilled: C.cellset}
302       | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
303       | ANNOTATION of {i:instruction, a:Annotations.annotation}
304       | INSTR of instr
305       val nop : instruction
306       val jmp : operand * Label.label list -> instruction
307       val jcc : {cond:cond, opnd:operand} -> instruction
308       val call : {opnd:operand, defs:C.cellset, uses:C.cellset, return:C.cellset,
309          cutsTo:Label.label list, mem:Region.region, pops:Int32.int} -> instruction
310       val enter : {src1:operand, src2:operand} -> instruction
311       val leave : instruction
312       val ret : operand option -> instruction
313       val move : {mvOp:move, src:operand, dst:operand} -> instruction
314       val lea : {r32:CellsBasis.cell, addr:operand} -> instruction
315       val cmpl : {lsrc:operand, rsrc:operand} -> instruction
316       val cmpw : {lsrc:operand, rsrc:operand} -> instruction
317       val cmpb : {lsrc:operand, rsrc:operand} -> instruction
318       val testl : {lsrc:operand, rsrc:operand} -> instruction
319       val testw : {lsrc:operand, rsrc:operand} -> instruction
320       val testb : {lsrc:operand, rsrc:operand} -> instruction
321       val bitop : {bitOp:bitOp, lsrc:operand, rsrc:operand} -> instruction
322       val binary : {binOp:binaryOp, src:operand, dst:operand} -> instruction
323       val cmpxchg : {lock:bool, sz:isize, src:operand, dst:operand} -> instruction
324       val multdiv : {multDivOp:multDivOp, src:operand} -> instruction
325       val mul3 : {dst:CellsBasis.cell, src2:Int32.int, src1:operand} -> instruction
326       val unary : {unOp:unaryOp, opnd:operand} -> instruction
327       val set : {cond:cond, opnd:operand} -> instruction
328       val cmov : {cond:cond, src:operand, dst:CellsBasis.cell} -> instruction
329       val pushl : operand -> instruction
330       val pushw : operand -> instruction
331       val pushb : operand -> instruction
332       val pushfd : instruction
333       val popfd : instruction
334       val pop : operand -> instruction
335       val cdq : instruction
336       val into : instruction
337       val copy : {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, tmp:operand option} -> instruction
338       val fcopy : {dst:(CellsBasis.cell) list, src:(CellsBasis.cell) list, tmp:operand option} -> instruction
339       val fbinary : {binOp:fbinOp, src:operand, dst:operand} -> instruction
340       val fibinary : {binOp:fibinOp, src:operand} -> instruction
341       val funary : funOp -> instruction
342       val fucom : operand -> instruction
343       val fucomp : operand -> instruction
344       val fucompp : instruction
345       val fcompp : instruction
346       val fxch : {opnd:CellsBasis.cell} -> instruction
347       val fstpl : operand -> instruction
348       val fstps : operand -> instruction
349       val fstpt : operand -> instruction
350       val fstl : operand -> instruction
351       val fsts : operand -> instruction
352       val fld1 : instruction
353       val fldl2e : instruction
354       val fldl2t : instruction
355       val fldlg2 : instruction
356       val fldln2 : instruction
357       val fldpi : instruction
358       val fldz : instruction
359       val fldl : operand -> instruction
360       val flds : operand -> instruction
361       val fldt : operand -> instruction
362       val fild : operand -> instruction
363       val fildl : operand -> instruction
364       val fildll : operand -> instruction
365       val fnstsw : instruction
366       val fenv : {fenvOp:fenvOp, opnd:operand} -> instruction
367       val fmove : {fsize:fsize, src:operand, dst:operand} -> instruction
368       val fiload : {isize:isize, ea:operand, dst:operand} -> instruction
369       val fbinop : {fsize:fsize, binOp:fbinOp, lsrc:operand, rsrc:operand, dst:operand} -> instruction
370       val fibinop : {isize:isize, binOp:fibinOp, lsrc:operand, rsrc:operand, dst:operand} -> instruction
371       val funop : {fsize:fsize, unOp:funOp, src:operand, dst:operand} -> instruction
372       val fcmp : {fsize:fsize, lsrc:operand, rsrc:operand} -> instruction
373       val sahf : instruction
374       val lahf : instruction
375       val source : {} -> instruction
376       val sink : {} -> instruction
377       val phi : {} -> instruction
378  end  end
379    
380  functor X86Instr(T: MLTREE  functor X86Instr(T: MLTREE
381                  ) : X86INSTR =                  ) : X86INSTR =
382  struct  struct
383     structure C = X86Cells     structure C = X86Cells
384       structure CB = CellsBasis
385     structure T = T     structure T = T
386     structure Region = T.Region     structure Region = T.Region
387     structure Constant = T.Constant     structure Constant = T.Constant
# Line 513  Line 593 
593     | I16     | I16
594     | I32     | I32
595     | I64     | I64
596     datatype instruction =     datatype instr =
597       NOP       NOP
598     | JMP of operand * Label.label list     | JMP of operand * Label.label list
599     | JCC of {cond:cond, opnd:operand}     | JCC of {cond:cond, opnd:operand}
# Line 584  Line 664 
664     | FCMP of {fsize:fsize, lsrc:operand, rsrc:operand}     | FCMP of {fsize:fsize, lsrc:operand, rsrc:operand}
665     | SAHF     | SAHF
666     | LAHF     | LAHF
    | ANNOTATION of {i:instruction, a:Annotations.annotation}  
667     | SOURCE of {}     | SOURCE of {}
668     | SINK of {}     | SINK of {}
669     | PHI of {}     | PHI of {}
670       and instruction =
671         LIVE of {regs: C.cellset, spilled: C.cellset}
672       | KILL of {regs: C.cellset, spilled: C.cellset}
673       | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
674       | ANNOTATION of {i:instruction, a:Annotations.annotation}
675       | INSTR of instr
676       val nop = INSTR NOP
677       and jmp = INSTR o JMP
678       and jcc = INSTR o JCC
679       and call = INSTR o CALL
680       and enter = INSTR o ENTER
681       and leave = INSTR LEAVE
682       and ret = INSTR o RET
683       and move = INSTR o MOVE
684       and lea = INSTR o LEA
685       and cmpl = INSTR o CMPL
686       and cmpw = INSTR o CMPW
687       and cmpb = INSTR o CMPB
688       and testl = INSTR o TESTL
689       and testw = INSTR o TESTW
690       and testb = INSTR o TESTB
691       and bitop = INSTR o BITOP
692       and binary = INSTR o BINARY
693       and cmpxchg = INSTR o CMPXCHG
694       and multdiv = INSTR o MULTDIV
695       and mul3 = INSTR o MUL3
696       and unary = INSTR o UNARY
697       and set = INSTR o SET
698       and cmov = INSTR o CMOV
699       and pushl = INSTR o PUSHL
700       and pushw = INSTR o PUSHW
701       and pushb = INSTR o PUSHB
702       and pushfd = INSTR PUSHFD
703       and popfd = INSTR POPFD
704       and pop = INSTR o POP
705       and cdq = INSTR CDQ
706       and into = INSTR INTO
707       and copy = INSTR o COPY
708       and fcopy = INSTR o FCOPY
709       and fbinary = INSTR o FBINARY
710       and fibinary = INSTR o FIBINARY
711       and funary = INSTR o FUNARY
712       and fucom = INSTR o FUCOM
713       and fucomp = INSTR o FUCOMP
714       and fucompp = INSTR FUCOMPP
715       and fcompp = INSTR FCOMPP
716       and fxch = INSTR o FXCH
717       and fstpl = INSTR o FSTPL
718       and fstps = INSTR o FSTPS
719       and fstpt = INSTR o FSTPT
720       and fstl = INSTR o FSTL
721       and fsts = INSTR o FSTS
722       and fld1 = INSTR FLD1
723       and fldl2e = INSTR FLDL2E
724       and fldl2t = INSTR FLDL2T
725       and fldlg2 = INSTR FLDLG2
726       and fldln2 = INSTR FLDLN2
727       and fldpi = INSTR FLDPI
728       and fldz = INSTR FLDZ
729       and fldl = INSTR o FLDL
730       and flds = INSTR o FLDS
731       and fldt = INSTR o FLDT
732       and fild = INSTR o FILD
733       and fildl = INSTR o FILDL
734       and fildll = INSTR o FILDLL
735       and fnstsw = INSTR FNSTSW
736       and fenv = INSTR o FENV
737       and fmove = INSTR o FMOVE
738       and fiload = INSTR o FILOAD
739       and fbinop = INSTR o FBINOP
740       and fibinop = INSTR o FIBINOP
741       and funop = INSTR o FUNOP
742       and fcmp = INSTR o FCMP
743       and sahf = INSTR SAHF
744       and lahf = INSTR LAHF
745       and source = INSTR o SOURCE
746       and sink = INSTR o SINK
747       and phi = INSTR o PHI
748  end  end
749    

Legend:
Removed from v.999  
changed lines
  Added in v.1003

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