|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.backend.Assembler
scale.backend.ppc.PPCAssembler
public final class PPCAssembler
This class generates PPC assembly language from a list of PPC instructions.
$Id: PPCAssembler.java,v 1.27 2007-10-04 19:57:55 burrill Exp $
Copyright 2007 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
| Field Summary |
|---|
| Fields inherited from class scale.backend.Assembler |
|---|
gen, hex, oneItemPerLine, repsAllowedInAL, source |
| Constructor Summary | |
|---|---|
PPCAssembler(Generator gen,
java.lang.String source)
|
|
| Method Summary | |
|---|---|
void |
assembleComment(java.lang.String comment,
Emit emit)
Insert the assembler representation of the comment into the output stream. |
long |
assembleData(Emit emit,
SpaceAllocation sa,
long location)
Called for each allocation in a named area. |
void |
assembleDataAreaHeader(Emit emit,
int kind)
Generate assembler directives for the start of a data area. |
void |
assembleEpilog(Emit emit)
Called at the very end of generating assembly code. |
void |
assembleLabel(Label label,
Emit emit)
Generate a label in the assembly output. |
void |
assembleProlog(Emit emit)
Called at the very beginning of generating assembly code. |
java.lang.String |
assembleRegister(int reg)
Convert a register number into its assembly language form. |
protected long |
genData(Emit emit,
int dt,
Label lab,
int reps,
boolean aligned)
Generate the data representation for address of the label. |
protected long |
genData(Emit emit,
int dt,
long[] data,
int reps,
boolean aligned)
Generate the assembly representation of an array of long values. |
protected long |
genData(Emit emit,
int dt,
long data,
int reps,
boolean aligned)
Generate the assembly representation of long integer value. |
protected void |
genDirective(Emit emit,
int dt)
Generate the assembly directive required for the type. |
protected int |
getDirectiveSize(int dt)
Return the number of addressable units required for one value of the specified type. |
java.lang.String |
getDisplayString(char[] v,
int start,
int end)
Convert a string to a form suitable for display. |
java.lang.String |
getLabelString(Label label)
Return the String representing the label. |
| Methods inherited from class scale.backend.Assembler |
|---|
assemble, assembleDataBegin, assembleDataEnd, assembleInstructions, genAsciiText, genBytes, genData, genData, genData, genData, genData, genData, genData, genData, genZeroFill, getName, getSourceLanguage, getSpaceAllocation, isFortran |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PPCAssembler(Generator gen,
java.lang.String source)
gen - is the instruction generator used to generate the instructions.source - specifies the source program| Method Detail |
|---|
public void assembleProlog(Emit emit)
assembleProlog in class Assemblerpublic void assembleEpilog(Emit emit)
assembleEpilog in class Assemblerpublic java.lang.String getLabelString(Label label)
getLabelString in class Assembler
public void assembleComment(java.lang.String comment,
Emit emit)
assembleComment in class Assembler
public void assembleLabel(Label label,
Emit emit)
assembleLabel in class Assemblerpublic java.lang.String assembleRegister(int reg)
assembleRegister in class Assembler
public void assembleDataAreaHeader(Emit emit,
int kind)
assembleDataAreaHeader in class Assemblerkind - specifies the area kindemit - is the output sink
public long assembleData(Emit emit,
SpaceAllocation sa,
long location)
Assembler
assembleData in class Assembleremit - is the output sinksa - is the data spacelocation - is the current location
protected void genDirective(Emit emit,
int dt)
genDirective in class Assemblerdt - - the data typeemit - specifies where to put the directive.SpaceAllocationprotected int getDirectiveSize(int dt)
getDirectiveSize in class Assemblerdt - - the data typeSpaceAllocation
protected long genData(Emit emit,
int dt,
Label lab,
int reps,
boolean aligned)
genData in class Assembleremit - specifies where to generate the datadt - specifies the data typelab - is the labelreps - specifies how many times to generate the representationaligned - specifies whether the data will be aligned
SpaceAllocation
protected long genData(Emit emit,
int dt,
long data,
int reps,
boolean aligned)
long integer value.
genData in class Assembleremit - specifies where to generate the datadt - specifies the data typedata - specifies the valuereps - specifies how many times to generate the representationaligned - specifies whether the data will be aligned
SpaceAllocation
protected long genData(Emit emit,
int dt,
long[] data,
int reps,
boolean aligned)
genData in class Assembleremit - specifies where to generate the datadt - specifies the data typedata - specifies the valuesreps - specifies how many times to generate the representationaligned - specifies whether the data will be aligned
SpaceAllocation
public java.lang.String getDisplayString(char[] v,
int start,
int end)
getDisplayString in class Assemblerv - the original string
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||