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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 744 - (download) (annotate)
Fri Dec 8 04:11:42 2000 UTC (18 years, 9 months ago) by leunga
File size: 5094 byte(s)

   A CVS update record!

   Changed type cell from int to datatype, and numerous other changes.
   Affect every client of MLRISC.  Lal says this can be bootstrapped on all
   machines.  See smlnj/HISTORY for details.

   Tag:  leunga-20001207-cell-monster-hack
(*
 * 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 HPPACELLS =
sig
   include CELLS_COMMON
   val CR : cellkind
   val CELLSET : cellkind
   val showGP : register_id -> string
   val showFP : register_id -> string
   val showCR : register_id -> string
   val showCC : register_id -> string
   val showMEM : register_id -> string
   val showCTRL : register_id -> string
   val showCELLSET : register_id -> string
   val showGPWithSize : (register_id * sz) -> string
   val showFPWithSize : (register_id * sz) -> string
   val showCRWithSize : (register_id * sz) -> string
   val showCCWithSize : (register_id * sz) -> string
   val showMEMWithSize : (register_id * sz) -> string
   val showCTRLWithSize : (register_id * sz) -> string
   val showCELLSETWithSize : (register_id * sz) -> string
   val returnPtr : cell
   val stackptrR : cell
   val asmTmpR : cell
   val fasmTmp : cell
   val sar : cell
   val r0 : cell
   val f0 : cell
   val addGP : (cell * cellset) -> cellset
   val addFP : (cell * cellset) -> cellset
   val addCR : (cell * cellset) -> cellset
   val addCC : (cell * cellset) -> cellset
   val addMEM : (cell * cellset) -> cellset
   val addCTRL : (cell * cellset) -> cellset
   val addCELLSET : (cell * cellset) -> cellset
end

structure HppaCells : HPPACELLS =
struct
   exception HppaCells
   fun error msg = MLRiscErrorMsg.error("HppaCells",msg)
   fun showGPWithSize (r, ty) = (fn (r, _) => "%r" ^ (Int.toString r)
                                ) (r, ty)
   and showFPWithSize (r, ty) = (fn (f, _) => "%f" ^ (Int.toString f)
                                ) (r, ty)
   and showCRWithSize (r, ty) = (fn (cr, _) => "%cr" ^ (Int.toString cr)
                                ) (r, ty)
   and showCCWithSize (r, ty) = (fn _ => "cc"
                                ) (r, ty)
   and showMEMWithSize (r, ty) = (fn (r, _) => "m" ^ (Int.toString r)
                                 ) (r, ty)
   and showCTRLWithSize (r, ty) = (fn (r, _) => "ctrl" ^ (Int.toString r)
                                  ) (r, ty)
   and showCELLSETWithSize (r, ty) = (fn _ => "CELLSET"
                                     ) (r, ty)
   fun showGP r = showGPWithSize (r, 32)
   fun showFP r = showFPWithSize (r, 64)
   fun showCR r = showCRWithSize (r, 32)
   fun showCC r = showCCWithSize (r, 32)
   fun showMEM r = showMEMWithSize (r, 8)
   fun showCTRL r = showCTRLWithSize (r, 0)
   fun showCELLSET r = showCELLSETWithSize (r, 0)
   val CR = CellsBasis.newCellKind {name="CR", nickname="cr"}
   and CELLSET = CellsBasis.newCellKind {name="CELLSET", nickname="cellset"}
   structure MyCellsCommon = CellsCommon
      (exception Cells = HppaCells
       val firstPseudo = 256
       val desc_GP = CellsInternal.DESC {low=0, high=31, kind=CellsBasis.GP, 
              defaultValues=[(0, 0)], zeroReg=SOME 0, toString=showGP, toStringWithSize=showGPWithSize, 
              counter=ref 0, physicalRegs=ref CellsInternal.array0}
       and desc_FP = CellsInternal.DESC {low=32, high=63, kind=CellsBasis.FP, 
              defaultValues=[(32, 0)], zeroReg=SOME 0, toString=showFP, toStringWithSize=showFPWithSize, 
              counter=ref 0, physicalRegs=ref CellsInternal.array0}
       and desc_CR = CellsInternal.DESC {low=64, high=95, kind=CR, defaultValues=[], 
              zeroReg=NONE, toString=showCR, toStringWithSize=showCRWithSize, 
              counter=ref 0, physicalRegs=ref CellsInternal.array0}
       and desc_MEM = CellsInternal.DESC {low=96, high=95, kind=CellsBasis.MEM, 
              defaultValues=[], zeroReg=NONE, toString=showMEM, toStringWithSize=showMEMWithSize, 
              counter=ref 0, physicalRegs=ref CellsInternal.array0}
       and desc_CTRL = CellsInternal.DESC {low=96, high=95, kind=CellsBasis.CTRL, 
              defaultValues=[], zeroReg=NONE, toString=showCTRL, toStringWithSize=showCTRLWithSize, 
              counter=ref 0, physicalRegs=ref CellsInternal.array0}
       and desc_CELLSET = CellsInternal.DESC {low=96, high=95, kind=CELLSET, 
              defaultValues=[], zeroReg=NONE, toString=showCELLSET, toStringWithSize=showCELLSETWithSize, 
              counter=ref 0, physicalRegs=ref CellsInternal.array0}
       val cellKindDescs = [(CellsBasis.GP, desc_GP), (CellsBasis.FP, desc_FP), 
              (CR, desc_CR), (CellsBasis.CC, desc_GP), (CellsBasis.MEM, desc_MEM), 
              (CellsBasis.CTRL, desc_CTRL), (CELLSET, desc_CELLSET)]
      )

   open MyCellsCommon
   val addGP = CellSet.add
   and addFP = CellSet.add
   and addCR = CellSet.add
   and addCC = CellSet.add
   and addMEM = CellSet.add
   and addCTRL = CellSet.add
   and addCELLSET = CellSet.add
   val RegGP = Reg GP
   and RegFP = Reg FP
   and RegCR = Reg CR
   and RegCC = Reg CC
   and RegMEM = Reg MEM
   and RegCTRL = Reg CTRL
   and RegCELLSET = Reg CELLSET
   val returnPtr = RegGP 2
   val stackptrR = RegGP 30
   val asmTmpR = RegGP 29
   val fasmTmp = RegFP 31
   val sar = RegCR 11
   val r0 = RegGP 0
   val f0 = RegFP 0
end


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