|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.backend.RegisterSet scale.backend.mips.MipsRegisterSet
public class MipsRegisterSet
This class describes the register set of the Mips.
$Id: MipsRegisterSet.java,v 1.11 2005-02-07 21:27:24 burrill Exp $
Copyright 2005 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The Mips has 64 programmable registers. 31 of the first 32 registers are used for integer value and addresses; register 0 constains a hardwired 0 value. This includes the stack pointer and other housekeeping registers. Registers 32 through 63 are used for floating point values.
Field Summary | |
---|---|
static int |
CCREG
|
static int |
FA0_REG
Floating point argument register |
static int |
FA1_REG
Floating point argument register |
static int |
FA2_REG
Floating point argument register |
static int |
FA3_REG
Floating point argument register |
static int |
FA4_REG
Floating point argument register |
static int |
FA5_REG
Floating point argument register |
static int |
FA6_REG
Floating point argument register |
static int |
FA7_REG
Floating point argument register |
static int |
FCC0
|
static int |
FP_REG
Frame pointer register |
static int |
FR_REG
Floating point result register |
static int |
FR2_REG
Second floating point result register (complex part) |
static int |
FREG_SIZE
Size in bytes of floating point register. |
static int |
GP_REG
Pointer to global area |
static int |
HI_REG
|
static int |
IA0_REG
First argument register |
static int |
IA1_REG
Integer argument register |
static int |
IA2_REG
Integer argument register |
static int |
IA3_REG
Integer argument register |
static int |
IA4_REG
Integer argument register |
static int |
IA5_REG
Integer argument register |
static int |
IA6_REG
Integer argument register |
static int |
IA7_REG
Integer argument register |
static int |
IR_REG
Integer result register 1 of 2 |
static int |
IR2_REG
Integer result register 2 of 2 |
static int |
IREG_SIZE
Size in bytes of integer register. |
static int |
LAST_INT_REG
Last integer register |
static int |
LO_REG
|
static int |
RA_REG
Return address register |
static int |
RESERVEDREG
|
static int |
SP_REG
Stack pointer register |
static int |
SPECIAL
|
static int |
T9_REG
Temp register 9; used for function calling |
static int |
ZERO_REG
Zero register |
static int |
ZEROREG
|
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 | |
---|---|
MipsRegisterSet()
|
Method Summary | |
---|---|
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 |
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. |
int |
tempRegisterType(Type type,
long bs)
Return the register type with the size information added. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ZERO_REG
public static final int GP_REG
public static final int SP_REG
public static final int FP_REG
public static final int RA_REG
public static final int LAST_INT_REG
public static final int IR_REG
public static final int IR2_REG
public static final int FR_REG
public static final int FR2_REG
public static final int IA0_REG
public static final int IA1_REG
public static final int IA2_REG
public static final int IA3_REG
public static final int IA4_REG
public static final int IA5_REG
public static final int IA6_REG
public static final int IA7_REG
public static final int FA0_REG
public static final int FA1_REG
public static final int FA2_REG
public static final int FA3_REG
public static final int FA4_REG
public static final int FA5_REG
public static final int FA6_REG
public static final int FA7_REG
public static final int T9_REG
public static final int FCC0
public static final int LO_REG
public static final int HI_REG
public static final int IREG_SIZE
public static final int FREG_SIZE
public static final int ZEROREG
public static final int RESERVEDREG
public static final int CCREG
public static final int SPECIAL
Constructor Detail |
---|
public MipsRegisterSet()
Method Detail |
---|
public java.lang.String registerName(int reg)
registerName
in class RegisterSet
public short[] getPreferredOrder()
getPreferredOrder
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 required
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |