|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcoins.backend.gen.CodeGenerator
coins.backend.gen.CodeGenerator_x86_64
| Nested Class Summary | |
(package private) class |
CodeGenerator_x86_64.RewrState
State label for rewriting engine. |
(package private) class |
CodeGenerator_x86_64.State
State label for instruction selection engine. |
(package private) static class |
CodeGenerator_x86_64.X86_64Attr
X86_64's function attribute |
| Nested classes inherited from class coins.backend.gen.CodeGenerator |
CodeGenerator.FunctionAttr, CodeGenerator.LexpToString, CodeGenerator.Match |
| Field Summary | |
(package private) static int |
INT_CLASS
|
(package private) static java.lang.String[][] |
IREGPARAM
|
(package private) static int |
MAX_F_REGPARAM
|
(package private) static int |
MAX_I_REGPARAM
|
(package private) int |
maxStackOffset
|
(package private) static int |
MEMORY
|
(package private) static int |
NO_CLASS
|
(package private) int |
numberOfCALLs
|
(package private) boolean |
rbpUsed
|
(package private) ImList |
regCallClobbers
|
(package private) LirNode |
retAggrAddr
|
(package private) int[] |
retAggrClass
|
(package private) static java.lang.String[][] |
RETURN_I_REG
|
(package private) static int |
SSE
|
(package private) CodeGenerator_x86_64.State[] |
stateVec
State vector for labeling LIR nodes. |
(package private) static java.lang.String[] |
STORE_F_REG
|
(package private) static java.lang.String[] |
STORE_I_REG
|
(package private) SymRoot |
symRoot
|
(package private) LocalTransformer |
TailRecursionTrig
|
| 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_x86_64()
Create code generator engine. |
|
| Method Summary | |
int |
alignForType(int type)
Return alignment for type. |
(package private) void |
checkLastArg(CodeGenerator_x86_64.X86_64Attr attr)
|
(package private) int[] |
classify(Type aggrType)
|
(package private) java.lang.String |
defaultRegsetForType(int type)
Return default register set for type. |
Transformer[] |
earlyRewritingSequence()
Return early time pre-rewriting sequence. |
(package private) java.lang.String |
emitAfter(java.lang.String x,
java.lang.String y)
|
(package private) void |
emitBeginningOfSegment(java.io.PrintWriter out,
java.lang.String segment)
Emit beginning of segment |
(package private) void |
emitCommon(java.io.PrintWriter out,
SymStatic symbol,
int bytes)
Emit data common |
(package private) void |
emitData(java.io.PrintWriter out,
int type,
LirNode node)
Emit data |
(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) java.lang.String |
floatSizeSuffix(java.lang.Object arg)
Return floating point memory's size. |
(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) SymRoot |
getSymRoot()
|
(package private) Type |
hirType(LirNode arg)
|
(package private) void |
initLabeling(LirFactory lir)
Initialize for labeling. |
(package private) void |
initRewriteLabeling()
Initialization for rewriting. |
(package private) boolean |
isInRegister(int[] aggrClass,
int[] index_disp,
int nextSize,
int nextDisp,
Type nextType)
|
(package private) boolean |
isVarArgs(LirNode calledFunc)
|
(package private) java.lang.Object |
jmac1(LirNode x)
Decode SUBREG node. |
(package private) java.lang.String |
jmac10(java.lang.String base)
|
(package private) java.lang.String |
jmac11(java.lang.String base,
java.lang.String index)
|
(package private) java.lang.String |
jmac12(java.lang.String con,
java.lang.String reg)
|
(package private) java.lang.String |
jmac13(java.lang.String reg,
java.lang.String scale)
|
(package private) java.lang.String |
jmac14(java.lang.String x)
Return lower half register name. |
(package private) java.lang.String |
jmac15(java.lang.String x)
Return lowest byte register name. |
(package private) java.lang.String |
jmac16(java.lang.String x)
Return lower 32bit of memory/register/constant operand. |
(package private) java.lang.String |
jmac17(java.lang.String x)
|
(package private) java.lang.String |
jmac18(java.lang.String x)
|
(package private) java.lang.String |
jmac19(java.lang.String x)
|
(package private) java.lang.String |
jmac2(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac20(java.lang.String x)
Return upper 32bit of memory/register/constant operand. |
(package private) java.lang.String |
jmac21(java.lang.String x)
Return expanded 32bit register name.(w to l) |
(package private) java.lang.String |
jmac22(java.lang.String x)
Return expanded 32bit register name.(b to l) |
(package private) java.lang.String |
jmac23(java.lang.String x)
Return expanded 64bit register name.(l to q) |
(package private) java.lang.String |
jmac24(java.lang.String x)
Return full register name. |
(package private) java.lang.String |
jmac25(java.lang.Object f)
Generate prologue sequence. |
(package private) java.lang.String |
jmac26(java.lang.Object f,
java.lang.String rettype)
Generate epilogue sequence. |
(package private) java.lang.String |
jmac27(java.lang.String con)
|
(package private) java.lang.String |
jmac28(java.lang.String x)
|
(package private) java.lang.String |
jmac29(java.lang.String x)
|
(package private) java.lang.String |
jmac3(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac30(java.lang.String format,
java.lang.Object args)
|
(package private) java.lang.String |
jmac4(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac5(java.lang.String x)
|
(package private) java.lang.String |
jmac6(java.lang.String x)
|
(package private) java.lang.String |
jmac7(java.lang.String x)
|
(package private) java.lang.String |
jmac8(java.lang.String type,
java.lang.String x)
|
(package private) java.lang.String |
jmac9(java.lang.String base)
|
(package private) void |
labelTree(LirNode t)
Label LIR tree t. |
Transformer[] |
lateRewritingSequence()
Return late time pre-rewriting sequence. |
(package private) java.lang.String |
makeAsmSymbol(java.lang.String symbol)
Convert symbol to assembler form. |
(package private) CodeGenerator.FunctionAttr |
newFunctionAttr(Function func)
Prepare new function attribute information. |
(package private) LirNode |
paramCount(LirNode node)
count number of parameters in PROLOGUE |
(package private) void |
peepHoleOpt(BiList list)
Postprocess list-form assembler source. |
(package private) java.lang.Object |
quiltLir(LirNode node)
Expand building-macro, for LirNode |
(package private) LirNode |
returnReg(int type)
Return the register for value returned. |
(package private) LirNode |
rewriteCall(LirNode node,
BiList pre,
BiList post)
Rewrite CALL node. |
(package private) LirNode |
rewriteDIVMOD(LirNode node,
BiList pre,
int opCode)
|
(package private) LirNode |
rewriteDIVMODby1(LirNode node,
BiList pre,
int opCode)
|
(package private) LirNode |
rewriteDIVMODtoShift(LirNode node,
BiList pre,
int opCode)
|
(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 |
rewriteMULtoShift(LirNode node,
BiList pre)
|
(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) LirNode |
rewriteVaArg(LirNode node,
BiList pre)
|
(package private) java.lang.String |
segmentForConst()
Return segment for read-only constant. |
(package private) void |
setAllocaCalled()
Set alloca called. |
(package private) void |
setFuncAttr(int numberOfCALLs,
int maxStackOffset)
|
(package private) void |
setParamCount(int paramIcount,
int paramFcount,
LirNode lastArg)
|
(package private) void |
setStackParams(int stackParams)
|
(package private) LirNode |
setVaStartCalled(LirNode callNode)
|
(package private) LirNode |
setVaStartCalledLate(LirNode callNode,
BiList pre)
|
(package private) java.lang.String |
showLabel(LirNode t)
Return label state |
(package private) int |
startNT()
Return start nonterminal symbol. |
(package private) LirNode |
stripConv(LirNode tree)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
CodeGenerator_x86_64.State[] stateVec
ImList regCallClobbers
final LocalTransformer TailRecursionTrig
static final int MAX_I_REGPARAM
static final java.lang.String[][] IREGPARAM
static final int MAX_F_REGPARAM
static final java.lang.String[] STORE_F_REG
static final java.lang.String[] STORE_I_REG
static final java.lang.String[][] RETURN_I_REG
static final int NO_CLASS
static final int MEMORY
static final int INT_CLASS
static final int SSE
int maxStackOffset
int numberOfCALLs
boolean rbpUsed
int[] retAggrClass
LirNode retAggrAddr
SymRoot symRoot
| Constructor Detail |
public CodeGenerator_x86_64()
| Method Detail |
void initRewriteLabeling()
CodeGenerator
initRewriteLabeling in class CodeGenerator
LirNode rewriteTree(LirNode tree,
java.lang.String phase,
BiList pre,
BiList post)
rewriteTree in class CodeGeneratorjava.lang.String defaultRegsetForType(int type)
defaultRegsetForType in class CodeGeneratorvoid initLabeling(LirFactory lir)
CodeGenerator
initLabeling in class CodeGeneratorjava.lang.String showLabel(LirNode t)
CodeGenerator
showLabel in class CodeGeneratorvoid labelTree(LirNode t)
CodeGenerator
labelTree in class CodeGenerator
Rule getRule(LirNode t,
int goal)
CodeGenerator
getRule in class CodeGenerator
int getCost1(LirNode t,
int goal)
CodeGenerator
getCost1 in class CodeGenerator
int getCost2(LirNode t,
int goal)
getCost2 in class CodeGeneratorint startNT()
CodeGenerator
startNT in class CodeGeneratorjava.lang.Object expandBuildMacro(ImList form)
expandBuildMacro in class CodeGeneratorjava.lang.Object quiltLir(LirNode node)
quiltLir in class CodeGenerator
java.lang.String emitList(ImList form,
boolean topLevel)
emitList in class CodeGeneratorjava.lang.String emitLir(LirNode node)
emitLir in class CodeGeneratorCodeGenerator.FunctionAttr newFunctionAttr(Function func)
CodeGenerator
newFunctionAttr in class CodeGeneratorvoid setAllocaCalled()
LirNode setVaStartCalled(LirNode callNode)
void checkLastArg(CodeGenerator_x86_64.X86_64Attr attr)
LirNode setVaStartCalledLate(LirNode callNode,
BiList pre)
LirNode rewriteVaArg(LirNode node,
BiList pre)
void setFuncAttr(int numberOfCALLs,
int maxStackOffset)
void setStackParams(int stackParams)
void setParamCount(int paramIcount,
int paramFcount,
LirNode lastArg)
LirNode stripConv(LirNode tree)
LirNode rewriteFrame(LirNode node)
rewriteFrame in class CodeGeneratorpublic Transformer[] earlyRewritingSequence()
earlyRewritingSequence in class CodeGeneratorpublic Transformer[] lateRewritingSequence()
lateRewritingSequence in class CodeGenerator
LirNode rewriteDIVMODby1(LirNode node,
BiList pre,
int opCode)
LirNode rewriteDIVMOD(LirNode node,
BiList pre,
int opCode)
LirNode rewriteDIVMODtoShift(LirNode node,
BiList pre,
int opCode)
LirNode rewriteMULtoShift(LirNode node,
BiList pre)
SymRoot getSymRoot()
LirNode paramCount(LirNode node)
LirNode rewritePrologue(LirNode node,
BiList post)
rewritePrologue in class CodeGeneratorLirNode returnReg(int type)
LirNode rewriteEpilogue(LirNode node,
BiList pre)
rewriteEpilogue in class CodeGeneratorboolean isVarArgs(LirNode calledFunc)
Type hirType(LirNode arg)
int[] classify(Type aggrType)
boolean isInRegister(int[] aggrClass,
int[] index_disp,
int nextSize,
int nextDisp,
Type nextType)
LirNode rewriteCall(LirNode node,
BiList pre,
BiList post)
rewriteCall in class CodeGeneratorvoid peepHoleOpt(BiList list)
peepHoleOpt in class CodeGeneratorlist - assembler source in list form.java.lang.String floatSizeSuffix(java.lang.Object arg)
arg - memory operand list.
java.lang.Object jmac1(LirNode x)
java.lang.String jmac2(java.lang.String x,
java.lang.String y)
java.lang.String emitAfter(java.lang.String x,
java.lang.String y)
java.lang.String jmac3(java.lang.String x,
java.lang.String y)
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)
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)
java.lang.String jmac15(java.lang.String x)
java.lang.String jmac16(java.lang.String x)
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 jmac20(java.lang.String x)
java.lang.String jmac21(java.lang.String x)
java.lang.String jmac22(java.lang.String x)
java.lang.String jmac23(java.lang.String x)
java.lang.String jmac24(java.lang.String x)
java.lang.String jmac25(java.lang.Object f)
java.lang.String jmac26(java.lang.Object f,
java.lang.String rettype)
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 jmac30(java.lang.String format,
java.lang.Object args)
void emitBeginningOfSegment(java.io.PrintWriter out,
java.lang.String segment)
emitBeginningOfSegment in class CodeGenerator
void emitLinkage(java.io.PrintWriter out,
SymStatic symbol)
CodeGenerator
emitLinkage in class CodeGeneratorjava.lang.String makeAsmSymbol(java.lang.String symbol)
makeAsmSymbol in class CodeGeneratorpublic int alignForType(int type)
CodeGenerator
alignForType in class CodeGeneratorjava.lang.String segmentForConst()
CodeGenerator
segmentForConst in class CodeGenerator
void emitData(java.io.PrintWriter out,
int type,
LirNode node)
emitData in class CodeGenerator
void emitCommon(java.io.PrintWriter out,
SymStatic symbol,
int bytes)
emitCommon in class CodeGenerator
void emitZeros(java.io.PrintWriter out,
int bytes)
emitZeros in class CodeGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||