|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.common.Machine scale.backend.ppc.PPCMachine
public class PPCMachine
This is the base class for all PPC specific information.
$Id: PPCMachine.java,v 1.31 2007-11-01 16:52:28 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 | |
---|---|
static int |
G4
Specifies the G4 32-bit PowerPC. |
static int |
G5
Specifies the G5 64-bit PowerPC. |
static int |
LINUX
Specifies the linux operating system. |
static int |
MACOSX
Specifies the mac os x operating system. |
Constructor Summary | |
---|---|
PPCMachine()
Create a Machine instance for an PPC. |
Method Summary | |
---|---|
void |
addCPPFlags(Vector<java.lang.String> v)
Add the flags necessary for the C preprocessor. |
int |
addressableMemoryUnits(int bitSize)
Return the number of addressable units required |
int |
alignData(int dataSize)
Return the integer value alignmentthat satisfies (0 == address % alignment)
for the data size specified. |
java.lang.String |
determineArchitecture(java.lang.String architecture,
java.lang.String extension)
Determine the architecture sub-type. |
int |
executionCostEstimate(double value)
Return an estimate of the execution cost to provide this value. |
int |
executionCostEstimate(long value)
Return an estimate of the execution cost to provide this value. |
int |
generalAlignment()
Return the most general purpose alignment in memory units. |
java.lang.String |
getArchitectureName()
Return the name of the specific target architecture. |
java.lang.String |
getGenericArchitectureName()
Return the name of the generic target architecture. |
int |
getISA()
Return the specific instruction set architecture. |
int |
getOS()
Return the specific operating system. |
boolean |
keepTypeInRegister(Type type,
boolean temporary)
Should a value of this type be allocated to a register? |
boolean |
littleEndian()
Return true if the machine is little-endian. |
protected void |
setup()
Setup this instance of the machine. |
int |
stackAlignment(Type type)
Return the alignment of things stored on the stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int G4
public static final int G5
public static final int LINUX
public static final int MACOSX
Constructor Detail |
---|
public PPCMachine()
Method Detail |
---|
public java.lang.String getGenericArchitectureName()
getGenericArchitectureName
in class Machine
public java.lang.String getArchitectureName()
getArchitectureName
in class Machine
public java.lang.String determineArchitecture(java.lang.String architecture, java.lang.String extension) throws java.lang.Exception
determineArchitecture
in class Machine
architecture
- specifies the target architectureextension
- specifies an extension to the a target architecture
java.lang.Exception
- if the extension is not understoodpublic final int getISA()
public final int getOS()
public int alignData(int dataSize)
(0 == address % alignment)
for the data size specified.
alignData
in class Machine
dataSize
- is the size of the data in addressable units.public int addressableMemoryUnits(int bitSize)
addressableMemoryUnits
in class Machine
bitSize
- is the number of bits required for the datapublic int executionCostEstimate(long value)
executionCostEstimate
in class Machine
public int executionCostEstimate(double value)
executionCostEstimate
in class Machine
public void addCPPFlags(Vector<java.lang.String> v)
addCPPFlags
in class Machine
public int generalAlignment()
generalAlignment
in class Machine
public final int stackAlignment(Type type)
stackAlignment
in class Machine
public boolean littleEndian()
littleEndian
in class Machine
public boolean keepTypeInRegister(Type type, boolean temporary)
keepTypeInRegister
in class Machine
type
- is the typetemporary
- is true if the duration will be short
super.keepTypeInRegister() takes care of what we need to do. We only
need to ensure that aggregates (structs, unions, etc.) are not put in
registers.protected void setup()
Machine
protected void setup() { super.setup(); // Initialize type, etc that are not set here. // Specify the types that are different. PointerType.setMinBitSize(64); intCalcType = scale.clef.type.SignedIntegerType.create(64); .... }
setup
in class Machine
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |