LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
llvm::MipsABIInfo Class Reference

#include "Target/Mips/MCTargetDesc/MipsABIInfo.h"

Collaboration diagram for llvm::MipsABIInfo:
Collaboration graph
[legend]

Public Types

enum  ABI { ABI::Unknown, ABI::O32, ABI::N32, ABI::N64 }
 

Public Member Functions

 MipsABIInfo (ABI ThisABI)
 
bool IsKnown () const
 
bool IsO32 () const
 
bool IsN32 () const
 
bool IsN64 () const
 
ABI GetEnumValue () const
 
ArrayRef< MCPhysRegGetByValArgRegs () const
 The registers to use for byval arguments. More...
 
ArrayRef< MCPhysRegGetVarArgRegs () const
 The registers to use for the variable argument list. More...
 
unsigned GetCalleeAllocdArgSizeInBytes (CallingConv::ID CC) const
 Obtain the size of the area allocated by the callee for arguments. More...
 
bool operator< (const MipsABIInfo Other) const
 Ordering of ABI's MipsGenSubtargetInfo.inc will use this to resolve conflicts when given multiple ABI options. More...
 
unsigned GetStackPtr () const
 
unsigned GetFramePtr () const
 
unsigned GetBasePtr () const
 
unsigned GetGlobalPtr () const
 
unsigned GetNullPtr () const
 
unsigned GetZeroReg () const
 
unsigned GetPtrAdduOp () const
 
unsigned GetPtrAddiuOp () const
 
unsigned GetPtrSubuOp () const
 
unsigned GetPtrAndOp () const
 
unsigned GetGPRMoveOp () const
 
bool ArePtrs64bit () const
 
bool AreGprs64bit () const
 
unsigned GetEhDataReg (unsigned I) const
 

Static Public Member Functions

static MipsABIInfo Unknown ()
 
static MipsABIInfo O32 ()
 
static MipsABIInfo N32 ()
 
static MipsABIInfo N64 ()
 
static MipsABIInfo computeTargetABI (const Triple &TT, StringRef CPU, const MCTargetOptions &Options)
 

Protected Attributes

ABI ThisABI
 

Detailed Description

Definition at line 24 of file MipsABIInfo.h.

Member Enumeration Documentation

◆ ABI

Enumerator
Unknown 
O32 
N32 
N64 

Definition at line 26 of file MipsABIInfo.h.

Constructor & Destructor Documentation

◆ MipsABIInfo()

llvm::MipsABIInfo::MipsABIInfo ( ABI  ThisABI)
inline

Definition at line 32 of file MipsABIInfo.h.

Referenced by N32(), N64(), O32(), and Unknown().

Member Function Documentation

◆ AreGprs64bit()

bool llvm::MipsABIInfo::AreGprs64bit ( ) const
inline

Definition at line 76 of file MipsABIInfo.h.

References GetEhDataReg(), I, IsN32(), and IsN64().

Referenced by GetZeroReg().

◆ ArePtrs64bit()

bool llvm::MipsABIInfo::ArePtrs64bit ( ) const
inline

◆ computeTargetABI()

MipsABIInfo MipsABIInfo::computeTargetABI ( const Triple TT,
StringRef  CPU,
const MCTargetOptions Options 
)
static

◆ GetBasePtr()

unsigned MipsABIInfo::GetBasePtr ( ) const

Definition at line 82 of file MipsABIInfo.cpp.

References ArePtrs64bit().

Referenced by llvm::MipsSEFrameLowering::getFrameIndexReference(), and operator<().

◆ GetByValArgRegs()

ArrayRef< MCPhysReg > MipsABIInfo::GetByValArgRegs ( ) const

The registers to use for byval arguments.

Definition at line 33 of file MipsABIInfo.cpp.

References IsN32(), IsN64(), IsO32(), llvm_unreachable, and llvm::makeArrayRef().

Referenced by GetEnumValue(), llvm::MipsTargetLowering::getTypeForExtReturn(), and llvm::MipsTargetLowering::HandleByVal().

◆ GetCalleeAllocdArgSizeInBytes()

unsigned MipsABIInfo::GetCalleeAllocdArgSizeInBytes ( CallingConv::ID  CC) const

Obtain the size of the area allocated by the callee for arguments.

CallingConv::FastCall affects the value for O32.

Definition at line 49 of file MipsABIInfo.cpp.

References llvm::CallingConv::Fast, IsN32(), IsN64(), IsO32(), and llvm_unreachable.

Referenced by GetEnumValue(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::MipsCallLowering::lowerCall(), llvm::MipsCallLowering::lowerFormalArguments(), and UnpackFromArgumentSlot().

◆ GetEhDataReg()

unsigned MipsABIInfo::GetEhDataReg ( unsigned  I) const

◆ GetEnumValue()

ABI llvm::MipsABIInfo::GetEnumValue ( ) const
inline

Definition at line 45 of file MipsABIInfo.h.

References GetByValArgRegs(), GetCalleeAllocdArgSizeInBytes(), GetVarArgRegs(), and ThisABI.

Referenced by operator<().

◆ GetFramePtr()

unsigned MipsABIInfo::GetFramePtr ( ) const

◆ GetGlobalPtr()

unsigned MipsABIInfo::GetGlobalPtr ( ) const

Definition at line 86 of file MipsABIInfo.cpp.

References ArePtrs64bit().

Referenced by isShiftedUIntAtAnyPosition(), and operator<().

◆ GetGPRMoveOp()

unsigned MipsABIInfo::GetGPRMoveOp ( ) const

◆ GetNullPtr()

unsigned MipsABIInfo::GetNullPtr ( ) const

◆ GetPtrAddiuOp()

unsigned MipsABIInfo::GetPtrAddiuOp ( ) const

◆ GetPtrAdduOp()

unsigned MipsABIInfo::GetPtrAdduOp ( ) const

◆ GetPtrAndOp()

unsigned MipsABIInfo::GetPtrAndOp ( ) const

◆ GetPtrSubuOp()

unsigned MipsABIInfo::GetPtrSubuOp ( ) const

Definition at line 106 of file MipsABIInfo.cpp.

References ArePtrs64bit().

Referenced by llvm::MipsSEInstrInfo::adjustStackPtr(), and operator<().

◆ GetStackPtr()

unsigned MipsABIInfo::GetStackPtr ( ) const

◆ GetVarArgRegs()

ArrayRef< MCPhysReg > MipsABIInfo::GetVarArgRegs ( ) const

The registers to use for the variable argument list.

Definition at line 41 of file MipsABIInfo.cpp.

References IsN32(), IsN64(), IsO32(), llvm_unreachable, and llvm::makeArrayRef().

Referenced by GetEnumValue(), and llvm::MipsTargetLowering::getTypeForExtReturn().

◆ GetZeroReg()

unsigned MipsABIInfo::GetZeroReg ( ) const

◆ IsKnown()

bool llvm::MipsABIInfo::IsKnown ( ) const
inline

Definition at line 41 of file MipsABIInfo.h.

References Unknown.

◆ IsN32()

bool llvm::MipsABIInfo::IsN32 ( ) const
inline

◆ IsN64()

bool llvm::MipsABIInfo::IsN64 ( ) const
inline

◆ IsO32()

bool llvm::MipsABIInfo::IsO32 ( ) const
inline

◆ N32()

static MipsABIInfo llvm::MipsABIInfo::N32 ( )
inlinestatic

Definition at line 36 of file MipsABIInfo.h.

References MipsABIInfo(), and N32.

Referenced by computeTargetABI().

◆ N64()

static MipsABIInfo llvm::MipsABIInfo::N64 ( )
inlinestatic

◆ O32()

static MipsABIInfo llvm::MipsABIInfo::O32 ( )
inlinestatic

Definition at line 35 of file MipsABIInfo.h.

References MipsABIInfo(), and O32.

Referenced by computeTargetABI(), and llvm::MipsTargetELFStreamer::MipsTargetELFStreamer().

◆ operator<()

bool llvm::MipsABIInfo::operator< ( const MipsABIInfo  Other) const
inline

Ordering of ABI's MipsGenSubtargetInfo.inc will use this to resolve conflicts when given multiple ABI options.

Definition at line 60 of file MipsABIInfo.h.

References GetBasePtr(), GetEnumValue(), GetFramePtr(), GetGlobalPtr(), GetGPRMoveOp(), GetNullPtr(), GetPtrAddiuOp(), GetPtrAdduOp(), GetPtrAndOp(), GetPtrSubuOp(), GetStackPtr(), and GetZeroReg().

◆ Unknown()

static MipsABIInfo llvm::MipsABIInfo::Unknown ( )
inlinestatic

Definition at line 34 of file MipsABIInfo.h.

References MipsABIInfo(), and Unknown.

Member Data Documentation

◆ ThisABI

ABI llvm::MipsABIInfo::ThisABI
protected

Definition at line 29 of file MipsABIInfo.h.

Referenced by GetEnumValue().


The documentation for this class was generated from the following files: