|
||||||||||
| 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_sh4
| Nested Class Summary | |
(package private) class |
CodeGenerator_sh4.CodeAnalysisInfo
|
(package private) static class |
CodeGenerator_sh4.LabelRegister
|
(package private) static class |
CodeGenerator_sh4.RegistLabel
|
(package private) class |
CodeGenerator_sh4.RewrState
State label for rewriting engine. |
(package private) static class |
CodeGenerator_sh4.SH4Attr
Sparc's function attribute |
(package private) class |
CodeGenerator_sh4.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 |
BASEREGPARAM
|
(package private) static int |
code_size_inblock
|
(package private) static int |
F32
|
(package private) static int |
F64
|
(package private) static int |
fpscr_ctrl
|
(package private) static int |
I16
|
(package private) static int |
I32
|
(package private) static int |
I8
|
(package private) static CodeGenerator_sh4.RegistLabel |
label_long_const
|
(package private) static CodeGenerator_sh4.RegistLabel |
label_short_const
|
(package private) static BiList |
list
|
(package private) static int |
MAXREGPARAM
Late time pre-rewriting of LIR. |
(package private) static int |
MAXREGPARAM_F
|
(package private) static int |
offset_calc
Rewrite FRAME node to target machine form. |
(package private) ImList |
regCallClobbers
|
(package private) static java.lang.String[] |
regist_global_label
|
(package private) static int |
regist_global_label_count
|
(package private) static int |
stackshift
|
(package private) CodeGenerator_sh4.State[] |
stateVec
State vector for labeling LIR nodes. |
| Fields inherited from class coins.backend.gen.CodeGenerator |
addrType, asmWriter, convention, debOut, disableRewrite, F128, func, funcAttrTbl, I64, INLINECOPYUNIT, lexpConv, lir, localEarlyRewritingTrig, localLateRewritingTrig, machineName, machineParams, module, optSpeed, ProcessFramesTrig, root, typeParamWord |
| Constructor Summary | |
CodeGenerator_sh4()
Create code generator engine. |
|
| Method Summary | |
(package private) boolean |
codeSizeAnalysis(Function f)
|
(package private) java.lang.String |
defaultRegsetForType(int type)
Return default register set for type. |
void |
earlyRewritingMachineDep(Module module)
Early time pre-rewriting of LIR. |
(package private) void |
emitAlign(java.io.PrintWriter out,
int align)
Emit data align |
(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 |
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 |
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 |
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) java.lang.String |
emitObjectX(java.lang.Object x,
boolean top)
Convert S-expression assembly code to string. |
(package private) void |
emitZeros(java.io.PrintWriter out,
int bytes)
Emit data zeros |
(package private) boolean |
equalArg(LirNode x,
LirNode y)
Return true if variable x and y are same. |
(package private) java.lang.Object |
expandBuildMacro(ImList form)
Expand building-macro. |
(package private) int |
frameSize(Function f)
Return frame size (in positive) of function. |
(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) int |
getOffset(Function f,
java.lang.String s)
|
(package private) Rule |
getRule(LirNode t,
int goal)
Return the chosen rule for LIR node t and goal nonterminal goal. |
(package private) int |
getStringCodeSize(java.lang.String line)
|
(package private) LirNode |
highlong(LirNode exp)
|
(package private) void |
initLabeling(LirFactory lir)
Initialize for labeling. |
(package private) void |
initRewriteLabeling()
Initialization for rewriting. |
(package private) boolean |
is8bitConst(LirNode node)
|
(package private) boolean |
isComplex(LirNode node)
Return true if node is a complex one. |
(package private) java.lang.Object |
jmac1(java.lang.Object x)
Return aggregate size & 0xfff. |
(package private) java.lang.String |
jmac10(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac11(java.lang.String x,
java.lang.String y)
Expand _set macro s.t. |
(package private) java.lang.String |
jmac12(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac13(java.lang.String x)
|
(package private) java.lang.String |
jmac14(java.lang.String sign,
java.lang.String x,
java.lang.String y,
java.lang.String z)
|
(package private) java.lang.String |
jmac15(java.lang.String sign,
java.lang.String x,
java.lang.String y,
java.lang.String z)
|
(package private) java.lang.String |
jmac16(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac17(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac18(java.lang.String x)
|
(package private) java.lang.String |
jmac19(java.lang.String x)
|
(package private) java.lang.Object |
jmac2(LirNode x)
|
(package private) java.lang.String |
jmac20(java.lang.String x)
|
(package private) java.lang.String |
jmac21(java.lang.String x)
|
(package private) java.lang.String |
jmac22(java.lang.String x)
|
(package private) java.lang.String |
jmac23(java.lang.Object f)
|
(package private) java.lang.String |
jmac24(java.lang.Object f,
java.lang.String rettype)
|
(package private) java.lang.String |
jmac25(java.lang.String x)
|
(package private) java.lang.String |
jmac26(java.lang.String x)
|
(package private) java.lang.String |
jmac3(java.lang.String x)
|
(package private) java.lang.String |
jmac4(java.lang.String x,
java.lang.String y)
|
(package private) java.lang.String |
jmac5(java.lang.String code,
java.lang.String arg)
|
(package private) java.lang.String |
jmac6(java.lang.String code,
java.lang.String arg1)
|
(package private) java.lang.String |
jmac7(java.lang.String code,
java.lang.String arg1,
java.lang.String arg2)
|
(package private) java.lang.String |
jmac8(java.lang.String s,
java.lang.String code,
java.lang.String arg)
|
(package private) java.lang.String |
jmac9(java.lang.String mode,
java.lang.String code,
java.lang.String arg1,
java.lang.String arg2)
|
(package private) void |
labelTree(LirNode t)
Label LIR tree t. |
(package private) LirNode |
lowlong(LirNode exp)
|
(package private) int |
makeVaStart(LirNode arg)
Return offset for va_start position. |
(package private) CodeGenerator.FunctionAttr |
newFunctionAttr(Function func)
Prepare new function attribute information. |
(package private) void |
peepHoleOpt(BiList list)
Peep-hole optimizer. |
(package private) BiList |
preBuildCode(Function f)
|
(package private) void |
printBasicBlk(BasicBlk blk)
|
(package private) java.lang.Object |
quiltLir(LirNode node)
Expand building-macro, for LirNode |
(package private) LirNode |
rewriteAggregateCopy(LirNode node,
BiList pre)
Rewrite AGGREGATE COPY |
(package private) LirNode |
rewriteCall(LirNode node,
BiList pre,
BiList post)
Rewrite CALL. |
(package private) LirNode |
rewriteCONVFLOAT(LirNode node,
BiList pre)
Return early time pre-rewriting sequence. |
(package private) LirNode |
rewriteCONVFU(LirNode node)
|
(package private) LirNode |
rewriteCONVUF(LirNode node,
BiList pre)
Rewrite CONVUF |
(package private) LirNode |
rewriteDIV(LirNode node,
BiList pre)
|
(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 |
rewriteJumpc(LirNode node)
|
(package private) LirNode |
rewriteMOD(LirNode node,
BiList pre)
|
(package private) LirNode |
rewriteMUL(LirNode node)
|
(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 |
showLabel(LirNode t)
Return label state |
(package private) int |
startNT()
Return start nonterminal symbol. |
(package private) LirNode |
ToRegister(LirNode iReg,
BiList iOut)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
CodeGenerator_sh4.State[] stateVec
static int fpscr_ctrl
static int code_size_inblock
static int stackshift
static CodeGenerator_sh4.RegistLabel label_long_const
static CodeGenerator_sh4.RegistLabel label_short_const
static java.lang.String[] regist_global_label
static int regist_global_label_count
ImList regCallClobbers
static BiList list
static final int I32
static final int I16
static final int I8
static final int F64
static final int F32
static int offset_calc
static final int MAXREGPARAM
static final int MAXREGPARAM_F
static final int BASEREGPARAM
| Constructor Detail |
public CodeGenerator_sh4()
| 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 CodeGeneratorint frameSize(Function f)
CodeGenerator
frameSize in class CodeGenerator
int getOffset(Function f,
java.lang.String s)
int getStringCodeSize(java.lang.String line)
java.lang.String emitObjectX(java.lang.Object x,
boolean top)
CodeGenerator
emitObjectX in class CodeGeneratortop - true if this is a top-level.BiList preBuildCode(Function f)
boolean codeSizeAnalysis(Function f)
CodeGenerator.FunctionAttr newFunctionAttr(Function func)
CodeGenerator
newFunctionAttr in class CodeGeneratorint makeVaStart(LirNode arg)
boolean equalArg(LirNode x,
LirNode y)
CodeGenerator
equalArg in class CodeGeneratorvoid printBasicBlk(BasicBlk blk)
LirNode rewriteCONVFLOAT(LirNode node,
BiList pre)
LirNode rewriteMUL(LirNode node)
LirNode rewriteCONVFU(LirNode node)
LirNode rewriteDIV(LirNode node,
BiList pre)
LirNode rewriteMOD(LirNode node,
BiList pre)
LirNode ToRegister(LirNode iReg,
BiList iOut)
LirNode rewriteCONVUF(LirNode node,
BiList pre)
rewriteCONVUF in class CodeGeneratorLirNode rewriteFrame(LirNode node)
CodeGenerator
rewriteFrame in class CodeGeneratorpublic void earlyRewritingMachineDep(Module module)
void peepHoleOpt(BiList list)
CodeGenerator
peepHoleOpt in class CodeGeneratorLirNode rewriteJumpc(LirNode node)
LirNode rewritePrologue(LirNode node,
BiList post)
rewritePrologue in class CodeGenerator
LirNode rewriteCall(LirNode node,
BiList pre,
BiList post)
CodeGenerator
rewriteCall in class CodeGeneratorLirNode lowlong(LirNode exp)
LirNode highlong(LirNode exp)
LirNode rewriteAggregateCopy(LirNode node,
BiList pre)
rewriteAggregateCopy in class CodeGenerator
LirNode rewriteEpilogue(LirNode node,
BiList pre)
rewriteEpilogue in class CodeGeneratorboolean isComplex(LirNode node)
isComplex in class CodeGeneratorboolean is8bitConst(LirNode node)
java.lang.Object jmac1(java.lang.Object x)
java.lang.Object jmac2(LirNode x)
java.lang.String jmac3(java.lang.String x)
java.lang.String jmac4(java.lang.String x,
java.lang.String y)
java.lang.String jmac5(java.lang.String code,
java.lang.String arg)
java.lang.String jmac6(java.lang.String code,
java.lang.String arg1)
java.lang.String jmac7(java.lang.String code,
java.lang.String arg1,
java.lang.String arg2)
java.lang.String jmac8(java.lang.String s,
java.lang.String code,
java.lang.String arg)
java.lang.String jmac9(java.lang.String mode,
java.lang.String code,
java.lang.String arg1,
java.lang.String arg2)
java.lang.String jmac10(java.lang.String x,
java.lang.String y)
java.lang.String jmac11(java.lang.String x,
java.lang.String y)
java.lang.String jmac12(java.lang.String x,
java.lang.String y)
java.lang.String jmac13(java.lang.String x)
java.lang.String jmac14(java.lang.String sign,
java.lang.String x,
java.lang.String y,
java.lang.String z)
java.lang.String jmac15(java.lang.String sign,
java.lang.String x,
java.lang.String y,
java.lang.String z)
java.lang.String jmac16(java.lang.String x,
java.lang.String y)
java.lang.String jmac17(java.lang.String x,
java.lang.String y)
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.Object f)
java.lang.String jmac24(java.lang.Object f,
java.lang.String rettype)
java.lang.String jmac25(java.lang.String x)
java.lang.String jmac26(java.lang.String x)
void emitComment(java.io.PrintWriter out,
java.lang.String comment)
CodeGenerator
emitComment in class CodeGeneratorvoid emitBeginningOfModule(java.io.PrintWriter out)
void emitEndOfModule(java.io.PrintWriter out)
void emitBeginningOfSegment(java.io.PrintWriter out,
java.lang.String segment)
CodeGenerator
emitBeginningOfSegment in class CodeGenerator
void emitEndOfSegment(java.io.PrintWriter out,
java.lang.String segment)
CodeGenerator
emitEndOfSegment in class CodeGenerator
void emitDataLabel(java.io.PrintWriter out,
java.lang.String label)
CodeGenerator
emitDataLabel in class CodeGenerator
void emitCodeLabel(java.io.PrintWriter out,
java.lang.String label)
CodeGenerator
emitCodeLabel in class CodeGenerator
void emitAlign(java.io.PrintWriter out,
int align)
emitAlign in class CodeGenerator
void emitCommon(java.io.PrintWriter out,
SymStatic symbol,
int bytes)
emitCommon in class CodeGenerator
void emitLinkage(java.io.PrintWriter out,
SymStatic symbol)
emitLinkage in class CodeGenerator
void emitZeros(java.io.PrintWriter out,
int bytes)
emitZeros in class CodeGenerator
void emitData(java.io.PrintWriter out,
int type,
LirNode node)
emitData in class CodeGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||