scale.backend.alpha
Class AlphaRegisterSet

java.lang.Object
  extended by scale.backend.RegisterSet
      extended by scale.backend.alpha.AlphaRegisterSet

public class AlphaRegisterSet
extends RegisterSet

This class describes the register set of the Alpha.

$Id: AlphaRegisterSet.java,v 1.26 2007-03-21 13:31:46 burrill Exp $

Copyright 2007 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

The Alpha has 64 programmable registers. The first 31 registers are used for integer values and addresses. This includes the stack pointer and other housekeeping registers. Registers 31 and 63 contain a hardwired 0 value. Registers 32 through 62 are used for floating point values.


Field Summary
static int AT_REG
          Used by the assembler.
static int F0_REG
          Floating point zero register.
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 GP_REG
          Global Pointer register
static int I0_REG
          Integer zero register
static int IF_REG
          First integer argument register.
static int IL_REG
          Last integer argument register.
static int IR_REG
          Integer function value return register.
static int IREG_SIZE
          Size in bytes of integer register.
static int PV_REG
          Routine address register.
static int RA_REG
          Return address register
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
AlphaRegisterSet()
           
 
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.
 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 scale.backend.RegisterSet
actualRegister, adrRegister, compatible, compatibleNS, continueRegister, display, doubleRegister, floatRegister, getResultRegister, getType, initialize, intRegister, isAdrType, isContinueType, isDoubleType, isFloatType, isIntType, isModType, isPairType, isQuadType, isReadOnlyType, isSpecialType, lastRegister, modRegister, newTempRegister, numContiguousRegisters, numContiguousType, numRealRegisters, numRegisters, pairRegister, quadRegister, rangeBegin, rangeEnd, readOnlyRegister, setResultRegister, specialRegister, tempRegister, tempRegisterType, virtualRegister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IR_REG

public static final int IR_REG
Integer function value return register.

See Also:
Constant Field Values

FP_REG

public static final int FP_REG
Frame pointer register

See Also:
Constant Field Values

IF_REG

public static final int IF_REG
First integer argument register.

See Also:
Constant Field Values

IL_REG

public static final int IL_REG
Last integer argument register.

See Also:
Constant Field Values

RA_REG

public static final int RA_REG
Return address register

See Also:
Constant Field Values

PV_REG

public static final int PV_REG
Routine address register.

See Also:
Constant Field Values

AT_REG

public static final int AT_REG
Used by the assembler.

See Also:
Constant Field Values

GP_REG

public static final int GP_REG
Global Pointer register

See Also:
Constant Field Values

SP_REG

public static final int SP_REG
Stack pointer register

See Also:
Constant Field Values

I0_REG

public static final int I0_REG
Integer zero register

See Also:
Constant Field Values

FR_REG

public static final int FR_REG
Floating point function value return register.

See Also:
Constant Field Values

FF_REG

public static final int FF_REG
First floating point argument register.

See Also:
Constant Field Values

FL_REG

public static final int FL_REG
Last floating point argument register.

See Also:
Constant Field Values

F0_REG

public static final int F0_REG
Floating point zero register.

See Also:
Constant Field Values

IREG_SIZE

public static final int IREG_SIZE
Size in bytes of integer register.

See Also:
Constant Field Values

FREG_SIZE

public static final int FREG_SIZE
Size in bytes of integer register.

See Also:
Constant Field Values
Constructor Detail

AlphaRegisterSet

public AlphaRegisterSet()
Method Detail

registerName

public java.lang.String registerName(int reg)
Convert a register number into its assembly language form.

Specified by:
registerName in class RegisterSet

getPreferredOrder

public short[] getPreferredOrder()
Return a mapping from an order index to a real register number. This mapping allows the order of allocation of real registers to be specified.

Overrides:
getPreferredOrder in class RegisterSet

useContiguous

public boolean useContiguous()
Return true if virtual registers, that require more than one real register, must be allocated to contiguous real registers.

Overrides:
useContiguous in class RegisterSet

registerSize

public int registerSize(int reg)
Return the size of the register in addressable memory units.

Specified by:
registerSize in class RegisterSet

getCalleeSaves

public short[] getCalleeSaves()
Return the callee saves registers.

Specified by:
getCalleeSaves in class RegisterSet

getCalleeUses

public short[] getCalleeUses()
Return the callee uses registers.

Specified by:
getCalleeUses in class RegisterSet

numAllocatableRegisters

public int numAllocatableRegisters()
Return the number of unique registers that can hold programmer values.

Specified by:
numAllocatableRegisters in class RegisterSet
Returns:
the number of unique registers that can hold programmer values.

tempRegisterType

public int tempRegisterType(Type type,
                            long bs)
Return the register type with the size information added.

Specified by:
tempRegisterType in class RegisterSet
Parameters:
type - is the type required
bs - is the size required