clang  3.7.0
Public Types | Public Member Functions | Public Attributes | List of all members
clang::TargetInfo::ConstraintInfo Struct Reference

#include <TargetInfo.h>

Collaboration diagram for clang::TargetInfo::ConstraintInfo:
[legend]

Public Types

enum  {
  CI_None = 0x00, CI_AllowsMemory = 0x01, CI_AllowsRegister = 0x02, CI_ReadWrite = 0x04,
  CI_HasMatchingInput = 0x08, CI_ImmediateConstant = 0x10, CI_EarlyClobber = 0x20
}
 

Public Member Functions

 ConstraintInfo (StringRef ConstraintStr, StringRef Name)
 
const std::string & getConstraintStr () const
 
const std::string & getName () const
 
bool isReadWrite () const
 
bool earlyClobber ()
 
bool allowsRegister () const
 
bool allowsMemory () const
 
bool hasMatchingInput () const
 Return true if this output operand has a matching (tied) input operand. More...
 
bool hasTiedOperand () const
 Return true if this input operand is a matching constraint that ties it to an output operand. More...
 
unsigned getTiedOperand () const
 
bool requiresImmediateConstant () const
 
int getImmConstantMin () const
 
int getImmConstantMax () const
 
void setIsReadWrite ()
 
void setEarlyClobber ()
 
void setAllowsMemory ()
 
void setAllowsRegister ()
 
void setHasMatchingInput ()
 
void setRequiresImmediate (int Min, int Max)
 
void setTiedOperand (unsigned N, ConstraintInfo &Output)
 Indicate that this is an input operand that is tied to the specified output operand. More...
 

Public Attributes

unsigned Flags
 
int TiedOperand
 
struct {
   int   Min
 
   int   Max
 
ImmRange
 
std::string ConstraintStr
 
std::string Name
 

Detailed Description

Definition at line 543 of file include/clang/Basic/TargetInfo.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CI_None 
CI_AllowsMemory 
CI_AllowsRegister 
CI_ReadWrite 
CI_HasMatchingInput 
CI_ImmediateConstant 
CI_EarlyClobber 

Definition at line 544 of file include/clang/Basic/TargetInfo.h.

Constructor & Destructor Documentation

clang::TargetInfo::ConstraintInfo::ConstraintInfo ( StringRef  ConstraintStr,
StringRef  Name 
)
inline

Definition at line 563 of file include/clang/Basic/TargetInfo.h.

References ImmRange.

Member Function Documentation

bool clang::TargetInfo::ConstraintInfo::allowsMemory ( ) const
inline
bool clang::TargetInfo::ConstraintInfo::allowsRegister ( ) const
inline
bool clang::TargetInfo::ConstraintInfo::earlyClobber ( )
inline
const std::string& clang::TargetInfo::ConstraintInfo::getConstraintStr ( ) const
inline
int clang::TargetInfo::ConstraintInfo::getImmConstantMax ( ) const
inline

Definition at line 595 of file include/clang/Basic/TargetInfo.h.

References ImmRange.

int clang::TargetInfo::ConstraintInfo::getImmConstantMin ( ) const
inline

Definition at line 594 of file include/clang/Basic/TargetInfo.h.

References ImmRange.

const std::string& clang::TargetInfo::ConstraintInfo::getName ( ) const
inline

Definition at line 570 of file include/clang/Basic/TargetInfo.h.

References Name.

unsigned clang::TargetInfo::ConstraintInfo::getTiedOperand ( ) const
inline
bool clang::TargetInfo::ConstraintInfo::hasMatchingInput ( ) const
inline

Return true if this output operand has a matching (tied) input operand.

Definition at line 578 of file include/clang/Basic/TargetInfo.h.

References CI_HasMatchingInput, and Flags.

Referenced by clang::CodeGen::CodeGenFunction::EmitAsmStmt().

bool clang::TargetInfo::ConstraintInfo::hasTiedOperand ( ) const
inline

Return true if this input operand is a matching constraint that ties it to an output operand.

If this returns true then getTiedOperand will indicate which output operand this is tied to.

Definition at line 585 of file include/clang/Basic/TargetInfo.h.

References TiedOperand.

Referenced by clang::Sema::ActOnGCCAsmStmt(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), getTiedOperand(), and clang::TargetInfo::validateInputConstraint().

bool clang::TargetInfo::ConstraintInfo::isReadWrite ( ) const
inline
bool clang::TargetInfo::ConstraintInfo::requiresImmediateConstant ( ) const
inline

Definition at line 591 of file include/clang/Basic/TargetInfo.h.

References CI_ImmediateConstant, and Flags.

void clang::TargetInfo::ConstraintInfo::setAllowsMemory ( )
inline
void clang::TargetInfo::ConstraintInfo::setAllowsRegister ( )
inline
void clang::TargetInfo::ConstraintInfo::setEarlyClobber ( )
inline
void clang::TargetInfo::ConstraintInfo::setHasMatchingInput ( )
inline

Definition at line 601 of file include/clang/Basic/TargetInfo.h.

References CI_HasMatchingInput, and Flags.

Referenced by setTiedOperand().

void clang::TargetInfo::ConstraintInfo::setIsReadWrite ( )
inline

Definition at line 597 of file include/clang/Basic/TargetInfo.h.

References CI_ReadWrite, and Flags.

Referenced by clang::TargetInfo::validateOutputConstraint().

void clang::TargetInfo::ConstraintInfo::setRequiresImmediate ( int  Min,
int  Max 
)
inline

Definition at line 602 of file include/clang/Basic/TargetInfo.h.

References CI_ImmediateConstant, Flags, ImmRange, Max, and Min.

void clang::TargetInfo::ConstraintInfo::setTiedOperand ( unsigned  N,
ConstraintInfo Output 
)
inline

Indicate that this is an input operand that is tied to the specified output operand.

Copy over the various constraint information from the output.

Definition at line 612 of file include/clang/Basic/TargetInfo.h.

References Flags, setHasMatchingInput(), and TiedOperand.

Referenced by clang::TargetInfo::validateInputConstraint().

Member Data Documentation

std::string clang::TargetInfo::ConstraintInfo::ConstraintStr
unsigned clang::TargetInfo::ConstraintInfo::Flags
struct { ... } clang::TargetInfo::ConstraintInfo::ImmRange
int clang::TargetInfo::ConstraintInfo::Max

Definition at line 557 of file include/clang/Basic/TargetInfo.h.

Referenced by setRequiresImmediate().

int clang::TargetInfo::ConstraintInfo::Min

Definition at line 556 of file include/clang/Basic/TargetInfo.h.

Referenced by setRequiresImmediate().

std::string clang::TargetInfo::ConstraintInfo::Name

Definition at line 561 of file include/clang/Basic/TargetInfo.h.

Referenced by getName().

int clang::TargetInfo::ConstraintInfo::TiedOperand

The documentation for this struct was generated from the following file: