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/hppa/instructions/hppaInstr.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/hppa/instructions/hppaInstr.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 889 - (download) (annotate)
Thu Jul 19 20:35:20 2001 UTC (18 years, 1 month ago) by george
File size: 12816 byte(s)
Substantial simplification in the CELLS interface
(*
 * WARNING: This file was automatically generated by MDLGen (v3.0)
 * from the machine description file "hppa/hppa.mdl".
 * DO NOT EDIT this file directly
 *)


signature HPPAINSTR =
sig
   structure C : HPPACELLS
   structure T : MLTREE
   structure LabelExp : LABELEXP
   structure Constant: CONSTANT
   structure Region : REGION
      sharing LabelExp.T = T
      sharing Constant = T.Constant
      sharing Region = T.Region
   datatype fmt =
     SGL
   | DBL
   | QUAD
   datatype loadi =
     LDW
   | LDH
   | LDB
   datatype store =
     STW
   | STH
   | STB
   datatype load =
     LDWX
   | LDWX_S
   | LDWX_M
   | LDWX_SM
   | LDHX
   | LDHX_S
   | LDHX_M
   | LDHX_SM
   | LDBX
   | LDBX_M
   datatype cmp =
     COMBT
   | COMBF
   datatype cmpi =
     COMIBT
   | COMIBF
   datatype arith =
     ADD
   | ADDL
   | ADDO
   | SH1ADD
   | SH1ADDL
   | SH1ADDO
   | SH2ADD
   | SH2ADDL
   | SH2ADDO
   | SH3ADD
   | SH3ADDL
   | SH3ADDO
   | SUB
   | SUBO
   | OR
   | XOR
   | AND
   | ANDCM
   datatype arithi =
     ADDI
   | ADDIO
   | ADDIL
   | SUBI
   | SUBIO
   datatype shiftv =
     VEXTRU
   | VEXTRS
   | ZVDEP
   datatype shift =
     EXTRU
   | EXTRS
   | ZDEP
   datatype farith =
     FADD_S
   | FADD_D
   | FADD_Q
   | FSUB_S
   | FSUB_D
   | FSUB_Q
   | FMPY_S
   | FMPY_D
   | FMPY_Q
   | FDIV_S
   | FDIV_D
   | FDIV_Q
   | XMPYU
   datatype funary =
     FCPY_S
   | FCPY_D
   | FCPY_Q
   | FABS_S
   | FABS_D
   | FABS_Q
   | FSQRT_S
   | FSQRT_D
   | FSQRT_Q
   | FRND_S
   | FRND_D
   | FRND_Q
   datatype fcnv =
     FCNVFF_SD
   | FCNVFF_SQ
   | FCNVFF_DS
   | FCNVFF_DQ
   | FCNVFF_QS
   | FCNVFF_QD
   | FCNVXF_S
   | FCNVXF_D
   | FCNVXF_Q
   | FCNVFX_S
   | FCNVFX_D
   | FCNVFX_Q
   | FCNVFXT_S
   | FCNVFXT_D
   | FCNVFXT_Q
   datatype fstore =
     FSTDS
   | FSTWS
   datatype fstorex =
     FSTDX
   | FSTDX_S
   | FSTDX_M
   | FSTDX_SM
   | FSTWX
   | FSTWX_S
   | FSTWX_M
   | FSTWX_SM
   datatype floadx =
     FLDDX
   | FLDDX_S
   | FLDDX_M
   | FLDDX_SM
   | FLDWX
   | FLDWX_S
   | FLDWX_M
   | FLDWX_SM
   datatype fload =
     FLDDS
   | FLDWS
   datatype bcond =
     EQ
   | LT
   | LE
   | LTU
   | LEU
   | NE
   | GE
   | GT
   | GTU
   | GEU
   datatype bitcond =
     BSET
   | BCLR
   datatype fcond =
     False_
   | False
   | ?
   | !<=>
   | ==
   | EQT
   | ?=
   | !<>
   | !?>=
   | <
   | ?<
   | !>=
   | !?>
   | <=
   | ?<=
   | !>
   | !?<=
   | >
   | ?>
   | !<=
   | !?<
   | >=
   | ?>=
   | !<
   | !?=
   | <>
   | !=
   | NET
   | !?
   | <=>
   | True_
   | True
   datatype scond =
     ALL_ZERO
   | LEFTMOST_ONE
   | LEFTMOST_ZERO
   | RIGHTMOST_ONE
   | RIGHTMOST_ZERO
   datatype field_selector =
     F
   | S
   | D
   | R
   | T
   | P
   datatype ea =
     Direct of CellsBasis.cell
   | FDirect of CellsBasis.cell
   | Displace of {base:CellsBasis.cell, disp:int}
   datatype operand =
     REG of CellsBasis.cell
   | IMMED of int
   | LabExp of (T.labexp * field_selector)
   | HILabExp of (T.labexp * field_selector)
   | LOLabExp of (T.labexp * field_selector)
   datatype addressing_mode =
     DISPea of (CellsBasis.cell * operand)
   | INDXea of (CellsBasis.cell * CellsBasis.cell)
   | INDXSCALEDea of (CellsBasis.cell * CellsBasis.cell)
   datatype instruction =
     LOADI of {li:loadi, r:CellsBasis.cell, i:operand, t:CellsBasis.cell, mem:Region.region}
   | LOAD of {l:load, r1:CellsBasis.cell, r2:CellsBasis.cell, t:CellsBasis.cell, 
        mem:Region.region}
   | STORE of {st:store, b:CellsBasis.cell, d:operand, r:CellsBasis.cell, mem:Region.region}
   | ARITH of {a:arith, r1:CellsBasis.cell, r2:CellsBasis.cell, t:CellsBasis.cell}
   | ARITHI of {ai:arithi, i:operand, r:CellsBasis.cell, t:CellsBasis.cell}
   | COMCLR_LDO of {cc:bcond, r1:CellsBasis.cell, r2:CellsBasis.cell, t1:CellsBasis.cell, 
        i:int, b:CellsBasis.cell, t2:CellsBasis.cell}
   | COMICLR_LDO of {cc:bcond, i1:operand, r2:CellsBasis.cell, t1:CellsBasis.cell, 
        i2:int, b:CellsBasis.cell, t2:CellsBasis.cell}
   | SHIFTV of {sv:shiftv, r:CellsBasis.cell, len:int, t:CellsBasis.cell}
   | SHIFT of {s:shift, r:CellsBasis.cell, p:int, len:int, t:CellsBasis.cell}
   | BCOND of {cmp:cmp, bc:bcond, r1:CellsBasis.cell, r2:CellsBasis.cell, n:bool, 
        nop:bool, t:Label.label, f:Label.label}
   | BCONDI of {cmpi:cmpi, bc:bcond, i:int, r2:CellsBasis.cell, n:bool, nop:bool, 
        t:Label.label, f:Label.label}
   | BB of {bc:bitcond, r:CellsBasis.cell, p:int, n:bool, nop:bool, t:Label.label, 
        f:Label.label}
   | B of {lab:Label.label, n:bool}
   | LONGJUMP of {lab:Label.label, n:bool, tmp:CellsBasis.cell, tmpLab:Label.label}
   | BE of {b:CellsBasis.cell, d:operand, sr:int, n:bool, labs:Label.label list}
   | BV of {x:CellsBasis.cell, b:CellsBasis.cell, labs:Label.label list, n:bool}
   | BLR of {x:CellsBasis.cell, t:CellsBasis.cell, labs:Label.label list, n:bool}
   | BL of {lab:Label.label, t:CellsBasis.cell, defs:C.cellset, uses:C.cellset, 
        cutsTo:Label.label list, mem:Region.region, n:bool}
   | BLE of {d:operand, b:CellsBasis.cell, sr:int, t:CellsBasis.cell, defs:C.cellset, 
        uses:C.cellset, cutsTo:Label.label list, mem:Region.region}
   | LDIL of {i:operand, t:CellsBasis.cell}
   | LDO of {i:operand, b:CellsBasis.cell, t:CellsBasis.cell}
   | MTCTL of {r:CellsBasis.cell, t:CellsBasis.cell}
   | FSTORE of {fst:fstore, b:CellsBasis.cell, d:int, r:CellsBasis.cell, mem:Region.region}
   | FSTOREX of {fstx:fstorex, b:CellsBasis.cell, x:CellsBasis.cell, r:CellsBasis.cell, 
        mem:Region.region}
   | FLOAD of {fl:fload, b:CellsBasis.cell, d:int, t:CellsBasis.cell, mem:Region.region}
   | FLOADX of {flx:floadx, b:CellsBasis.cell, x:CellsBasis.cell, t:CellsBasis.cell, 
        mem:Region.region}
   | FARITH of {fa:farith, r1:CellsBasis.cell, r2:CellsBasis.cell, t:CellsBasis.cell}
   | FUNARY of {fu:funary, f:CellsBasis.cell, t:CellsBasis.cell}
   | FCNV of {fcnv:fcnv, f:CellsBasis.cell, t:CellsBasis.cell}
   | FBRANCH of {cc:fcond, fmt:fmt, f1:CellsBasis.cell, f2:CellsBasis.cell, 
        t:Label.label, f:Label.label, n:bool, long:bool}
   | BREAK of {code1:int, code2:int}
   | NOP
   | COPY of {dst:CellsBasis.cell list, src:CellsBasis.cell list, impl:instruction list option ref, 
        tmp:ea option}
   | FCOPY of {dst:CellsBasis.cell list, src:CellsBasis.cell list, impl:instruction list option ref, 
        tmp:ea option}
   | ANNOTATION of {i:instruction, a:Annotations.annotation}
   | SOURCE of {}
   | SINK of {}
   | PHI of {}
end

functor HppaInstr(LabelExp : LABELEXP
                 ) : HPPAINSTR =
struct
   structure C = HppaCells
   structure LabelExp = LabelExp
   structure T = LabelExp.T
   structure Region = T.Region
   structure Constant = T.Constant
   datatype fmt =
     SGL
   | DBL
   | QUAD
   datatype loadi =
     LDW
   | LDH
   | LDB
   datatype store =
     STW
   | STH
   | STB
   datatype load =
     LDWX
   | LDWX_S
   | LDWX_M
   | LDWX_SM
   | LDHX
   | LDHX_S
   | LDHX_M
   | LDHX_SM
   | LDBX
   | LDBX_M
   datatype cmp =
     COMBT
   | COMBF
   datatype cmpi =
     COMIBT
   | COMIBF
   datatype arith =
     ADD
   | ADDL
   | ADDO
   | SH1ADD
   | SH1ADDL
   | SH1ADDO
   | SH2ADD
   | SH2ADDL
   | SH2ADDO
   | SH3ADD
   | SH3ADDL
   | SH3ADDO
   | SUB
   | SUBO
   | OR
   | XOR
   | AND
   | ANDCM
   datatype arithi =
     ADDI
   | ADDIO
   | ADDIL
   | SUBI
   | SUBIO
   datatype shiftv =
     VEXTRU
   | VEXTRS
   | ZVDEP
   datatype shift =
     EXTRU
   | EXTRS
   | ZDEP
   datatype farith =
     FADD_S
   | FADD_D
   | FADD_Q
   | FSUB_S
   | FSUB_D
   | FSUB_Q
   | FMPY_S
   | FMPY_D
   | FMPY_Q
   | FDIV_S
   | FDIV_D
   | FDIV_Q
   | XMPYU
   datatype funary =
     FCPY_S
   | FCPY_D
   | FCPY_Q
   | FABS_S
   | FABS_D
   | FABS_Q
   | FSQRT_S
   | FSQRT_D
   | FSQRT_Q
   | FRND_S
   | FRND_D
   | FRND_Q
   datatype fcnv =
     FCNVFF_SD
   | FCNVFF_SQ
   | FCNVFF_DS
   | FCNVFF_DQ
   | FCNVFF_QS
   | FCNVFF_QD
   | FCNVXF_S
   | FCNVXF_D
   | FCNVXF_Q
   | FCNVFX_S
   | FCNVFX_D
   | FCNVFX_Q
   | FCNVFXT_S
   | FCNVFXT_D
   | FCNVFXT_Q
   datatype fstore =
     FSTDS
   | FSTWS
   datatype fstorex =
     FSTDX
   | FSTDX_S
   | FSTDX_M
   | FSTDX_SM
   | FSTWX
   | FSTWX_S
   | FSTWX_M
   | FSTWX_SM
   datatype floadx =
     FLDDX
   | FLDDX_S
   | FLDDX_M
   | FLDDX_SM
   | FLDWX
   | FLDWX_S
   | FLDWX_M
   | FLDWX_SM
   datatype fload =
     FLDDS
   | FLDWS
   datatype bcond =
     EQ
   | LT
   | LE
   | LTU
   | LEU
   | NE
   | GE
   | GT
   | GTU
   | GEU
   datatype bitcond =
     BSET
   | BCLR
   datatype fcond =
     False_
   | False
   | ?
   | !<=>
   | ==
   | EQT
   | ?=
   | !<>
   | !?>=
   | <
   | ?<
   | !>=
   | !?>
   | <=
   | ?<=
   | !>
   | !?<=
   | >
   | ?>
   | !<=
   | !?<
   | >=
   | ?>=
   | !<
   | !?=
   | <>
   | !=
   | NET
   | !?
   | <=>
   | True_
   | True
   datatype scond =
     ALL_ZERO
   | LEFTMOST_ONE
   | LEFTMOST_ZERO
   | RIGHTMOST_ONE
   | RIGHTMOST_ZERO
   datatype field_selector =
     F
   | S
   | D
   | R
   | T
   | P
   datatype ea =
     Direct of CellsBasis.cell
   | FDirect of CellsBasis.cell
   | Displace of {base:CellsBasis.cell, disp:int}
   datatype operand =
     REG of CellsBasis.cell
   | IMMED of int
   | LabExp of (T.labexp * field_selector)
   | HILabExp of (T.labexp * field_selector)
   | LOLabExp of (T.labexp * field_selector)
   datatype addressing_mode =
     DISPea of (CellsBasis.cell * operand)
   | INDXea of (CellsBasis.cell * CellsBasis.cell)
   | INDXSCALEDea of (CellsBasis.cell * CellsBasis.cell)
   datatype instruction =
     LOADI of {li:loadi, r:CellsBasis.cell, i:operand, t:CellsBasis.cell, mem:Region.region}
   | LOAD of {l:load, r1:CellsBasis.cell, r2:CellsBasis.cell, t:CellsBasis.cell, 
        mem:Region.region}
   | STORE of {st:store, b:CellsBasis.cell, d:operand, r:CellsBasis.cell, mem:Region.region}
   | ARITH of {a:arith, r1:CellsBasis.cell, r2:CellsBasis.cell, t:CellsBasis.cell}
   | ARITHI of {ai:arithi, i:operand, r:CellsBasis.cell, t:CellsBasis.cell}
   | COMCLR_LDO of {cc:bcond, r1:CellsBasis.cell, r2:CellsBasis.cell, t1:CellsBasis.cell, 
        i:int, b:CellsBasis.cell, t2:CellsBasis.cell}
   | COMICLR_LDO of {cc:bcond, i1:operand, r2:CellsBasis.cell, t1:CellsBasis.cell, 
        i2:int, b:CellsBasis.cell, t2:CellsBasis.cell}
   | SHIFTV of {sv:shiftv, r:CellsBasis.cell, len:int, t:CellsBasis.cell}
   | SHIFT of {s:shift, r:CellsBasis.cell, p:int, len:int, t:CellsBasis.cell}
   | BCOND of {cmp:cmp, bc:bcond, r1:CellsBasis.cell, r2:CellsBasis.cell, n:bool, 
        nop:bool, t:Label.label, f:Label.label}
   | BCONDI of {cmpi:cmpi, bc:bcond, i:int, r2:CellsBasis.cell, n:bool, nop:bool, 
        t:Label.label, f:Label.label}
   | BB of {bc:bitcond, r:CellsBasis.cell, p:int, n:bool, nop:bool, t:Label.label, 
        f:Label.label}
   | B of {lab:Label.label, n:bool}
   | LONGJUMP of {lab:Label.label, n:bool, tmp:CellsBasis.cell, tmpLab:Label.label}
   | BE of {b:CellsBasis.cell, d:operand, sr:int, n:bool, labs:Label.label list}
   | BV of {x:CellsBasis.cell, b:CellsBasis.cell, labs:Label.label list, n:bool}
   | BLR of {x:CellsBasis.cell, t:CellsBasis.cell, labs:Label.label list, n:bool}
   | BL of {lab:Label.label, t:CellsBasis.cell, defs:C.cellset, uses:C.cellset, 
        cutsTo:Label.label list, mem:Region.region, n:bool}
   | BLE of {d:operand, b:CellsBasis.cell, sr:int, t:CellsBasis.cell, defs:C.cellset, 
        uses:C.cellset, cutsTo:Label.label list, mem:Region.region}
   | LDIL of {i:operand, t:CellsBasis.cell}
   | LDO of {i:operand, b:CellsBasis.cell, t:CellsBasis.cell}
   | MTCTL of {r:CellsBasis.cell, t:CellsBasis.cell}
   | FSTORE of {fst:fstore, b:CellsBasis.cell, d:int, r:CellsBasis.cell, mem:Region.region}
   | FSTOREX of {fstx:fstorex, b:CellsBasis.cell, x:CellsBasis.cell, r:CellsBasis.cell, 
        mem:Region.region}
   | FLOAD of {fl:fload, b:CellsBasis.cell, d:int, t:CellsBasis.cell, mem:Region.region}
   | FLOADX of {flx:floadx, b:CellsBasis.cell, x:CellsBasis.cell, t:CellsBasis.cell, 
        mem:Region.region}
   | FARITH of {fa:farith, r1:CellsBasis.cell, r2:CellsBasis.cell, t:CellsBasis.cell}
   | FUNARY of {fu:funary, f:CellsBasis.cell, t:CellsBasis.cell}
   | FCNV of {fcnv:fcnv, f:CellsBasis.cell, t:CellsBasis.cell}
   | FBRANCH of {cc:fcond, fmt:fmt, f1:CellsBasis.cell, f2:CellsBasis.cell, 
        t:Label.label, f:Label.label, n:bool, long:bool}
   | BREAK of {code1:int, code2:int}
   | NOP
   | COPY of {dst:CellsBasis.cell list, src:CellsBasis.cell list, impl:instruction list option ref, 
        tmp:ea option}
   | FCOPY of {dst:CellsBasis.cell list, src:CellsBasis.cell 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