coins.backend.gen
クラス CodeGenerator_x86_64

java.lang.Object
  |
  +--coins.backend.gen.CodeGenerator
        |
        +--coins.backend.gen.CodeGenerator_x86_64

public class CodeGenerator_x86_64
extends CodeGenerator


入れ子クラスの概要
(パッケージプライベート)  class CodeGenerator_x86_64.RewrState
          State label for rewriting engine.
(パッケージプライベート)  class CodeGenerator_x86_64.State
          State label for instruction selection engine.
(パッケージプライベート) static class CodeGenerator_x86_64.X86_64Attr
          X86_64's function attribute
 
クラス coins.backend.gen.CodeGenerator から継承した入れ子クラス
CodeGenerator.LexpToString, CodeGenerator.Match
 
フィールドの概要
(パッケージプライベート) static int INT_CLASS
           
(パッケージプライベート) static java.lang.String[][] IREGPARAM
           
(パッケージプライベート) static int MAX_F_REGPARAM
           
(パッケージプライベート) static int MAX_I_REGPARAM
           
(パッケージプライベート)  int maxStackOffset
           
(パッケージプライベート) static int MEMORY
           
(パッケージプライベート) static int NO_CLASS
           
(パッケージプライベート)  int numberOfCALLs
           
(パッケージプライベート)  boolean rbpUsed
           
(パッケージプライベート)  ImList regCallClobbers
           
(パッケージプライベート)  LirNode retAggrAddr
           
(パッケージプライベート)  int[] retAggrClass
           
(パッケージプライベート) static java.lang.String[][] RETURN_I_REG
           
(パッケージプライベート) static int SSE
           
(パッケージプライベート)  CodeGenerator_x86_64.State[] stateVec
          State vector for labeling LIR nodes.
(パッケージプライベート) static java.lang.String[] STORE_F_REG
           
(パッケージプライベート) static java.lang.String[] STORE_I_REG
           
(パッケージプライベート)  SymRoot symRoot
           
(パッケージプライベート)  LocalTransformer TailRecursionTrig
           
 
クラス 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
 
コンストラクタの概要
CodeGenerator_x86_64()
          Create code generator engine.
 
メソッドの概要
 int alignForType(int type)
          Return alignment for type.
(パッケージプライベート)  void checkLastArg(CodeGenerator_x86_64.X86_64Attr attr)
           
(パッケージプライベート)  int[] classify(Type aggrType)
           
(パッケージプライベート)  java.lang.String defaultRegsetForType(int type)
          Return default register set for type.
 Transformer[] earlyRewritingSequence()
          Return early time pre-rewriting sequence.
(パッケージプライベート)  java.lang.String emitAfter(java.lang.String x, java.lang.String y)
           
(パッケージプライベート)  void emitBeginningOfSegment(java.io.PrintWriter out, java.lang.String segment)
          Emit beginning of segment
(パッケージプライベート)  void emitCommon(java.io.PrintWriter out, SymStatic symbol, int bytes)
          Emit data common
(パッケージプライベート)  void emitData(java.io.PrintWriter out, int type, LirNode node)
          Emit data
(パッケージプライベート)  void emitLinkage(java.io.PrintWriter out, SymStatic symbol)
          Emit linkage information of symbol
(パッケージプライベート)  java.lang.String emitLir(LirNode node)
          Expand emit-macro for LirNode.
(パッケージプライベート)  java.lang.String emitList(ImList form, boolean topLevel)
          Expand emit-macro for list form.
(パッケージプライベート)  void emitZeros(java.io.PrintWriter out, int bytes)
          Emit data zeros
(パッケージプライベート)  java.lang.Object expandBuildMacro(ImList form)
          Expand building-macro.
(パッケージプライベート)  java.lang.String floatSizeSuffix(java.lang.Object arg)
          Return floating point memory's size.
(パッケージプライベート)  int getCost1(LirNode t, int goal)
          Return the cost for LIR node t and goal nonterminal goal.
(パッケージプライベート)  int getCost2(LirNode t, int goal)
           
(パッケージプライベート)  Rule getRule(LirNode t, int goal)
          Return the chosen rule for LIR node t and goal nonterminal goal.
(パッケージプライベート)  SymRoot getSymRoot()
           
(パッケージプライベート)  Type hirType(LirNode arg)
           
(パッケージプライベート)  void initLabeling(LirFactory lir)
          Initialize for labeling.
(パッケージプライベート)  void initRewriteLabeling()
          Initialization for rewriting.
(パッケージプライベート)  boolean isInRegister(int[] aggrClass, int[] index_disp, int nextSize, int nextDisp, Type nextType)
           
(パッケージプライベート)  boolean isVarArgs(LirNode calledFunc)
           
(パッケージプライベート)  java.lang.Object jmac1(LirNode x)
          Decode SUBREG node.
(パッケージプライベート)  java.lang.String jmac10(java.lang.String base)
           
(パッケージプライベート)  java.lang.String jmac11(java.lang.String base, java.lang.String index)
           
(パッケージプライベート)  java.lang.String jmac12(java.lang.String con, java.lang.String reg)
           
(パッケージプライベート)  java.lang.String jmac13(java.lang.String reg, java.lang.String scale)
           
(パッケージプライベート)  java.lang.String jmac14(java.lang.String x)
          Return lower half register name.
(パッケージプライベート)  java.lang.String jmac15(java.lang.String x)
          Return lowest byte register name.
(パッケージプライベート)  java.lang.String jmac16(java.lang.String x)
          Return lower 32bit of memory/register/constant operand.
(パッケージプライベート)  java.lang.String jmac17(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac18(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac19(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac2(java.lang.String x, java.lang.String y)
           
(パッケージプライベート)  java.lang.String jmac20(java.lang.String x)
          Return upper 32bit of memory/register/constant operand.
(パッケージプライベート)  java.lang.String jmac21(java.lang.String x)
          Return expanded 32bit register name.
(パッケージプライベート)  java.lang.String jmac22(java.lang.String x)
          Return expanded 32bit register name.
(パッケージプライベート)  java.lang.String jmac23(java.lang.String x)
          Return expanded 64bit register name.
(パッケージプライベート)  java.lang.String jmac24(java.lang.String x)
          Return full register name.
(パッケージプライベート)  java.lang.String jmac25(java.lang.Object f)
          Generate prologue sequence.
(パッケージプライベート)  java.lang.String jmac26(java.lang.Object f, java.lang.String rettype)
          Generate epilogue sequence.
(パッケージプライベート)  java.lang.String jmac27(java.lang.String con)
           
(パッケージプライベート)  java.lang.String jmac28(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac29(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac3(java.lang.String x, java.lang.String y)
           
(パッケージプライベート)  java.lang.String jmac30(java.lang.String format, java.lang.Object args)
           
(パッケージプライベート)  java.lang.String jmac4(java.lang.String x, java.lang.String y)
           
(パッケージプライベート)  java.lang.String jmac5(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac6(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac7(java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac8(java.lang.String type, java.lang.String x)
           
(パッケージプライベート)  java.lang.String jmac9(java.lang.String base)
           
(パッケージプライベート)  void labelTree(LirNode t)
          Label LIR tree t.
 Transformer[] lateRewritingSequence()
          Return late time pre-rewriting sequence.
(パッケージプライベート)  java.lang.String makeAsmSymbol(java.lang.String symbol)
          Convert symbol to assembler form.
(パッケージプライベート)  CodeGenerator.FunctionAttr newFunctionAttr(Function func)
          Prepare new function attribute information.
(パッケージプライベート)  LirNode paramCount(LirNode node)
          count number of parameters in PROLOGUE
(パッケージプライベート)  void peepHoleOpt(BiList list)
          Postprocess list-form assembler source.
(パッケージプライベート)  java.lang.Object quiltLir(LirNode node)
          Expand building-macro, for LirNode
(パッケージプライベート)  LirNode returnReg(int type)
          Return the register for value returned.
(パッケージプライベート)  LirNode rewriteCall(LirNode node, BiList pre, BiList post)
          Rewrite CALL node.
(パッケージプライベート)  LirNode rewriteDIVMOD(LirNode node, BiList pre, int opCode)
           
(パッケージプライベート)  LirNode rewriteDIVMODby1(LirNode node, BiList pre, int opCode)
           
(パッケージプライベート)  LirNode rewriteDIVMODtoShift(LirNode node, BiList pre, int opCode)
           
(パッケージプライベート)  LirNode rewriteEpilogue(LirNode node, BiList pre)
          Rewrite EPILOGUE
(パッケージプライベート)  LirNode rewriteFrame(LirNode node)
          Rewrite FRAME node to target machine form.
(パッケージプライベート)  LirNode rewriteMULtoShift(LirNode node, BiList pre)
           
(パッケージプライベート)  LirNode rewritePrologue(LirNode node, BiList post)
          Rewrite PROLOGUE
(パッケージプライベート)  LirNode rewriteTree(LirNode tree, java.lang.String phase, BiList pre, BiList post)
          Rewrite L-expression.
(パッケージプライベート)  LirNode rewriteVaArg(LirNode node, BiList pre)
           
(パッケージプライベート)  java.lang.String segmentForConst()
          Return segment for read-only constant.
(パッケージプライベート)  void setAllocaCalled()
          Set alloca called.
(パッケージプライベート)  void setFuncAttr(int numberOfCALLs, int maxStackOffset)
           
(パッケージプライベート)  void setParamCount(int paramIcount, int paramFcount, LirNode lastArg)
           
(パッケージプライベート)  void setStackParams(int stackParams)
           
(パッケージプライベート)  LirNode setVaStartCalled(LirNode callNode)
           
(パッケージプライベート)  LirNode setVaStartCalledLate(LirNode callNode, BiList pre)
           
(パッケージプライベート)  java.lang.String showLabel(LirNode t)
          Return label state
(パッケージプライベート)  int startNT()
          Return start nonterminal symbol.
(パッケージプライベート)  LirNode stripConv(LirNode tree)
           
 
クラス 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, emitCodeLabel, emitComment, emitDataLabel, emitEndOfModule, emitEndOfSegment, emitIdent, emitLirDefault, emitListDefault, emitNamedConst, emitObject, emitObjectX, emitSegment, emitTop, equalArg, frameIsEmpty, frameSize, genHeader, genTrailer, getFunctionAttr, getMachineParams, initialize, initializeMachineDep, insertPostProcessor, instructionSelection, isComplex, isSimple, makeLabelDef, mapRegToFrame, nActualOperands, noRescan, notifyEndToPostProcessor, paramOffset, paramToBeSaved, phyReg, prepareCodeInfo, prerewrite, printLabel, quiltLirDefault, reduce, reserveFrame, rewriteAggregateCopy, rewriteAsm, rewriteCONVFU, rewriteCONVUF, rewriteJumpn, setAsmStream
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

stateVec

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


regCallClobbers

ImList regCallClobbers

TailRecursionTrig

final LocalTransformer TailRecursionTrig

MAX_I_REGPARAM

static final int MAX_I_REGPARAM
関連項目:
定数フィールド値

IREGPARAM

static final java.lang.String[][] IREGPARAM

MAX_F_REGPARAM

static final int MAX_F_REGPARAM
関連項目:
定数フィールド値

STORE_F_REG

static final java.lang.String[] STORE_F_REG

STORE_I_REG

static final java.lang.String[] STORE_I_REG

RETURN_I_REG

static final java.lang.String[][] RETURN_I_REG

NO_CLASS

static final int NO_CLASS
関連項目:
定数フィールド値

MEMORY

static final int MEMORY
関連項目:
定数フィールド値

INT_CLASS

static final int INT_CLASS
関連項目:
定数フィールド値

SSE

static final int SSE
関連項目:
定数フィールド値

maxStackOffset

int maxStackOffset

numberOfCALLs

int numberOfCALLs

rbpUsed

boolean rbpUsed

retAggrClass

int[] retAggrClass

retAggrAddr

LirNode retAggrAddr

symRoot

SymRoot symRoot
コンストラクタの詳細

CodeGenerator_x86_64

public CodeGenerator_x86_64()
Create code generator engine.

メソッドの詳細

initRewriteLabeling

void initRewriteLabeling()
クラス CodeGenerator の記述:
Initialization for rewriting.

定義:
クラス CodeGenerator 内の initRewriteLabeling

rewriteTree

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

定義:
クラス CodeGenerator 内の rewriteTree

defaultRegsetForType

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

定義:
クラス CodeGenerator 内の defaultRegsetForType

initLabeling

void initLabeling(LirFactory lir)
クラス CodeGenerator の記述:
Initialize for labeling.

定義:
クラス CodeGenerator 内の initLabeling

showLabel

java.lang.String showLabel(LirNode t)
クラス CodeGenerator の記述:
Return label state

定義:
クラス CodeGenerator 内の showLabel

labelTree

void labelTree(LirNode t)
クラス CodeGenerator の記述:
Label LIR tree t.

定義:
クラス CodeGenerator 内の labelTree

getRule

Rule getRule(LirNode t,
             int goal)
クラス CodeGenerator の記述:
Return the chosen rule for LIR node t and goal nonterminal goal.

定義:
クラス CodeGenerator 内の getRule

getCost1

int getCost1(LirNode t,
             int goal)
クラス CodeGenerator の記述:
Return the cost for LIR node t and goal nonterminal goal.

定義:
クラス CodeGenerator 内の getCost1

getCost2

int getCost2(LirNode t,
             int goal)
定義:
クラス CodeGenerator 内の getCost2

startNT

int startNT()
クラス CodeGenerator の記述:
Return start nonterminal symbol.

定義:
クラス CodeGenerator 内の startNT

expandBuildMacro

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

定義:
クラス CodeGenerator 内の expandBuildMacro

quiltLir

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

定義:
クラス CodeGenerator 内の quiltLir

emitList

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

定義:
クラス CodeGenerator 内の emitList

emitLir

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

定義:
クラス CodeGenerator 内の emitLir

newFunctionAttr

CodeGenerator.FunctionAttr newFunctionAttr(Function func)
クラス CodeGenerator の記述:
Prepare new function attribute information.

オーバーライド:
クラス CodeGenerator 内の newFunctionAttr

setAllocaCalled

void setAllocaCalled()
Set alloca called.


setVaStartCalled

LirNode setVaStartCalled(LirNode callNode)

checkLastArg

void checkLastArg(CodeGenerator_x86_64.X86_64Attr attr)

setVaStartCalledLate

LirNode setVaStartCalledLate(LirNode callNode,
                             BiList pre)

rewriteVaArg

LirNode rewriteVaArg(LirNode node,
                     BiList pre)

setFuncAttr

void setFuncAttr(int numberOfCALLs,
                 int maxStackOffset)

setStackParams

void setStackParams(int stackParams)

setParamCount

void setParamCount(int paramIcount,
                   int paramFcount,
                   LirNode lastArg)

stripConv

LirNode stripConv(LirNode tree)

rewriteFrame

LirNode rewriteFrame(LirNode node)
Rewrite FRAME node to target machine form.

オーバーライド:
クラス CodeGenerator 内の rewriteFrame

earlyRewritingSequence

public Transformer[] earlyRewritingSequence()
Return early time pre-rewriting sequence.

オーバーライド:
クラス CodeGenerator 内の earlyRewritingSequence

lateRewritingSequence

public Transformer[] lateRewritingSequence()
Return late time pre-rewriting sequence.

オーバーライド:
クラス CodeGenerator 内の lateRewritingSequence

rewriteDIVMODby1

LirNode rewriteDIVMODby1(LirNode node,
                         BiList pre,
                         int opCode)

rewriteDIVMOD

LirNode rewriteDIVMOD(LirNode node,
                      BiList pre,
                      int opCode)

rewriteDIVMODtoShift

LirNode rewriteDIVMODtoShift(LirNode node,
                             BiList pre,
                             int opCode)

rewriteMULtoShift

LirNode rewriteMULtoShift(LirNode node,
                          BiList pre)

getSymRoot

SymRoot getSymRoot()

paramCount

LirNode paramCount(LirNode node)
count number of parameters in PROLOGUE


rewritePrologue

LirNode rewritePrologue(LirNode node,
                        BiList post)
Rewrite PROLOGUE

オーバーライド:
クラス CodeGenerator 内の rewritePrologue

returnReg

LirNode returnReg(int type)
Return the register for value returned.


rewriteEpilogue

LirNode rewriteEpilogue(LirNode node,
                        BiList pre)
Rewrite EPILOGUE

オーバーライド:
クラス CodeGenerator 内の rewriteEpilogue

isVarArgs

boolean isVarArgs(LirNode calledFunc)

hirType

Type hirType(LirNode arg)

classify

int[] classify(Type aggrType)

isInRegister

boolean isInRegister(int[] aggrClass,
                     int[] index_disp,
                     int nextSize,
                     int nextDisp,
                     Type nextType)

rewriteCall

LirNode rewriteCall(LirNode node,
                    BiList pre,
                    BiList post)
Rewrite CALL node.

オーバーライド:
クラス CodeGenerator 内の rewriteCall

peepHoleOpt

void peepHoleOpt(BiList list)
Postprocess list-form assembler source.

オーバーライド:
クラス CodeGenerator 内の peepHoleOpt
パラメータ:
list - assembler source in list form.

floatSizeSuffix

java.lang.String floatSizeSuffix(java.lang.Object arg)
Return floating point memory's size.

パラメータ:
arg - memory operand list.
戻り値:
"s" for float, "d" for double.

jmac1

java.lang.Object jmac1(LirNode x)
Decode SUBREG node.


jmac2

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

emitAfter

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

jmac3

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

jmac4

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

jmac5

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

jmac6

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

jmac7

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

jmac8

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

jmac9

java.lang.String jmac9(java.lang.String base)

jmac10

java.lang.String jmac10(java.lang.String base)

jmac11

java.lang.String jmac11(java.lang.String base,
                        java.lang.String index)

jmac12

java.lang.String jmac12(java.lang.String con,
                        java.lang.String reg)

jmac13

java.lang.String jmac13(java.lang.String reg,
                        java.lang.String scale)

jmac14

java.lang.String jmac14(java.lang.String x)
Return lower half register name.


jmac15

java.lang.String jmac15(java.lang.String x)
Return lowest byte register name.


jmac16

java.lang.String jmac16(java.lang.String x)
Return lower 32bit of memory/register/constant operand.


jmac17

java.lang.String jmac17(java.lang.String x)

jmac18

java.lang.String jmac18(java.lang.String x)

jmac19

java.lang.String jmac19(java.lang.String x)

jmac20

java.lang.String jmac20(java.lang.String x)
Return upper 32bit of memory/register/constant operand.


jmac21

java.lang.String jmac21(java.lang.String x)
Return expanded 32bit register name.(w to l)


jmac22

java.lang.String jmac22(java.lang.String x)
Return expanded 32bit register name.(b to l)


jmac23

java.lang.String jmac23(java.lang.String x)
Return expanded 64bit register name.(l to q)


jmac24

java.lang.String jmac24(java.lang.String x)
Return full register name.


jmac25

java.lang.String jmac25(java.lang.Object f)
Generate prologue sequence.


jmac26

java.lang.String jmac26(java.lang.Object f,
                        java.lang.String rettype)
Generate epilogue sequence.


jmac27

java.lang.String jmac27(java.lang.String con)

jmac28

java.lang.String jmac28(java.lang.String x)

jmac29

java.lang.String jmac29(java.lang.String x)

jmac30

java.lang.String jmac30(java.lang.String format,
                        java.lang.Object args)

emitBeginningOfSegment

void emitBeginningOfSegment(java.io.PrintWriter out,
                            java.lang.String segment)
Emit beginning of segment

オーバーライド:
クラス CodeGenerator 内の emitBeginningOfSegment

emitLinkage

void emitLinkage(java.io.PrintWriter out,
                 SymStatic symbol)
クラス CodeGenerator の記述:
Emit linkage information of symbol

オーバーライド:
クラス CodeGenerator 内の emitLinkage

makeAsmSymbol

java.lang.String makeAsmSymbol(java.lang.String symbol)
Convert symbol to assembler form. Prepend "_" when mac or cygwin (COFF), untouched otherwise (ELF).

オーバーライド:
クラス CodeGenerator 内の makeAsmSymbol

alignForType

public int alignForType(int type)
クラス CodeGenerator の記述:
Return alignment for type.

オーバーライド:
クラス CodeGenerator 内の alignForType

segmentForConst

java.lang.String segmentForConst()
クラス CodeGenerator の記述:
Return segment for read-only constant.

オーバーライド:
クラス CodeGenerator 内の segmentForConst

emitData

void emitData(java.io.PrintWriter out,
              int type,
              LirNode node)
Emit data

オーバーライド:
クラス CodeGenerator 内の emitData

emitCommon

void emitCommon(java.io.PrintWriter out,
                SymStatic symbol,
                int bytes)
Emit data common

オーバーライド:
クラス CodeGenerator 内の emitCommon

emitZeros

void emitZeros(java.io.PrintWriter out,
               int bytes)
Emit data zeros

オーバーライド:
クラス CodeGenerator 内の emitZeros