coins.backend.gen
Class CodeGenerator_alpha

java.lang.Object
  extended bycoins.backend.gen.CodeGenerator
      extended bycoins.backend.gen.CodeGenerator_alpha

public class CodeGenerator_alpha
extends CodeGenerator


Nested Class Summary
(package private) static class CodeGenerator_alpha.AlphaAttr
           
(package private)  class CodeGenerator_alpha.RewrState
          State label for rewriting engine.
(package private)  class CodeGenerator_alpha.State
          State label for instruction selection engine.
 
Nested classes inherited from class coins.backend.gen.CodeGenerator
CodeGenerator.FunctionAttr, CodeGenerator.LexpToString, CodeGenerator.Match
 
Field Summary
(package private) static int FirstArgument
           
(package private) static int NumRegArgument
           
(package private)  ImList regCallClobbers
           
(package private) static int Regsize
           
(package private)  CodeGenerator_alpha.State[] stateVec
          State vector for labeling LIR nodes.
 
Fields inherited from class coins.backend.gen.CodeGenerator
addrType, asmWriter, convention, debOut, disableRewrite, F128, F32, F64, func, funcAttrTbl, I16, I32, I64, I8, INLINECOPYUNIT, lexpConv, lir, localEarlyRewritingTrig, localLateRewritingTrig, machineName, machineParams, module, optSpeed, ProcessFramesTrig, root, typeParamWord
 
Constructor Summary
CodeGenerator_alpha()
          Create code generator engine.
 
Method Summary
(package private)  java.lang.String _getRegsetOf(Symbol sym)
           
(package private)  void _setRegsetOf(Symbol sym, java.lang.String regset)
           
 int alignForType(int type)
          Return the alignment bytes for specified type.
(package private)  java.lang.String defaultRegsetForType(int type)
          Return default register set for type.
 Transformer[] earlyRewritingSequence()
          Return early time pre-rewriting sequence.
(package private)  void emitBeginningOfModule(java.io.PrintWriter out)
           
(package private)  void emitBeginningOfSegment(java.io.PrintWriter out, java.lang.String segment)
          Emit beginning of segment
(package private)  void emitCodeLabel(java.io.PrintWriter out, java.lang.String label)
          Emit label for code
(package private)  void emitComment(java.io.PrintWriter out, java.lang.String comment)
          print comment in assembly language.
(package private)  void emitData(java.io.PrintWriter out, int type, LirNode node)
          Emit data for big endian machine.
(package private)  void emitDataLabel(java.io.PrintWriter out, java.lang.String label)
          Emit label for data
(package private)  void emitEndOfModule(java.io.PrintWriter out)
           
(package private)  void emitEndOfSegment(java.io.PrintWriter out, java.lang.String segment)
          Emit end of segment
(package private)  void emitIdent(java.io.PrintWriter out, java.lang.String str)
          Print .ident in assembly language.
(package private)  void emitLinkage(java.io.PrintWriter out, SymStatic symbol)
          Emit linkage information of symbol
(package private)  java.lang.String emitLir(LirNode node)
          Expand emit-macro for LirNode.
(package private)  java.lang.String emitList(ImList form, boolean topLevel)
          Expand emit-macro for list form.
(package private)  void emitZeros(java.io.PrintWriter out, int bytes)
          Emit data zeros
(package private)  java.lang.Object expandBuildMacro(ImList form)
          Expand building-macro.
(package private)  int getCost1(LirNode t, int goal)
          Return the cost for LIR node t and goal nonterminal goal.
(package private)  int getCost2(LirNode t, int goal)
           
(package private)  Rule getRule(LirNode t, int goal)
          Return the chosen rule for LIR node t and goal nonterminal goal.
(package private)  void initLabeling(LirFactory lir)
          Initialize for labeling.
(package private)  void initRewriteLabeling()
          Initialization for rewriting.
(package private)  boolean isComplex(LirNode node)
          Return true if node is a complex one.
(package private)  java.lang.Object jmac1(LirNode x)
           
(package private)  java.lang.String jmac10(java.lang.String dest, java.lang.String src)
           
(package private)  java.lang.String jmac11(java.lang.String x)
           
(package private)  java.lang.String jmac12(java.lang.String x)
           
(package private)  java.lang.String jmac13(java.lang.String x)
           
(package private)  java.lang.String jmac14(java.lang.String x)
           
(package private)  java.lang.Object jmac2(java.lang.Object name)
           
(package private)  java.lang.String jmac3(java.lang.Object f)
           
(package private)  java.lang.String jmac4(java.lang.Object f, java.lang.String rettype)
           
(package private)  java.lang.String jmac5(java.lang.String x, java.lang.String y)
           
(package private)  java.lang.String jmac6(java.lang.String x, java.lang.String y)
           
(package private)  java.lang.String jmac7(java.lang.String x)
           
(package private)  java.lang.String jmac8(java.lang.String x)
           
(package private)  java.lang.String jmac9(java.lang.String x, java.lang.String y)
           
(package private)  void labelTree(LirNode t)
          Label LIR tree t.
 Transformer[] lateRewritingSequence()
          Return late time pre-rewriting sequence.
(package private)  CodeGenerator.FunctionAttr newFunctionAttr(Function func)
          Prepare new function attribute information.
(package private)  java.lang.Object quiltLir(LirNode node)
          Expand building-macro, for LirNode
(package private)  LirNode returnReg(int type)
           
(package private)  LirNode rewriteCall(LirNode node, BiList pre, BiList post)
          Rewrite CALL.
(package private)  LirNode rewriteEpilogue(LirNode node, BiList pre)
          Rewrite EPILOGUE
(package private)  LirNode rewriteFrame(LirNode node)
          Rewrite FRAME node to target machine form.
(package private)  LirNode rewritePrologue(LirNode node, BiList post)
          Rewrite PROLOGUE
(package private)  LirNode rewriteTree(LirNode tree, java.lang.String phase, BiList pre, BiList post)
          Rewrite L-expression.
(package private)  java.lang.String segmentForConst()
          Return segment for read-only constant.
(package private)  java.lang.String showLabel(LirNode t)
          Return label state
(package private)  int startNT()
          Return start nonterminal symbol.
 
Methods inherited from class coins.backend.gen.CodeGenerator
buildCode, clcvnClobbers, clcvnParamMem, clcvnParamOffset, clcvnParamReg, clcvnParamWord, clcvnPartialWord, clcvnPassFloatRegMem, clcvnRegLimit, clcvnReturnValue, clcvnSetPartialWord, clcvnStructReturnAsFirst, clcvnStructReturnPtr, close, codeInfo, convToAsm, dropRegToFrame, emitAlign, emitAsmCode, emitBeginningOfModule, emitCode, emitCommon, emitEndOfModule, emitLirDefault, emitListDefault, emitNamedConst, emitObject, emitObjectX, emitSegment, emitTop, equalArg, frameIsEmpty, frameSize, genHeader, genTrailer, getFunctionAttr, getMachineParams, initialize, initializeMachineDep, insertPostProcessor, instructionSelection, isSimple, makeAsmSymbol, makeLabelDef, mapRegToFrame, nActualOperands, noRescan, notifyEndToPostProcessor, paramOffset, paramToBeSaved, peepHoleOpt, phyReg, prepareCodeInfo, prerewrite, printLabel, quiltLirDefault, reduce, reserveFrame, rewriteAggregateCopy, rewriteAsm, rewriteCONVFU, rewriteCONVUF, rewriteJumpn, setAsmStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stateVec

CodeGenerator_alpha.State[] stateVec
State vector for labeling LIR nodes. Suffix is a LirNode's id.


regCallClobbers

ImList regCallClobbers

Regsize

static final int Regsize
See Also:
Constant Field Values

FirstArgument

static final int FirstArgument
See Also:
Constant Field Values

NumRegArgument

static final int NumRegArgument
See Also:
Constant Field Values
Constructor Detail

CodeGenerator_alpha

public CodeGenerator_alpha()
Create code generator engine.

Method Detail

initRewriteLabeling

void initRewriteLabeling()
Description copied from class: CodeGenerator
Initialization for rewriting.

Specified by:
initRewriteLabeling in class CodeGenerator

rewriteTree

LirNode rewriteTree(LirNode tree,
                    java.lang.String phase,
                    BiList pre,
                    BiList post)
Rewrite L-expression.

Specified by:
rewriteTree in class CodeGenerator

defaultRegsetForType

java.lang.String defaultRegsetForType(int type)
Return default register set for type.

Specified by:
defaultRegsetForType in class CodeGenerator

initLabeling

void initLabeling(LirFactory lir)
Description copied from class: CodeGenerator
Initialize for labeling.

Specified by:
initLabeling in class CodeGenerator

showLabel

java.lang.String showLabel(LirNode t)
Description copied from class: CodeGenerator
Return label state

Specified by:
showLabel in class CodeGenerator

labelTree

void labelTree(LirNode t)
Description copied from class: CodeGenerator
Label LIR tree t.

Specified by:
labelTree in class CodeGenerator

getRule

Rule getRule(LirNode t,
             int goal)
Description copied from class: CodeGenerator
Return the chosen rule for LIR node t and goal nonterminal goal.

Specified by:
getRule in class CodeGenerator

getCost1

int getCost1(LirNode t,
             int goal)
Description copied from class: CodeGenerator
Return the cost for LIR node t and goal nonterminal goal.

Specified by:
getCost1 in class CodeGenerator

getCost2

int getCost2(LirNode t,
             int goal)
Specified by:
getCost2 in class CodeGenerator

startNT

int startNT()
Description copied from class: CodeGenerator
Return start nonterminal symbol.

Specified by:
startNT in class CodeGenerator

expandBuildMacro

java.lang.Object expandBuildMacro(ImList form)
Expand building-macro.

Specified by:
expandBuildMacro in class CodeGenerator

quiltLir

java.lang.Object quiltLir(LirNode node)
Expand building-macro, for LirNode

Specified by:
quiltLir in class CodeGenerator

emitList

java.lang.String emitList(ImList form,
                          boolean topLevel)
Expand emit-macro for list form.

Specified by:
emitList in class CodeGenerator

emitLir

java.lang.String emitLir(LirNode node)
Expand emit-macro for LirNode.

Specified by:
emitLir in class CodeGenerator

rewriteFrame

LirNode rewriteFrame(LirNode node)
Description copied from class: CodeGenerator
Rewrite FRAME node to target machine form.

Overrides:
rewriteFrame in class CodeGenerator

earlyRewritingSequence

public Transformer[] earlyRewritingSequence()
Description copied from class: CodeGenerator
Return early time pre-rewriting sequence.

Overrides:
earlyRewritingSequence in class CodeGenerator

lateRewritingSequence

public Transformer[] lateRewritingSequence()
Description copied from class: CodeGenerator
Return late time pre-rewriting sequence.

Overrides:
lateRewritingSequence in class CodeGenerator

_setRegsetOf

void _setRegsetOf(Symbol sym,
                  java.lang.String regset)

_getRegsetOf

java.lang.String _getRegsetOf(Symbol sym)

rewritePrologue

LirNode rewritePrologue(LirNode node,
                        BiList post)
Description copied from class: CodeGenerator
Rewrite PROLOGUE

Overrides:
rewritePrologue in class CodeGenerator

returnReg

LirNode returnReg(int type)

rewriteEpilogue

LirNode rewriteEpilogue(LirNode node,
                        BiList pre)
Description copied from class: CodeGenerator
Rewrite EPILOGUE

Overrides:
rewriteEpilogue in class CodeGenerator

isComplex

boolean isComplex(LirNode node)
Description copied from class: CodeGenerator
Return true if node is a complex one.

Overrides:
isComplex in class CodeGenerator

rewriteCall

LirNode rewriteCall(LirNode node,
                    BiList pre,
                    BiList post)
Description copied from class: CodeGenerator
Rewrite CALL. Subclasses may override this.

Overrides:
rewriteCall in class CodeGenerator

segmentForConst

java.lang.String segmentForConst()
Description copied from class: CodeGenerator
Return segment for read-only constant.

Overrides:
segmentForConst in class CodeGenerator

alignForType

public int alignForType(int type)
Return the alignment bytes for specified type.

Overrides:
alignForType in class CodeGenerator

emitComment

void emitComment(java.io.PrintWriter out,
                 java.lang.String comment)
Description copied from class: CodeGenerator
print comment in assembly language.

Overrides:
emitComment in class CodeGenerator

emitBeginningOfModule

void emitBeginningOfModule(java.io.PrintWriter out)

emitEndOfModule

void emitEndOfModule(java.io.PrintWriter out)

emitEndOfSegment

void emitEndOfSegment(java.io.PrintWriter out,
                      java.lang.String segment)
Description copied from class: CodeGenerator
Emit end of segment

Overrides:
emitEndOfSegment in class CodeGenerator

newFunctionAttr

CodeGenerator.FunctionAttr newFunctionAttr(Function func)
Description copied from class: CodeGenerator
Prepare new function attribute information.

Overrides:
newFunctionAttr in class CodeGenerator

emitBeginningOfSegment

void emitBeginningOfSegment(java.io.PrintWriter out,
                            java.lang.String segment)
Description copied from class: CodeGenerator
Emit beginning of segment

Overrides:
emitBeginningOfSegment in class CodeGenerator

emitDataLabel

void emitDataLabel(java.io.PrintWriter out,
                   java.lang.String label)
Description copied from class: CodeGenerator
Emit label for data

Overrides:
emitDataLabel in class CodeGenerator

emitCodeLabel

void emitCodeLabel(java.io.PrintWriter out,
                   java.lang.String label)
Description copied from class: CodeGenerator
Emit label for code

Overrides:
emitCodeLabel in class CodeGenerator

emitLinkage

void emitLinkage(java.io.PrintWriter out,
                 SymStatic symbol)
Description copied from class: CodeGenerator
Emit linkage information of symbol

Overrides:
emitLinkage in class CodeGenerator

emitZeros

void emitZeros(java.io.PrintWriter out,
               int bytes)
Description copied from class: CodeGenerator
Emit data zeros

Overrides:
emitZeros in class CodeGenerator

emitData

void emitData(java.io.PrintWriter out,
              int type,
              LirNode node)
Description copied from class: CodeGenerator
Emit data for big endian machine. Redefine this method if your machine is little endian.

Overrides:
emitData in class CodeGenerator

jmac1

java.lang.Object jmac1(LirNode x)

jmac2

java.lang.Object jmac2(java.lang.Object name)

emitIdent

void emitIdent(java.io.PrintWriter out,
               java.lang.String str)
Description copied from class: CodeGenerator
Print .ident in assembly language.

Overrides:
emitIdent in class CodeGenerator

jmac3

java.lang.String jmac3(java.lang.Object f)

jmac4

java.lang.String jmac4(java.lang.Object f,
                       java.lang.String rettype)

jmac5

java.lang.String jmac5(java.lang.String x,
                       java.lang.String y)

jmac6

java.lang.String jmac6(java.lang.String x,
                       java.lang.String y)

jmac7

java.lang.String jmac7(java.lang.String x)

jmac8

java.lang.String jmac8(java.lang.String x)

jmac9

java.lang.String jmac9(java.lang.String x,
                       java.lang.String y)

jmac10

java.lang.String jmac10(java.lang.String dest,
                        java.lang.String src)

jmac11

java.lang.String jmac11(java.lang.String x)

jmac12

java.lang.String jmac12(java.lang.String x)

jmac13

java.lang.String jmac13(java.lang.String x)

jmac14

java.lang.String jmac14(java.lang.String x)