|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.RegisterSet scale.backend.trips2.Trips2RegisterSet
public class Trips2RegisterSet
This class describes the register set of the TRIPS Grid Processor.
$Id: Trips2RegisterSet.java,v 1.26 2007-08-27 18:30:14 burrill Exp $
Copyright 2007 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
TRIPS has 128 programmable registers and makes no distinction between floating point and integer registers.
Reg # | Usage |
R0 | Program Counter (PC) |
R1 | Stack Pointer (SP) |
R2 | Link Register (LR) |
R3 | First Argument and Return Values |
R4 - R10 | Arguments |
R11 | Global Pointer/Reserved |
R12 - R69 | Local Variables |
R70 - R126 | Scratch Variables |
R17 | Reserved |
Field Summary | |
---|---|
static int |
bankAccesses
Specify the number of registers in a bank that can be accessed in the same block. |
static int |
FF_REG
First floating point argument register. |
static int |
FL_REG
Last floating point argument register. |
static int |
FP_REG
Frame pointer register. |
static int |
FR_REG
Floating point function value return register. |
static int |
FREG_SIZE
Size in bytes of integer register. |
static int |
IF_REG
First argument register. |
static int |
IL_REG
Last rgument register. |
static int |
IR_REG
Function value return register. |
static int |
IREG_SIZE
Size in bytes of integer register. |
static int |
numBanks
Specify the number of banks that (real) registers are divided into. |
static int |
perBlockRegAccesses
Specify the number of register accesses allowed in the same block. |
static int |
RA_REG
Return address register. |
static int |
regSetSize
Specify the number of actual (real) registers. |
static int |
SP_REG
Stack pointer register. |
Fields inherited from class scale.backend.RegisterSet |
---|
ADRREG, AFIREG, AIREG, checkMask, CNTREG, DBLEREG, FIREG, FLTREG, INTREG, nextRegister, PAIRREG, QUADREG, RDREG, registers, sizeMask, SPCREG, typeMask |
Constructor Summary | |
---|---|
Trips2RegisterSet()
|
Method Summary | |
---|---|
int |
getBank(int reg)
Return which bank a given (real) register is in. |
short[] |
getCalleeSaves()
Return the callee saves registers. |
short[] |
getCalleeUses()
Return the callee uses registers. |
short[] |
getPreferredOrder()
Return a mapping from an order index to a real register number. |
int |
numAllocatableRegisters()
Return the number of unique registers that can hold programmer values. |
java.lang.String |
predicateRegisterName(int reg)
Convert a predicate register number into its assembly language form. |
java.lang.String |
registerName(int reg)
Convert a register number into its assembly language form. |
int |
registerSize(int reg)
Return the size of the register in addressable memory units. |
protected void |
setLowTmpReg(int lowTempReg)
Update the register allocator with the lowest used temp register for the current routine. |
protected void |
setRegisters(int[] map,
int nextRegister)
Update the registers array and next temp register. |
int |
tempRegisterType(Type type,
long bs)
Return the register type with the size information added. |
boolean |
useContiguous()
Return true if virtual registers, that require more than one real register, must be allocated to contiguous real registers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int IR_REG
public static final int IF_REG
public static final int IL_REG
public static final int RA_REG
public static final int SP_REG
public static final int FP_REG
alloca
the frame pointer register is used to access the function's stack
frame while allowing the stack pointer to be changed by
alloca
which allocates space for the user on the
stack. Upon entry to these functions, the address in the stack
pointer register is decremented and this address is then copied
into the frame pointer register. The address in the frame
pointer register is copied back into the stack pointer register
just before the stack pointer register is incremented upon
function return.
public static final int FR_REG
public static final int FF_REG
public static final int FL_REG
public static final int IREG_SIZE
public static final int FREG_SIZE
public static int regSetSize
public static int numBanks
public static int bankAccesses
public static int perBlockRegAccesses
Constructor Detail |
---|
public Trips2RegisterSet()
Method Detail |
---|
protected void setLowTmpReg(int lowTempReg)
public java.lang.String registerName(int reg)
registerName
in class RegisterSet
public java.lang.String predicateRegisterName(int reg)
public int getBank(int reg)
public short[] getPreferredOrder()
getPreferredOrder
in class RegisterSet
public boolean useContiguous()
useContiguous
in class RegisterSet
public int registerSize(int reg)
registerSize
in class RegisterSet
public short[] getCalleeSaves()
getCalleeSaves
in class RegisterSet
public short[] getCalleeUses()
getCalleeUses
in class RegisterSet
public int numAllocatableRegisters()
numAllocatableRegisters
in class RegisterSet
public int tempRegisterType(Type type, long bs)
tempRegisterType
in class RegisterSet
type
- is the type requiredbs
- is the size requiredprotected void setRegisters(int[] map, int nextRegister)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |