scale.backend.sparc
Class SparcV9RegisterSet

java.lang.Object
  extended by scale.backend.RegisterSet
      extended by scale.backend.sparc.SparcRegisterSet
          extended by scale.backend.sparc.SparcV9RegisterSet

public class SparcV9RegisterSet
extends SparcRegisterSet

This class describes the register set of the Sparc V9 using the 64-bit ABI.

$Id: SparcV9RegisterSet.java,v 1.12 2005-02-07 21:27:39 burrill Exp $

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

The Sparc V9 has 96 programmable registers. The registers 0..31 are used for integer values and addresses and registers 32..95 are used for floating point. The integer registers include the stack pointer and other housekeeping registers. Register 0 contains a hardwired 0 value.

Registers 0 through 31 are used for 32 and 64-bit integers. Registers 32 through 95 are used for floating point values. Each floating point register contains 32-bits. Single precision values use 32-bits from the first 32 floating point registers. Double precision values use 64-bits from each floating point register pair. Quad precision values use four 32-bit registers.

This register description defines a set of pseudo registers which map onto the actual hardware registers.


Field Summary
 
Fields inherited from class scale.backend.sparc.SparcRegisterSet
D0_REG, D2_REG, F0_REG, F1_REG, FP_REG, G0_REG, G1_REG, G2_REG, G3_REG, G4_REG, G5_REG, G6_REG, G7_REG, I0_REG, I1_REG, I2_REG, I3_REG, I4_REG, I5_REG, I6_REG, I7_REG, L0_REG, L1_REG, L2_REG, L3_REG, L4_REG, L5_REG, L6_REG, L7_REG, O0_REG, O1_REG, O2_REG, O3_REG, O4_REG, O5_REG, O6_REG, O7_REG, Q0_REG, Q2_REG, 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
SparcV9RegisterSet()
           
 
Method Summary
 int actualRegister(int reg)
          For architecture where a pseudo register are mapped onto actual registers, return the actual register.
 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 rangeBegin(int reg)
          Return the first real register that is affected when this register is modified.
 int rangeEnd(int reg)
          Return the last real register that is affected when this register is modified.
 java.lang.String registerName(int reg)
          Convert a register number into its assembly language form.
 int tempRegisterType(int type, int bs)
          Return the type with the size information added.
 
Methods inherited from class scale.backend.sparc.SparcRegisterSet
numAllocatableRegisters, registerSize, tempRegisterType
 
Methods inherited from class scale.backend.RegisterSet
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, readOnlyRegister, setResultRegister, specialRegister, tempRegister, useContiguous, virtualRegister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparcV9RegisterSet

public SparcV9RegisterSet()
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

rangeBegin

public int rangeBegin(int reg)
Return the first real register that is affected when this register is modified.

Overrides:
rangeBegin in class RegisterSet

actualRegister

public int actualRegister(int reg)
For architecture where a pseudo register are mapped onto actual registers, return the actual register. An example is shown by the SparcV8RegisterSet where a 64-bit long long register is mapped onto a set of two 32-bit registers.

Overrides:
actualRegister in class RegisterSet

rangeEnd

public int rangeEnd(int reg)
Return the last real register that is affected when this register is modified.

Overrides:
rangeEnd 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

tempRegisterType

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

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