|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--scale.backend.Generator
This class is the base class for code generators.
$Id: Generator.java,v 1.35 2002/01/03 21:41:30 burrill Exp $
Copyright 2002 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
A generator translates Scribble CFGs into a linear sequence of machine instructions.
| Field Summary | |
protected static int |
ADD
Add operation |
protected static int |
ALIGNED
Item in memory has been aligned on the proper boundary. |
protected static int |
AND
Bit and operation |
protected static int[] |
argswap
Map comparison if the arguments are swapped. |
protected static int[] |
brreverse
Map comparison if branch sense is reversed. |
protected HashMap |
codeMap
Map from routine to instructions. |
protected static boolean[] |
commutative
Is the dyadic operation commutative? |
protected static java.lang.String[] |
compOp
Map comparison to string. |
protected Displacement[] |
dataAreaDisp
Array of data area displacements - indexed by handle. |
protected SpaceAllocation[] |
dataAreas
Array of data areas - indexed by handle. |
protected static byte |
DECL_IN_COMMON
The variable is an EquivalenceDecl. |
protected static byte |
DECL_IN_MEMORY
The variable is in memory. |
protected static byte |
DECL_IN_REGISTER
The variable is in a register. |
protected static byte |
DECL_ON_STACK
The variable is on the stack. |
protected static java.lang.String[] |
declLoc
Map from variable location to descriptive string. |
protected static int |
DIV
Divide operation |
protected static int |
EQ
Equality compare |
protected static int[] |
fieldAlignment
Map from lower three bits of an offset to the alignment. |
protected static int |
GE
Greater than or equal compare |
protected boolean |
genDebugInfo
True if information for debuggers should be generated. |
protected static int |
GT
Greater than compare |
protected Instruction |
lastInstruction
Last instruction generated. |
protected Label |
lastLabel
Last label generated. |
protected static int |
LE
Less than or equal compare |
protected boolean |
little
True if target machine is little-endian. |
protected static int |
LT
Less than compare |
protected Machine |
machine
Machine specific information. |
protected static int |
MUL
Multiply operation |
protected static int |
NE
Not equals compare |
protected int |
nextArea
Next available in dataAreas. |
protected static java.lang.String[] |
operation
Map operation to string. |
protected static int |
OR
Bit or operation |
protected RegisterSet |
registers
The register set definition. |
protected int |
resultReg
Register containing the last generated expression result. |
protected static int |
SLL
Shift left logical operation |
protected static int |
SRA
Shift right arithmetic operation |
protected static int |
SRL
Shift right logical operation |
protected static int |
SUB
Subtract operation |
protected boolean |
trace
True if tracing requested. |
protected static java.lang.String[] |
trans2Names
Names of the C library dyadic transcendental functions. |
protected static java.lang.String[] |
transNames
Names of the C library monadic transcendental functions. |
protected static int |
UNALIGNED
Item in memory has not been aligned on the proper boundary. |
protected boolean |
useMemory
True if programmer variables should be placed in memory. |
protected static int |
XOR
Bit exclusive or operation |
| Constructor Summary | |
Generator(CallGraph cg,
RegisterSet actualRegisters,
Machine machine,
boolean genDebugInfo)
This class is used to convert the Scribble CFG to machine instructions. |
|
| Method Summary | |
protected abstract Displacement |
allocAggregationElements(AggregationElements ag)
Place values from an AggregationElements literal in read-only memory. |
protected int |
allocateBSSArea(java.lang.String name,
int area,
int size,
int alignment)
Allocate an uninitialized area of memory. |
protected int |
allocateData(java.lang.String name,
int area,
int type,
int size,
boolean readOnly,
java.lang.Object data,
int reps)
Allocate an area of memory to contain data. |
protected int |
allocateData(java.lang.String name,
int area,
int type,
int size,
boolean readOnly,
java.lang.Object data,
int reps,
int alignment)
Allocate an area of memory to contain data. |
protected int |
allocateTextArea(java.lang.String name,
int area)
Allocate an area of memory to contain instructions. |
protected int |
allocateWithData(java.lang.String name,
Type type,
int ts,
AggregationElements ag,
int area,
boolean readOnly,
int repeats)
Allocate an area for the data specified by the Clef AggregationElements expression. |
protected int |
allocateWithData(java.lang.String name,
Type type,
int ts,
Expression init,
int area,
boolean readOnly,
int reps,
int aln)
Allocate an area for the data specified by the Clef Expression. |
protected void |
appendInstruction(Instruction inst)
Append the instruction to the end of the sequence of instructions. |
protected void |
appendLabel(Label label)
Append the label to the end of the sequence of instructions. |
abstract void |
assemble(Emit emit,
java.lang.String source,
java.util.Enumeration comments)
Generate assembly language. |
void |
associateDispWithArea(int handle,
Displacement disp)
Associate a displacement with an area. |
void |
basicBlockEnd()
Called after the last CFG node in a basic block is processed. |
protected abstract void |
calcFieldOffsets(AggregateType at)
Determine the offsets for fields of a struct or union. |
protected abstract void |
convertIntRegValue(int src,
int srcSize,
boolean srcSigned,
int dest,
int destSize,
boolean destSigned)
Generate instructions to convert an integer value in an integer register to an integer value of a different size. |
protected Label |
createLabel()
Create a new Label. |
abstract int |
dataType(Type type)
Return the data type as an integer. |
protected abstract void |
declPass1(Declaration decl,
boolean topLevel)
Process the declarations. |
protected int |
defineDeclInfo(Declaration decl,
byte type,
int info,
int info2,
int info3,
Displacement disp)
Associate information with a Declaration. |
protected abstract Displacement |
defStringValue(java.lang.String v,
int size)
Return the displacement for a string. |
protected abstract void |
doBinaryOp(BinaryExpr c,
int which)
Generate instructions to do a comparison of two value. |
protected abstract void |
doCompareOp(BinaryExpr c,
int which)
Generate instructions to do a comparison of two value. |
protected boolean |
doNext(Chord nxt)
Make sure the specified Chord is converted next. |
protected void |
endModule()
Called at the end of a call graph (module). |
protected abstract void |
endRoutineCode(int[] map)
Called at the end of code generation for a routine. |
Displacement |
findAreaDisp(int section,
int type,
boolean readOnly,
int size,
double value,
int alignment)
Find an allocation of a floating point value. |
Displacement |
findAreaDisp(int section,
int type,
boolean readOnly,
int size,
long value,
int alignment)
Find an allocation of a floating point value. |
Displacement |
findAreaDisp(int section,
int type,
boolean readOnly,
int size,
java.lang.String value,
int alignment)
Find an allocation of a floating point value. |
void |
generate()
Generate the machine instructions for each routine in the call graph. |
protected void |
generateScribble(Scribble scribble)
Generate the machine instructions for a CFG. |
protected abstract void |
generateUnconditionalBranch(Label lab)
Generate an unconditional branch to the label specified. |
protected abstract void |
genFloorOfReal(int src,
int srcSize,
int dest,
int destSize)
Generate instructions to compute the floor of a real vaue in a real register to a real register. |
protected abstract void |
genIfRegister(int which,
Expr predicate,
Chord tc,
Chord fc)
Generate a branch based on the value of an expression. |
protected abstract void |
genIfRelational(int which,
boolean rflag,
BinaryExpr predicate,
Chord tc,
Chord fc)
Generate a branch based on a relational expression. |
protected abstract void |
genIntToReal(int src,
int srcSize,
int dest,
int destSize)
Convert an integer value in a real register to a real value in a real register. |
protected abstract int |
genLoadImmediate(double value,
int dest,
int destSize)
Generate instructions to load an immediate integer value into a register. |
protected abstract int |
genLoadImmediate(long value,
int dest)
Generate instructions to load an immediate integer value into a register. |
protected abstract void |
genRealToInt(int src,
int srcSize,
int dest,
int destSize,
boolean destSigned)
Convert real value in a real register to an integer value in a real register. |
protected abstract void |
genRealToIntRound(int src,
int srcSize,
int dest,
int destSize)
Convert integer value in a real register to an integer value in a real register. |
protected abstract void |
genRealToReal(int src,
int srcSize,
int dest,
int destSize)
Convert a real value in a real register to a real value in a real register. |
protected abstract void |
genRegToReg(int src,
int dest)
Generate instructions to move data from one register to another. |
protected abstract void |
genUnsignedIntToReal(int src,
int srcSize,
int dest,
int destSize)
Convert an unsigned integer value in an integer register to a real value in a real register. |
protected Label |
getBranchLabel(Chord location)
Return the label for a branch location. |
protected Displacement |
getDeclDisp(int index)
Return the Displacement associated with the Declaration. |
protected int |
getDeclInfo(int index)
Return the first integer value associated with the Declaration. |
protected int |
getDeclInfo2(int index)
Return the second integer value associated with the Declaration. |
protected int |
getDeclInfo3(int index)
Return the third integer value associated with the Declaration. |
protected int |
getDeclType(int index)
Return the type value associated with the Declaration. |
protected Displacement |
getDisp(int value)
Generate an integer displacement. |
Label |
getLabel(int index)
Return the label whose index is specified. |
Machine |
getMachine()
Return the machine definition in use. |
abstract int |
getMaxAreaIndex()
Return the maximum area index value. |
java.lang.String |
getName(int handle)
Return the name associated with an area of memory. |
SourceLanguage |
getSourceLanguage()
Return the source language of the original program. |
protected abstract java.lang.Object |
getSpillLocation(int reg)
Obtain the information needed for register spill loads and stores. |
protected Instruction |
insertInstruction(Instruction inst,
Instruction location)
Insert the instruction after the specified instruction. |
protected abstract Instruction |
insertSpillLoad(int reg,
java.lang.Object spillLocation,
Instruction after)
Insert the instruction(s) to restore a spilled register. |
protected abstract Instruction |
insertSpillStore(int reg,
java.lang.Object spillLocation,
Instruction after)
Insert the instruction(s) to save a spilled register. |
protected abstract void |
layoutParameters(RoutineDecl rd)
Determine the layout of routine parameters for the call. |
protected abstract void |
loadAddress(int dest,
Displacement disp)
Load an address into a register. |
protected abstract int |
loadValue(VariableDecl vd,
Type vt)
Load the value of a variable into a register. |
protected void |
moveInstructionSequence(Instruction prior,
Instruction last,
Instruction after)
Move a sequence of instructions to another position. |
protected void |
peephole(Instruction first)
Do peephole optimizations before registers are allocated. |
protected void |
peephole2(Instruction first)
Do peephole optimizations after registers are allocated. |
static int |
powerOf2(long value)
Return x in (value = 2**x) or -1 if value is zero, negative or not a power of two. |
protected abstract void |
processSourceLine(java.lang.String fileName,
int line,
int column,
int label)
The user has requested source line information be included. |
protected Type |
processType(Declaration decl)
Insure that all types have their register types specified and all structure fields have had their offsets determined. |
protected Type |
processType(Expr expr)
Insure that all types have their register types specified and all structure fields have had their offsets determined. |
protected Type |
processType(Expression expr)
Insure that all types have their register types specified and all structure fields have had their offsets determined. |
protected Type |
processType(Type type)
Insure that all types have their register types specified and all structure fields have had their offsets determined. |
protected abstract void |
putAddressInRegister(Declaration decl,
int adrReg)
Put the address of the declaration into a register. |
protected abstract void |
putAddressInRegister(Declaration decl,
int dtype,
Displacement disp,
int adrReg)
Load the address of a declaration into a register. |
protected boolean |
putInRegister(Declaration decl)
Return true if the declaration is a good candidate for residency in a register. |
java.lang.String |
registerName(int reg)
Return the assembler name for the specified register. |
void |
remapRegisters(int[] map,
Instruction first)
Change the registers in every instruction. |
protected void |
setDeclInfo3(int index,
int value)
Set the third integer value associated with the Declaration. |
protected void |
setVisibility(int handle,
byte visibility)
Specify the visibility of an area. |
protected void |
startModule()
Called at the beginning of a call graph (module). |
protected abstract Instruction |
startRoutineCode()
Called at the start of code generation for a routine. |
protected abstract void |
storeLdae(LoadDeclAddressExpr lhs,
Expr rhs)
Store a value into a variable. |
protected abstract void |
storeLdve(LoadDeclValueExpr lhs,
Expr rhs)
Store a value into the location specied by an address in a variable. |
protected abstract void |
storeLfae(LoadFieldAddressExpr lhs,
Expr rhs)
Store a value into a field of a structure. |
protected abstract void |
storeLvie(LoadValueIndirectExpr lhs,
Expr rhs)
Store a value into the location specied by the value of an expression. |
protected abstract void |
storeValue(int src,
VariableDecl vd,
Type vt)
Store a variable value into memory from a register. |
protected int |
valueOf(SizeofLiteral il)
Return the value of the SizeofLiteral. |
void |
visitAdditionExpr(Note n)
|
void |
visitAllocateExpr(Note n)
|
void |
visitAndExpr(Note n)
|
void |
visitBinaryExpr(Note n)
|
void |
visitBitAndExpr(Note n)
|
void |
visitBitOrExpr(Note n)
|
void |
visitBitShiftExpr(Note n)
|
void |
visitBitXorExpr(Note n)
|
void |
visitBranchChord(Note n)
|
void |
visitCallExpr(Note n)
|
void |
visitCallMethodExpr(Note n)
|
void |
visitChord(Note n)
|
void |
visitComplexValueExpr(Note n)
|
void |
visitConversionExpr(Note n)
|
void |
visitDecisionChord(Note n)
|
void |
visitDualExpr(Note n)
|
void |
visitEqualityExpr(Note n)
|
void |
visitEvictChord(Note n)
|
void |
visitExpr(Note n)
|
void |
visitExprChord(Note n)
|
void |
visitExprPhiExpr(Note n)
|
void |
visitGotoChord(Note n)
|
void |
visitGreaterEqualExpr(Note n)
|
void |
visitGreaterExpr(Note n)
|
void |
visitIfThenElseChord(Note n)
|
void |
visitLeaveChord(Note n)
|
void |
visitLessEqualExpr(Note n)
|
void |
visitLessExpr(Note n)
|
void |
visitLiteralExpr(Note n)
|
void |
visitLoadExpr(Note n)
|
void |
visitLoopExitChord(Note n)
|
void |
visitLoopHeaderChord(Note n)
|
void |
visitLoopPreHeaderChord(Note n)
|
void |
visitLoopTailChord(Note n)
|
void |
visitMaxExpr(Note n)
|
void |
visitMayDefExpr(Note n)
|
void |
visitMayUseExpr(Note n)
|
void |
visitMinExpr(Note n)
|
void |
visitNaryExpr(Note n)
|
void |
visitNilExpr(Note n)
|
void |
visitNote(Note n)
|
void |
visitNotEqualExpr(Note n)
|
void |
visitNullChord(Note n)
|
void |
visitOrExpr(Note n)
|
void |
visitPhiExpr(Note n)
|
void |
visitPhiExprChord(Note n)
|
void |
visitSequentialChord(Note n)
|
void |
visitStoreExpr(Note n)
|
void |
visitSubscriptExpr(Note n)
|
void |
visitSubtractionExpr(Note n)
|
void |
visitTernaryExpr(Note n)
|
void |
visitUnaryExpr(Note n)
|
void |
visitVaEndExpr(Note n)
|
void |
visitValueExpr(Note n)
|
void |
visitVarArgExpr(Note n)
|
void |
visitVaStartExpr(Note n)
|
void |
visitVectorExpr(Note n)
|
protected void |
whatIsThis(Note n)
Generate an error. |
protected abstract void |
zeroFloatRegister(int dest,
int destSize)
Generate code to zero out a floating point register. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final byte DECL_IN_MEMORY
protected static final byte DECL_IN_COMMON
protected static final byte DECL_ON_STACK
protected static final byte DECL_IN_REGISTER
protected static final java.lang.String[] declLoc
protected static final int EQ
argswap,
brreverseprotected static final int LE
argswap,
brreverseprotected static final int LT
argswap,
brreverseprotected static final int GT
argswap,
brreverseprotected static final int GE
argswap,
brreverseprotected static final int NE
argswap,
brreverseprotected static final int[] argswap
protected static final int[] brreverse
protected static final java.lang.String[] compOp
protected static final int ALIGNED
protected static final int UNALIGNED
protected static final int ADD
commutativeprotected static final int SUB
commutativeprotected static final int MUL
commutativeprotected static final int DIV
commutativeprotected static final int AND
commutativeprotected static final int OR
commutativeprotected static final int XOR
commutativeprotected static final int SRA
commutativeprotected static final int SRL
commutativeprotected static final int SLL
commutativeprotected static final boolean[] commutative
protected static final java.lang.String[] operation
protected static int[] fieldAlignment
protected static final java.lang.String[] transNames
protected static final java.lang.String[] trans2Names
protected boolean genDebugInfo
protected boolean trace
protected Instruction lastInstruction
protected Label lastLabel
protected RegisterSet registers
protected SpaceAllocation[] dataAreas
protected Displacement[] dataAreaDisp
protected int nextArea
protected HashMap codeMap
protected Machine machine
protected boolean little
protected boolean useMemory
protected int resultReg
| Constructor Detail |
public Generator(CallGraph cg,
RegisterSet actualRegisters,
Machine machine,
boolean genDebugInfo)
cg - is the call graph to be usedactualRegisters - is the register set definition to be usedgenDebugInfo - is true if debugging information should be placed in the object module| Method Detail |
public Machine getMachine()
public void generate()
protected void startModule()
protected void endModule()
protected void generateScribble(Scribble scribble)
protected boolean doNext(Chord nxt)
public void basicBlockEnd()
public void remapRegisters(int[] map,
Instruction first)
map - is the mapping from old register number to new register numberfirst - is the first instruction in the sequenceprotected void peephole(Instruction first)
protected void peephole2(Instruction first)
protected abstract java.lang.Object getSpillLocation(int reg)
reg - specifies which virtual register will be spilled
protected abstract Instruction insertSpillLoad(int reg,
java.lang.Object spillLocation,
Instruction after)
reg - specifies which virtual register will be loadedspillLocation - specifies the offset on the stack to the spill locationafter - specifies the instruction to insert the load aftergetSpillLocation(int)
protected abstract Instruction insertSpillStore(int reg,
java.lang.Object spillLocation,
Instruction after)
reg - specifies which virtual register will be storedspillLocation - specifies the offset on the stack to the spill locationafter - specifies the instruction to insert the store aftergetSpillLocation(int)
public abstract void assemble(Emit emit,
java.lang.String source,
java.util.Enumeration comments)
emit - is the stream to use.source - is the source file namecomments - is a list of Strings containing commentsprotected abstract void generateUnconditionalBranch(Label lab)
protected abstract void processSourceLine(java.lang.String fileName,
int line,
int column,
int label)
protected abstract Instruction startRoutineCode()
protected abstract void endRoutineCode(int[] map)
protected abstract void layoutParameters(RoutineDecl rd)
protected abstract void calcFieldOffsets(AggregateType at)
protected abstract void storeLdae(LoadDeclAddressExpr lhs,
Expr rhs)
lhs - specifies the variablerhs - specifies the value
protected abstract void storeLdve(LoadDeclValueExpr lhs,
Expr rhs)
lhs - specifies the variablerhs - specifies the value
protected abstract void storeLvie(LoadValueIndirectExpr lhs,
Expr rhs)
lhs - specifies the expressionrhs - specifies the value
protected abstract void storeLfae(LoadFieldAddressExpr lhs,
Expr rhs)
lhs - specifies the field of the structurerhs - specifies the value
protected abstract int loadValue(VariableDecl vd,
Type vt)
vd - specifies the variablevt - specifies the type of the value
protected abstract void storeValue(int src,
VariableDecl vd,
Type vt)
src - is the source register containing the valuevd - specifies the variablevt - specifies the type of the value
protected abstract void putAddressInRegister(Declaration decl,
int dtype,
Displacement disp,
int adrReg)
decl - specifies the declarationdtype - specifies where the declaration residesdisp - specifies the declaration displacementadrReg - specifies the register to receive the address
protected abstract Displacement defStringValue(java.lang.String v,
int size)
v - is the stringsize - is the length of the string
protected abstract void putAddressInRegister(Declaration decl,
int adrReg)
protected abstract void loadAddress(int dest,
Displacement disp)
dest - is the register that is set with the addressdisp - specifies the address (should be a SymbolDisplacement or offset of one)
protected abstract int genLoadImmediate(long value,
int dest)
value - is the value to loaddest - is the register conatining the result
protected abstract int genLoadImmediate(double value,
int dest,
int destSize)
value - is the value to loaddest - is the register conatining the resultdestSize - is the size of the valuepublic abstract int dataType(Type type)
type - is the type of the dataSpaceAllocation
protected abstract void genRegToReg(int src,
int dest)
src - specifies the source registerdest - specifies the destination register
protected abstract void genIfRegister(int which,
Expr predicate,
Chord tc,
Chord fc)
which - specifies the branch test (EQ, NE, LT, ...)tc - specifies the path if the test succeedsfc - specifies the path if the test fails
protected abstract void genIfRelational(int which,
boolean rflag,
BinaryExpr predicate,
Chord tc,
Chord fc)
which - specifies the branch test (EQ, NE, LT, ...)rflag - true if the test condition should be reversedpredicate - specifies the relational expressiontc - specifies the path if the test succeedsfc - specifies the path if the test fails
protected abstract void doBinaryOp(BinaryExpr c,
int which)
c - is the binary expressionwhich - specifies the binary operation (ADD, SUB, ...)
protected abstract void doCompareOp(BinaryExpr c,
int which)
c - is the compare expressionwhich - specifies the compare (EQ, NE, ...)public abstract int getMaxAreaIndex()
protected abstract void declPass1(Declaration decl,
boolean topLevel)
decl - is the declarationtopLevel - is true if this declaration is defined outside of a routineprotected final Displacement getDisp(int value)
value - specifies the value of the displacementprotected Type processType(Type type)
protected Type processType(Declaration decl)
protected Type processType(Expr expr)
protected Type processType(Expression expr)
protected void appendInstruction(Instruction inst)
protected void appendLabel(Label label)
protected Instruction insertInstruction(Instruction inst,
Instruction location)
protected void moveInstructionSequence(Instruction prior,
Instruction last,
Instruction after)
prior - is the instruction prior to the first instruction in the sequencelast - is the last instruction in the sequenceafter - is the instruction to insert the sequence afterprotected boolean putInRegister(Declaration decl)
public java.lang.String registerName(int reg)
protected Label createLabel()
public Label getLabel(int index)
protected Label getBranchLabel(Chord location)
protected int defineDeclInfo(Declaration decl,
byte type,
int info,
int info2,
int info3,
Displacement disp)
type - - memory, stack, or registerinfo - - handle, offset, or register numberinfo2 - - integer value associated with declarationinfo3 - - integer value associated with declarationgetDeclDisp(int),
getDeclType(int),
getDeclInfo(int),
getDeclInfo2(int),
getDeclInfo3(int)protected int getDeclType(int index)
protected int getDeclInfo(int index)
protected int getDeclInfo2(int index)
protected int getDeclInfo3(int index)
protected void setDeclInfo3(int index,
int value)
protected Displacement getDeclDisp(int index)
public Displacement findAreaDisp(int section,
int type,
boolean readOnly,
int size,
double value,
int alignment)
section - specifies the section in which the loader should place the areatype - specifies the type of datareadOnly - is true if the area is read-onlysize - is the number of addressable units requiredvalue - is the initial data value for the areaalignment - specifies the address alignment requiredSpaceAllocation
public Displacement findAreaDisp(int section,
int type,
boolean readOnly,
int size,
long value,
int alignment)
section - specifies the section in which the loader should place the areatype - specifies the type of datareadOnly - is true if the area is read-onlysize - is the number of addressable units requiredvalue - is the initial data value for the areaalignment - specifies the address alignment requiredSpaceAllocation
public Displacement findAreaDisp(int section,
int type,
boolean readOnly,
int size,
java.lang.String value,
int alignment)
section - specifies the section in which the loader should place the areatype - specifies the type of datareadOnly - is true if the area is read-onlysize - is the number of addressable units requiredvalue - is the initial data value for the areaalignment - specifies the address alignment requiredSpaceAllocation
public void associateDispWithArea(int handle,
Displacement disp)
protected void setVisibility(int handle,
byte visibility)
SpaceAllocationprotected int valueOf(SizeofLiteral il)
protected int allocateWithData(java.lang.String name,
Type type,
int ts,
Expression init,
int area,
boolean readOnly,
int reps,
int aln)
name - is the name of the datatype - is the type of the variablets - is the size of the area to allocateinit - is the initial valuearea - is the data area to usereadOnly - is true if the data should be read-onlyreps - is the number os times to repeat the data to fill the areaaln - is the required alignment for the data
protected int allocateWithData(java.lang.String name,
Type type,
int ts,
AggregationElements ag,
int area,
boolean readOnly,
int repeats)
name - is the name of the datatype - is the type of the variablets - is the size of the area to allocateinit - is the initial valuearea - is the data area to usereadOnly - is true if the data should be read-onlyreps - is the number os times to repeat the data to fill the area
protected int allocateBSSArea(java.lang.String name,
int area,
int size,
int alignment)
protected int allocateTextArea(java.lang.String name,
int area)
protected int allocateData(java.lang.String name,
int area,
int type,
int size,
boolean readOnly,
java.lang.Object data,
int reps)
name - is the name of the areaarea - specifies the data areatype - specifies the type of datadata - is the datasize - is the size of each data item in bytesreadOnly - is true if the data is read-only
protected int allocateData(java.lang.String name,
int area,
int type,
int size,
boolean readOnly,
java.lang.Object data,
int reps,
int alignment)
name - is the name of the areaarea - specifies the data areatype - specifies the type of datadata - is the datasize - is the size of each data item in bytesreadOnly - is true if the data is read-onlypublic java.lang.String getName(int handle)
public final SourceLanguage getSourceLanguage()
protected void whatIsThis(Note n)
public static int powerOf2(long value)
public void visitExprChord(Note n)
visitExprChord in interface Predicatepublic void visitIfThenElseChord(Note n)
visitIfThenElseChord in interface Predicatepublic void visitAdditionExpr(Note n)
visitAdditionExpr in interface Predicatepublic void visitAndExpr(Note n)
visitAndExpr in interface Predicatepublic void visitBitAndExpr(Note n)
visitBitAndExpr in interface Predicatepublic void visitBitOrExpr(Note n)
visitBitOrExpr in interface Predicatepublic void visitBitXorExpr(Note n)
visitBitXorExpr in interface Predicatepublic void visitOrExpr(Note n)
visitOrExpr in interface Predicatepublic void visitSubtractionExpr(Note n)
visitSubtractionExpr in interface Predicatepublic void visitBitShiftExpr(Note n)
visitBitShiftExpr in interface Predicatepublic void visitCallMethodExpr(Note n)
visitCallMethodExpr in interface Predicatepublic void visitComplexValueExpr(Note n)
visitComplexValueExpr in interface Predicate
protected abstract void convertIntRegValue(int src,
int srcSize,
boolean srcSigned,
int dest,
int destSize,
boolean destSigned)
src - is the register containing the source valuesrcSize - is the source value sizesrcSigned - is true if the source value is signeddest - is the register containing the resultdestSize - is the size of the result valuedestSigned - is true if the result value is signed
protected abstract void genRealToInt(int src,
int srcSize,
int dest,
int destSize,
boolean destSigned)
protected abstract void genRealToReal(int src,
int srcSize,
int dest,
int destSize)
protected abstract void genIntToReal(int src,
int srcSize,
int dest,
int destSize)
protected abstract void genUnsignedIntToReal(int src,
int srcSize,
int dest,
int destSize)
protected abstract void genRealToIntRound(int src,
int srcSize,
int dest,
int destSize)
protected abstract void genFloorOfReal(int src,
int srcSize,
int dest,
int destSize)
protected abstract void zeroFloatRegister(int dest,
int destSize)
protected abstract Displacement allocAggregationElements(AggregationElements ag)
public void visitConversionExpr(Note n)
visitConversionExpr in interface Predicatepublic void visitDualExpr(Note n)
visitDualExpr in interface Predicatepublic void visitEqualityExpr(Note n)
visitEqualityExpr in interface Predicatepublic void visitGreaterEqualExpr(Note n)
visitGreaterEqualExpr in interface Predicatepublic void visitGreaterExpr(Note n)
visitGreaterExpr in interface Predicatepublic void visitLessEqualExpr(Note n)
visitLessEqualExpr in interface Predicatepublic void visitLessExpr(Note n)
visitLessExpr in interface Predicatepublic void visitNotEqualExpr(Note n)
visitNotEqualExpr in interface Predicatepublic void visitLeaveChord(Note n)
public void visitLiteralExpr(Note n)
visitLiteralExpr in interface Predicatepublic void visitNilExpr(Note n)
visitNilExpr in interface Predicatepublic void visitStoreExpr(Note n)
visitStoreExpr in interface Predicatepublic void visitVaStartExpr(Note n)
visitVaStartExpr in interface Predicatepublic void visitAllocateExpr(Note n)
visitAllocateExpr in interface Predicatepublic void visitBinaryExpr(Note n)
public void visitBranchChord(Note n)
public void visitCallExpr(Note n)
public void visitChord(Note n)
public void visitDecisionChord(Note n)
public void visitExpr(Note n)
public void visitExprPhiExpr(Note n)
visitExprPhiExpr in interface Predicatepublic void visitLoadExpr(Note n)
public void visitMaxExpr(Note n)
visitMaxExpr in interface Predicatepublic void visitMinExpr(Note n)
visitMinExpr in interface Predicatepublic void visitMayDefExpr(Note n)
visitMayDefExpr in interface Predicatepublic void visitMayUseExpr(Note n)
visitMayUseExpr in interface Predicatepublic void visitNaryExpr(Note n)
public void visitNote(Note n)
public void visitGotoChord(Note n)
visitGotoChord in interface Predicatepublic void visitLoopExitChord(Note n)
visitLoopExitChord in interface Predicatepublic void visitLoopHeaderChord(Note n)
visitLoopHeaderChord in interface Predicatepublic void visitLoopPreHeaderChord(Note n)
visitLoopPreHeaderChord in interface Predicatepublic void visitLoopTailChord(Note n)
visitLoopTailChord in interface Predicatepublic void visitNullChord(Note n)
visitNullChord in interface Predicatepublic void visitPhiExpr(Note n)
visitPhiExpr in interface Predicatepublic void visitEvictChord(Note n)
visitEvictChord in interface Predicatepublic void visitPhiExprChord(Note n)
visitPhiExprChord in interface Predicatepublic void visitSequentialChord(Note n)
public void visitSubscriptExpr(Note n)
visitSubscriptExpr in interface Predicatepublic void visitTernaryExpr(Note n)
public void visitUnaryExpr(Note n)
public void visitValueExpr(Note n)
public void visitVarArgExpr(Note n)
public void visitVaEndExpr(Note n)
visitVaEndExpr in interface Predicatepublic void visitVectorExpr(Note n)
visitVectorExpr in interface Predicate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||