Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/MLRISC/ppc/instructions/ppcInstr.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/ppc/instructions/ppcInstr.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 3 months ago) by monnier
File size: 8498 byte(s)
bring revisions from the vendor branch to the trunk
(*
 * This file was automatically generated by MDGen (v2.0)
 * from the machine description file "ppc/ppc.md".
 *)


signature PPCINSTR =
sig
   structure C : PPCCELLS
   structure Constant: CONSTANT
   structure LabelExp: LABELEXP
   structure Region : REGION
      sharing Constant = LabelExp.Constant
   type gpr = int
   type fpr = int
   type ccr = int
   type crf = int
   datatype spr =
     XER
   | LR
   | CTR
   datatype operand =
     RegOp of int
   | ImmedOp of int
   | LabelOp of LabelExp.labexp
   type addressing_mode = (C.cell * operand)
   datatype ea =
     Direct of int
   | FDirect of int
   | Displace of {base:int, disp:operand}
   datatype load =
     LBZ
   | LBZE
   | LHZ
   | LHZE
   | LHA
   | LHAE
   | LWZ
   | LWZE
   | LDE
   datatype store =
     STB
   | STBE
   | STH
   | STHE
   | STW
   | STWE
   | STDE
   datatype fload =
     LFS
   | LFSE
   | LFD
   | LFDE
   datatype fstore =
     STFS
   | STFSE
   | STFD
   | STFDE
   datatype cmp =
     CMP
   | CMPL
   datatype fcmp =
     FCMPO
   | FCMPU
   datatype unary =
     NEG
   | EXTSB
   | EXTSH
   | EXTSW
   | CNTLZW
   | CNTLZD
   datatype funary =
     FMR
   | FNEG
   | FABS
   | FNABS
   | FSQRT
   | FSQRTS
   | FRSP
   | FCTIW
   | FCTIWZ
   | FCTID
   | FCTIDZ
   | FCFID
   datatype farith =
     FADD
   | FSUB
   | FMUL
   | FDIV
   | FADDS
   | FSUBS
   | FMULS
   | FDIVS
   datatype farith3 =
     FMADD
   | FMADDS
   | FMSUB
   | FMSUBS
   | FNMADD
   | FNMADDS
   | FNMSUB
   | FNMSUBS
   | FSEL
   datatype bo =
     TRUE
   | FALSE
   | ALWAYS
   | COUNTER of {eqZero:bool, cond:bool option}
   datatype arith =
     ADD
   | SUBF
   | MULLW
   | MULLD
   | MULHW
   | MULHWU
   | DIVW
   | DIVD
   | DIVWU
   | DIVDU
   | AND
   | OR
   | XOR
   | NAND
   | NOR
   | EQV
   | ANDC
   | ORC
   | SLW
   | SLD
   | SRW
   | SRD
   | SRAW
   | SRAD
   datatype arithi =
     ADDI
   | ADDIS
   | SUBFIC
   | MULLI
   | ANDI_Rc
   | ANDIS_Rc
   | ORI
   | ORIS
   | XORI
   | XORIS
   | SRAWI
   | SRADI
   datatype rotate =
     RLWNM
   | RLDCL
   | RLDCR
   datatype rotatei =
     RLWINM
   | RLWIMI
   | RLDICL
   | RLDICR
   | RLDIC
   | RLDIMI
   datatype ccarith =
     CRAND
   | CROR
   | CRXOR
   | CRNAND
   | CRNOR
   | CREQV
   | CRANDC
   | CRORC
   datatype bit =
     LT
   | GT
   | EQ
   | SO
   | FL
   | FG
   | FE
   | FU
   | FX
   | FEX
   | VX
   | OX
   datatype xerbit =
     SO64
   | OV64
   | CA64
   | SO32
   | OV32
   | CA32
   type cr_bit = (int * bit)
   datatype instruction =
     L of {ld:load, rt:int, ra:int, d:operand, mem:Region.region}
   | LF of {ld:fload, ft:int, ra:int, d:operand, mem:Region.region}
   | ST of {st:store, rs:int, ra:int, d:operand, mem:Region.region}
   | STF of {st:fstore, fs:int, ra:int, d:operand, mem:Region.region}
   | UNARY of {oper:unary, rt:int, ra:int, Rc:bool, OE:bool}
   | ARITH of {oper:arith, rt:int, ra:int, rb:int, Rc:bool, OE:bool}
   | ARITHI of {oper:arithi, rt:int, ra:int, im:operand}
   | ROTATE of {oper:rotate, ra:int, rs:int, sh:int, mb:int, me:int option
     }
   | ROTATEI of {oper:rotatei, ra:int, rs:int, sh:operand, mb:int, me:int option
     }
   | COMPARE of {cmp:cmp, l:bool, bf:int, ra:int, rb:operand}
   | FCOMPARE of {cmp:fcmp, bf:int, fa:int, fb:int}
   | FUNARY of {oper:funary, ft:int, fb:int, Rc:bool}
   | FARITH of {oper:farith, ft:int, fa:int, fb:int, Rc:bool}
   | FARITH3 of {oper:farith3, ft:int, fa:int, fb:int, fc:int, Rc:bool
     }
   | CCARITH of {oper:ccarith, bt:cr_bit, ba:cr_bit, bb:cr_bit}
   | MCRF of {bf:int, bfa:int}
   | MTSPR of {rs:int, spr:int}
   | MFSPR of {rt:int, spr:int}
   | TW of {to:int, ra:int, si:operand}
   | TD of {to:int, ra:int, si:operand}
   | BC of {bo:bo, bf:int, bit:bit, addr:operand, LK:bool, fall:operand
     }
   | BCLR of {bo:bo, bf:int, bit:bit, LK:bool, labels:Label.label list
     }
   | B of {addr:operand, LK:bool}
   | CALL of {def:C.cellset, use:C.cellset, mem:Region.region}
   | COPY of {dst:int list, src:int list, impl:instruction list option ref
     , tmp:ea option}
   | FCOPY of {dst:int list, src:int list, impl:instruction list option ref
     , tmp:ea option}
   | ANNOTATION of {i:instruction, a:Annotations.annotation}
   | SOURCE of {}
   | SINK of {}
   | PHI of {}
end

functor PPCInstr(structure LabelExp : LABELEXP
                 structure Region   : REGION
                ) : PPCINSTR =
struct
   structure C = PPCCells
   structure Region = Region
   structure LabelExp = LabelExp
   structure Constant = LabelExp.Constant
   type gpr = int
   type fpr = int
   type ccr = int
   type crf = int
   datatype spr =
     XER
   | LR
   | CTR
   datatype operand =
     RegOp of int
   | ImmedOp of int
   | LabelOp of LabelExp.labexp
   type addressing_mode = (C.cell * operand)
   datatype ea =
     Direct of int
   | FDirect of int
   | Displace of {base:int, disp:operand}
   datatype load =
     LBZ
   | LBZE
   | LHZ
   | LHZE
   | LHA
   | LHAE
   | LWZ
   | LWZE
   | LDE
   datatype store =
     STB
   | STBE
   | STH
   | STHE
   | STW
   | STWE
   | STDE
   datatype fload =
     LFS
   | LFSE
   | LFD
   | LFDE
   datatype fstore =
     STFS
   | STFSE
   | STFD
   | STFDE
   datatype cmp =
     CMP
   | CMPL
   datatype fcmp =
     FCMPO
   | FCMPU
   datatype unary =
     NEG
   | EXTSB
   | EXTSH
   | EXTSW
   | CNTLZW
   | CNTLZD
   datatype funary =
     FMR
   | FNEG
   | FABS
   | FNABS
   | FSQRT
   | FSQRTS
   | FRSP
   | FCTIW
   | FCTIWZ
   | FCTID
   | FCTIDZ
   | FCFID
   datatype farith =
     FADD
   | FSUB
   | FMUL
   | FDIV
   | FADDS
   | FSUBS
   | FMULS
   | FDIVS
   datatype farith3 =
     FMADD
   | FMADDS
   | FMSUB
   | FMSUBS
   | FNMADD
   | FNMADDS
   | FNMSUB
   | FNMSUBS
   | FSEL
   datatype bo =
     TRUE
   | FALSE
   | ALWAYS
   | COUNTER of {eqZero:bool, cond:bool option}
   datatype arith =
     ADD
   | SUBF
   | MULLW
   | MULLD
   | MULHW
   | MULHWU
   | DIVW
   | DIVD
   | DIVWU
   | DIVDU
   | AND
   | OR
   | XOR
   | NAND
   | NOR
   | EQV
   | ANDC
   | ORC
   | SLW
   | SLD
   | SRW
   | SRD
   | SRAW
   | SRAD
   datatype arithi =
     ADDI
   | ADDIS
   | SUBFIC
   | MULLI
   | ANDI_Rc
   | ANDIS_Rc
   | ORI
   | ORIS
   | XORI
   | XORIS
   | SRAWI
   | SRADI
   datatype rotate =
     RLWNM
   | RLDCL
   | RLDCR
   datatype rotatei =
     RLWINM
   | RLWIMI
   | RLDICL
   | RLDICR
   | RLDIC
   | RLDIMI
   datatype ccarith =
     CRAND
   | CROR
   | CRXOR
   | CRNAND
   | CRNOR
   | CREQV
   | CRANDC
   | CRORC
   datatype bit =
     LT
   | GT
   | EQ
   | SO
   | FL
   | FG
   | FE
   | FU
   | FX
   | FEX
   | VX
   | OX
   datatype xerbit =
     SO64
   | OV64
   | CA64
   | SO32
   | OV32
   | CA32
   type cr_bit = (int * bit)
   datatype instruction =
     L of {ld:load, rt:int, ra:int, d:operand, mem:Region.region}
   | LF of {ld:fload, ft:int, ra:int, d:operand, mem:Region.region}
   | ST of {st:store, rs:int, ra:int, d:operand, mem:Region.region}
   | STF of {st:fstore, fs:int, ra:int, d:operand, mem:Region.region}
   | UNARY of {oper:unary, rt:int, ra:int, Rc:bool, OE:bool}
   | ARITH of {oper:arith, rt:int, ra:int, rb:int, Rc:bool, OE:bool}
   | ARITHI of {oper:arithi, rt:int, ra:int, im:operand}
   | ROTATE of {oper:rotate, ra:int, rs:int, sh:int, mb:int, me:int option
     }
   | ROTATEI of {oper:rotatei, ra:int, rs:int, sh:operand, mb:int, me:int option
     }
   | COMPARE of {cmp:cmp, l:bool, bf:int, ra:int, rb:operand}
   | FCOMPARE of {cmp:fcmp, bf:int, fa:int, fb:int}
   | FUNARY of {oper:funary, ft:int, fb:int, Rc:bool}
   | FARITH of {oper:farith, ft:int, fa:int, fb:int, Rc:bool}
   | FARITH3 of {oper:farith3, ft:int, fa:int, fb:int, fc:int, Rc:bool
     }
   | CCARITH of {oper:ccarith, bt:cr_bit, ba:cr_bit, bb:cr_bit}
   | MCRF of {bf:int, bfa:int}
   | MTSPR of {rs:int, spr:int}
   | MFSPR of {rt:int, spr:int}
   | TW of {to:int, ra:int, si:operand}
   | TD of {to:int, ra:int, si:operand}
   | BC of {bo:bo, bf:int, bit:bit, addr:operand, LK:bool, fall:operand
     }
   | BCLR of {bo:bo, bf:int, bit:bit, LK:bool, labels:Label.label list
     }
   | B of {addr:operand, LK:bool}
   | CALL of {def:C.cellset, use:C.cellset, mem:Region.region}
   | COPY of {dst:int list, src:int list, impl:instruction list option ref
     , tmp:ea option}
   | FCOPY of {dst:int list, src:int list, impl:instruction list option ref
     , tmp:ea option}
   | ANNOTATION of {i:instruction, a:Annotations.annotation}
   | SOURCE of {}
   | SINK of {}
   | PHI of {}
end


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