scale.backend.ppc
Class PPCRegisterSet

java.lang.Object
  extended by scale.backend.RegisterSet
      extended by scale.backend.ppc.PPCRegisterSet
Direct Known Subclasses:
PPCG4RegisterSet, PPCG5RegisterSet

public abstract class PPCRegisterSet
extends RegisterSet

This class describes the register set of the PowerPC.

$Id: PPCRegisterSet.java,v 1.8 2005-02-07 21:27:32 burrill Exp $

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

The PPC has 64 programmable registers. The first 32 registers are used for integer values and addresses. This includes the stack pointer and other housekeeping registers. Registers 32 through 63 are used for floating point values.


Field Summary
static int FFA_REG
          First floating point argument register.
static int FIA_REG
          First integer argument register.
static int FR_REG
          Floating point function value return register.
static int IR_REG
          Integer function value return register.
static int LFA_REG_LINUX
          Last floating point argument register for Linux.
static int LFA_REG_MACOSX
          Last floating point argumenmt register for MACOSX.
static int LIA_REG
          Last integer argument register.
static int SP_REG
          Stack pointer register.
static int TOC_REG
          Table of contents 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
PPCRegisterSet(short[] actualRegisters)
           
 
Method Summary
 int numAllocatableRegisters()
          Return the number of unique registers that can hold programmer values.
 int registerSize(int reg)
          Return the size of the register in bytes.
 
Methods inherited from class scale.backend.RegisterSet
actualRegister, adrRegister, compatible, compatibleNS, continueRegister, display, doubleRegister, floatRegister, getCalleeSaves, getCalleeUses, getPreferredOrder, 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, registerName, setResultRegister, specialRegister, tempRegister, tempRegisterType, tempRegisterType, useContiguous, 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
Stack pointer register.

See Also:
Constant Field Values

TOC_REG

public static final int TOC_REG
Table of contents register.

See Also:
Constant Field Values

FIA_REG

public static final int FIA_REG
First integer argument register.

See Also:
Constant Field Values

LIA_REG

public static final int LIA_REG
Last integer argument register.

See Also:
Constant Field Values

FFA_REG

public static final int FFA_REG
First floating point argument register.

See Also:
Constant Field Values

LFA_REG_MACOSX

public static final int LFA_REG_MACOSX
Last floating point argumenmt register for MACOSX.

See Also:
Constant Field Values

LFA_REG_LINUX

public static final int LFA_REG_LINUX
Last floating point argument register for Linux.

See Also:
Constant Field Values

IR_REG

public static final int IR_REG
Integer function value return 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
Constructor Detail

PPCRegisterSet

public PPCRegisterSet(short[] actualRegisters)
Method Detail

registerSize

public int registerSize(int reg)
Return the size of the register in bytes.

Specified by:
registerSize 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.