scale.backend.xyz
Class XyzRegisterSet

java.lang.Object
  extended by scale.backend.RegisterSet
      extended by scale.backend.xyz.XyzRegisterSet

public class XyzRegisterSet
extends RegisterSet

This class describes the register set of the Xyz architecture.

$Id: XyzRegisterSet.java,v 1.1 2006-11-16 17:28:19 burrill Exp $

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

This class represents the register set for the specific architecture. Most of the methods below generate a "not implemented error". These must be replaced with code that is specific to the register set of the architecture. The other methods may need to be modified. Use the register set classes from the other architectures to help you understand how to make changes for your architecture.

See Also:
RegisterSet, AlphaRegisterSet, SparcRegisterSet, PPCRegisterSet

Field Summary
static int SP_REG
           
 
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
XyzRegisterSet()
           
 
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

SP_REG

public static final int SP_REG
See Also:
Constant Field Values
Constructor Detail

XyzRegisterSet

public XyzRegisterSet()
Method Detail

registerName

public java.lang.String registerName(int reg)
Description copied from class: RegisterSet
Convert a register number into its assembly language form.

Specified by:
registerName in class RegisterSet

getPreferredOrder

public short[] getPreferredOrder()
Description copied from class: RegisterSet
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. This method SHOULD BE overridden by derived classes.

Overrides:
getPreferredOrder in class RegisterSet

useContiguous

public boolean useContiguous()
Description copied from class: RegisterSet
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)
Description copied from class: RegisterSet
Return the size of the register in addressable memory units.

Specified by:
registerSize in class RegisterSet

getCalleeSaves

public short[] getCalleeSaves()
Description copied from class: RegisterSet
Return the callee saves registers.

Specified by:
getCalleeSaves in class RegisterSet

getCalleeUses

public short[] getCalleeUses()
Description copied from class: RegisterSet
Return the callee uses registers.

Specified by:
getCalleeUses in class RegisterSet

numAllocatableRegisters

public int numAllocatableRegisters()
Description copied from class: RegisterSet
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)
Description copied from class: RegisterSet
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