Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Xbyak::Label Class Reference

#include <xbyak.h>

Public Member Functions

 Label ()
 
 Label (const Label &rhs)
 
Labeloperator= (const Label &rhs)
 
 ~Label ()
 
int getId () const
 
const uint8getAddress () const
 

Static Public Member Functions

static std::string toStr (int num)
 

Friends

class LabelManager
 

Detailed Description

Definition at line 1090 of file xbyak.h.

Constructor & Destructor Documentation

◆ Label() [1/2]

Xbyak::Label::Label ( )
inline

Definition at line 1095 of file xbyak.h.

1095: mgr(0), id(0) {}

◆ Label() [2/2]

Xbyak::Label::Label ( const Label & rhs)
inline

Definition at line 1313 of file xbyak.h.

1314{
1315 id = rhs.id;
1316 mgr = rhs.mgr;
1317 if (mgr) mgr->incRefCount(id);
1318}

◆ ~Label()

Xbyak::Label::~Label ( )
inline

Definition at line 1327 of file xbyak.h.

1328{
1329 if (id && mgr) mgr->decRefCount(id);
1330}

Member Function Documentation

◆ getAddress()

const uint8 * Xbyak::Label::getAddress ( ) const
inline

Definition at line 1331 of file xbyak.h.

1332{
1333 if (mgr == 0 || !mgr->isReady()) return 0;
1334 size_t offset;
1335 if (!mgr->getOffset(&offset, *this)) return 0;
1336 return mgr->getCode() + offset;
1337}
bool isReady() const
Definition xbyak.h:1310
bool getOffset(size_t *offset, std::string &label) const
Definition xbyak.h:1271
const uint8 * getCode() const
Definition xbyak.h:1309
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getId()

int Xbyak::Label::getId ( ) const
inline

Definition at line 1099 of file xbyak.h.

1099{ return id; }

◆ operator=()

Label & Xbyak::Label::operator= ( const Label & rhs)
inline

Definition at line 1319 of file xbyak.h.

1320{
1321 if (id) throw Error(ERR_LABEL_IS_ALREADY_SET_BY_L);
1322 id = rhs.id;
1323 mgr = rhs.mgr;
1324 if (mgr) mgr->incRefCount(id);
1325 return *this;
1326}
Error
Definition calc.cpp:23
@ ERR_LABEL_IS_ALREADY_SET_BY_L
Definition xbyak.h:167

◆ toStr()

static std::string Xbyak::Label::toStr ( int num)
inlinestatic

Definition at line 1103 of file xbyak.h.

1104 {
1105 char buf[16];
1106#if defined(_MSC_VER) && (_MSC_VER < 1900)
1107 _snprintf_s
1108#else
1109 snprintf
1110#endif
1111 (buf, sizeof(buf), ".%08x", num);
1112 return buf;
1113 }
uint8_t buf[2048]
Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ LabelManager

friend class LabelManager
friend

Definition at line 1093 of file xbyak.h.


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