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

SCM Repository

[smlnj] Revision 1003
ViewVC logotype

Revision 1003


Jump to revision: Previous Next
Author: george
Date: Fri Dec 7 02:45:32 2001 UTC (17 years, 6 months ago)
Log Message:
Changed the representation of instructions from being fully abstract
to being partially concrete. That is to say:

  from
	type instruction

  to
	type instr				(* machine instruction *)

	datatype instruction =
	    LIVE of {regs: C.cellset, spilled: C.cellset}
          | KILL of {regs: C.cellset, spilled: C.cellset}
          | COPYXXX of {k: CB.cellkind, dst: CB.cell list, src: CB.cell list}
          | ANNOTATION of {i: instruction, a: Annotations.annotation}
          | INSTR of instr

This makes the handling of certain special instructions that appear on
all architectures easier and uniform.

LIVE and KILL say that a list of registers are live or killed at the
program point where they appear. No spill code is generated when an
element of the 'regs' field is spilled, but the register is moved to
the 'spilled' (which is present, more for debugging than anything else).

LIVE replaces the (now deprecated) DEFFREG instruction on the alpha.
We used to generate:

	DEFFREG f1
	f1 := f2 + f3
        trapb

but now generate:

	f1 := f2 + f3
	trapb
	LIVE {regs=[f1,f2,f3], spilled=[]}

Furthermore, the DEFFREG (hack) required that all floating point instruction
use all registers mentioned in the instruction. Therefore f1 := f2 + f3,
defines f1 and uses [f1,f2,f3]! This hack is no longer required resulting
in a cleaner alpha implementation. (Hopefully, intel will not get rid of
this architecture).

COPYXXX is intended to replace the parallel COPY and FCOPY  available on
all the architectures. This will result in further simplification of the
register allocator that must be aware of them for coalescing purposes, and
will also simplify certain aspects of the machine description that provides
callbacks related to parallel copies.

ANNOTATION should be obvious, and now INSTR represents the honest to God
machine instruction set!

The <arch>/instructions/<arch>Instr.sml files define certain utility
functions for making porting easier -- essentially converting upper case
to lower case. All machine instructions (of type instr) are in upper case,
and the lower case form generates an MLRISC instruction. For example on
the alpha we have:

  datatype instr =
     LDA of {r:cell, b:cell, d:operand}
   | ...

  val lda : {r:cell, b:cell, d:operand} -> instruction
    ...

where lda is just (INSTR o LDA), etc.

Changed paths:

Path Details
Directorysml/trunk/HISTORY modified , text changed
Directorysml/trunk/src/MLRISC/Tools/FakeSMLAst/ast-pp.sml modified , text changed
Directorysml/trunk/src/MLRISC/Tools/MDL/mdl-gen-asm.sml modified , text changed
Directorysml/trunk/src/MLRISC/Tools/MDL/mdl-gen-instr.sml modified , text changed
Directorysml/trunk/src/MLRISC/Tools/MDL/mdl-gen-mc.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/alpha.mdl modified , text changed
Directorysml/trunk/src/MLRISC/alpha/backpatch/alphaJumps.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/emit/alphaAsm.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/emit/alphaMC.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/instructions/alphaFreqProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/instructions/alphaInstr.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/instructions/alphaProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/instructions/alphaShuffle.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/mltree/alpha.sml modified , text changed
Directorysml/trunk/src/MLRISC/alpha/ra/alphaRewrite.sml modified , text changed
Directorysml/trunk/src/MLRISC/backpatch/vlBackPatch.sml modified , text changed
Directorysml/trunk/src/MLRISC/cm/MLRISC.cm modified , text changed
Directorysml/trunk/src/MLRISC/hppa/backpatch/hppaDelaySlotProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/backpatch/hppaJumps.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/emit/hppaAsm.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/emit/hppaMC.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/hppa.mdl modified , text changed
Directorysml/trunk/src/MLRISC/hppa/instructions/hppaFreqProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/instructions/hppaInstr.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/instructions/hppaProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/instructions/hppaShuffle.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/mltree/hppa.sml modified , text changed
Directorysml/trunk/src/MLRISC/hppa/ra/hppaRewrite.sml modified , text changed
Directorysml/trunk/src/MLRISC/instructions/instructions.sig modified , text changed
Directorysml/trunk/src/MLRISC/mltree/mltree.sig modified , text changed
Directorysml/trunk/src/MLRISC/mltree/mltree.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/backpatch/ppcJumps.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/emit/ppcAsm.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/emit/ppcMC.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/instructions/ppcFreqProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/instructions/ppcInstr.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/instructions/ppcProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/instructions/ppcShuffle.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/mltree/ppc.sml modified , text changed
Directorysml/trunk/src/MLRISC/ppc/ppc.mdl modified , text changed
Directorysml/trunk/src/MLRISC/ppc/ra/ppcRewrite.sml modified , text changed
Directorysml/trunk/src/MLRISC/ra/risc-ra.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/backpatch/sparcDelaySlotProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/backpatch/sparcJumps.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/emit/sparcAsm.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/emit/sparcMC.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/instructions/sparcFreqProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/instructions/sparcInstr.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/instructions/sparcProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/instructions/sparcShuffle.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/instructions/sparccomp-instr-ext.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/mltree/sparc.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/ra/sparcRewrite.sml modified , text changed
Directorysml/trunk/src/MLRISC/sparc/sparc.mdl modified , text changed
Directorysml/trunk/src/MLRISC/x86/backpatch/x86Jumps.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/emit/x86Asm.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/emit/x86MC.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/instructions/x86ExpandCopies.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/instructions/x86FreqProps.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/instructions/x86Instr.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/instructions/x86Props.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/instructions/x86Shuffle.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/instructions/x86comp-instr-ext.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/mltree/x86-fp.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/mltree/x86.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/omit-frameptr/x86omit-frameptr.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/ra/x86RA.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/ra/x86Rewrite.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/ra/x86Spill.sml modified , text changed
Directorysml/trunk/src/MLRISC/x86/x86.mdl modified , text changed
Directorysml/trunk/src/MLRISC/x86/x86MC.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/alpha32/alpha32CG.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/alpha32/alpha32PseudoInstrs.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/hppa/hppaCG.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/hppa/hppaLabelComp.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/hppa/hppaMillicode.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/ppc/ppcCG.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/ppc/ppcMLTree.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/ppc/ppcPseudoInstr.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/sparc/sparcCG.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/sparc/sparcPseudoInstrs.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/x86/x86CG.sml modified , text changed
Directorysml/trunk/src/compiler/CodeGen/x86/x86MLTreeExtComp.sml modified , text changed

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