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/sparc/instructions/sparccomp-instr-ext.sml
ViewVC logotype

View of /sml/trunk/src/MLRISC/sparc/instructions/sparccomp-instr-ext.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 840 - (download) (annotate)
Fri Jun 15 19:05:19 2001 UTC (18 years, 3 months ago) by blume
File size: 985 byte(s)
c-calls (and NLFFI) implementation for Sparc
(* sparccomp-instr-ext.sml
 *
 * COPYRIGHT (c) 2001 Bell Labs, Lucent Technologies
 *
 * compiling a trivial extensions to the Sparc instruction set
 * (UNIMP instruction)
 *)
signature SPARCCOMP_INSTR_EXT = sig
    structure T : MLTREE
    structure I : SPARCINSTR

    type reducer =
	 (I.instruction, I.C.cellset, I.operand, I.addressing_mode) T.reducer

    val compileSext :
	reducer
	-> { stm: (T.stm, T.rexp, T.fexp, T.ccexp) SparcInstrExt.sext,
	     an: T.an list }
	-> unit
end

functor SparcCompInstrExt (I: SPARCINSTR) : SPARCCOMP_INSTR_EXT = struct
    structure T = I.T
    structure I = I
    structure C = I.C
    structure X = SparcInstrExt

    type stm = (T.stm, T.rexp, T.fexp, T.ccexp) X.sext

    type reducer =
	 (I.instruction, I.C.cellset, I.operand, I.addressing_mode) T.reducer

    fun compileSext reducer { stm: stm, an: T.an list } = let
	val T.REDUCER { emit, ... } = reducer
    in
	case stm of X.UNIMP i => emit (I.UNIMP {const22 = i}, an)
    end
end

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