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

#include <xbyak.h>

Inheritance diagram for Xbyak::Reg:
Collaboration diagram for Xbyak::Reg:

Public Member Functions

 Reg ()
 
 Reg (int idx, Kind kind, int bit=0, bool ext8bit=false)
 
Reg changeBit (int bit) const
 
uint8 getRexW () const
 
uint8 getRexR () const
 
uint8 getRexX () const
 
uint8 getRexB () const
 
uint8 getRex (const Reg &base=Reg()) const
 
Reg8 cvt8 () const
 
Reg16 cvt16 () const
 
Reg32 cvt32 () const
 
- Public Member Functions inherited from Xbyak::Operand
 Operand ()
 
 Operand (int idx, Kind kind, int bit, bool ext8bit=0)
 
Kind getKind () const
 
int getIdx () const
 
bool isNone () const
 
bool isMMX () const
 
bool isXMM () const
 
bool isYMM () const
 
bool isZMM () const
 
bool isXMEM () const
 
bool isYMEM () const
 
bool isZMEM () const
 
bool isOPMASK () const
 
bool isBNDREG () const
 
bool isREG (int bit=0) const
 
bool isMEM (int bit=0) const
 
bool isFPU () const
 
bool isExt8bit () const
 
bool isExtIdx () const
 
bool isExtIdx2 () const
 
bool hasEvex () const
 
bool hasRex () const
 
bool hasZero () const
 
int getOpmaskIdx () const
 
int getRounding () const
 
void setKind (Kind kind)
 
void setBit (int bit)
 
void setOpmaskIdx (int idx, bool ignore_idx0=false)
 
void setRounding (int idx)
 
void setZero ()
 
bool isHigh8bit () const
 
bool is (int kind, uint32 bit=0) const
 
bool isBit (uint32 bit) const
 
uint32 getBit () const
 
const char * toString () const
 
bool isEqualIfNotInherited (const Operand &rhs) const
 
bool operator== (const Operand &rhs) const
 
bool operator!= (const Operand &rhs) const
 
const AddressgetAddress () const
 
const ReggetReg () const
 

Additional Inherited Members

- Public Types inherited from Xbyak::Operand
enum  Kind {
  NONE = 0 , MEM = 1 << 0 , REG = 1 << 1 , MMX = 1 << 2 ,
  FPU = 1 << 3 , XMM = 1 << 4 , YMM = 1 << 5 , ZMM = 1 << 6 ,
  OPMASK = 1 << 7 , BNDREG = 1 << 8
}
 
enum  Code {
  EAX = 0 , ECX , EDX , EBX ,
  ESP , EBP , ESI , EDI ,
  AX = 0 , CX , DX , BX ,
  SP , BP , SI , DI ,
  AL = 0 , CL , DL , BL ,
  AH , CH , DH , BH
}
 
- Protected Member Functions inherited from Xbyak::Operand
void setIdx (int idx)
 
- Protected Attributes inherited from Xbyak::Operand
unsigned int zero_:1
 
unsigned int mask_:3
 
unsigned int rounding_:3
 

Detailed Description

Definition at line 517 of file xbyak.h.

Constructor & Destructor Documentation

◆ Reg() [1/2]

Xbyak::Reg::Reg ( )
inline

Definition at line 519 of file xbyak.h.

519{ }
Here is the caller graph for this function:

◆ Reg() [2/2]

Xbyak::Reg::Reg ( int idx,
Kind kind,
int bit = 0,
bool ext8bit = false )
inline

Definition at line 520 of file xbyak.h.

520: Operand(idx, kind, bit, ext8bit) { }
int bit
Definition yubihsm.h:566

Member Function Documentation

◆ changeBit()

Reg Xbyak::Reg::changeBit ( int bit) const
inline

Definition at line 521 of file xbyak.h.

521{ return Reg(getIdx(), getKind(), bit, isExt8bit()); }
bool isExt8bit() const
Definition xbyak.h:412
Kind getKind() const
Definition xbyak.h:397
int getIdx() const
Definition xbyak.h:398
Here is the call graph for this function:

◆ cvt16()

Reg16 Reg::cvt16 ( ) const
inline

Definition at line 647 of file xbyak.h.

648{
649 const int idx = getIdx();
650 if (isBit(8) && (4 <= idx && idx < 8) && !isExt8bit()) throw Error(ERR_CANT_CONVERT);
651 return Reg16(idx);
652}
Error
Definition calc.cpp:23
bool isBit(uint32 bit) const
Definition xbyak.h:452
@ ERR_CANT_CONVERT
Definition xbyak.h:165

◆ cvt32()

Reg32 Reg::cvt32 ( ) const
inline

Definition at line 654 of file xbyak.h.

655{
656 const int idx = getIdx();
657 if (isBit(8) && (4 <= idx && idx < 8) && !isExt8bit()) throw Error(ERR_CANT_CONVERT);
658 return Reg32(idx);
659}

◆ cvt8()

Reg8 Reg::cvt8 ( ) const
inline

Definition at line 637 of file xbyak.h.

638{
639 const int idx = getIdx();
640 if (isBit(8)) return Reg8(idx, isExt8bit());
641#ifdef XBYAK32
642 if (idx >= 4) throw Error(ERR_CANT_CONVERT);
643#endif
644 return Reg8(idx, 4 <= idx && idx < 8);
645}

◆ getRex()

uint8 Xbyak::Reg::getRex ( const Reg & base = Reg()) const
inline

Definition at line 526 of file xbyak.h.

527 {
528 uint8 rex = getRexW() | getRexR() | base.getRexW() | base.getRexB();
529 if (rex || isExt8bit() || base.isExt8bit()) rex |= 0x40;
530 return rex;
531 }
uint8 getRexW() const
Definition xbyak.h:522
uint8 getRexR() const
Definition xbyak.h:523
unsigned char uint8

◆ getRexB()

uint8 Xbyak::Reg::getRexB ( ) const
inline

Definition at line 525 of file xbyak.h.

525{ return isExtIdx() ? 1 : 0; }
bool isExtIdx() const
Definition xbyak.h:413
Here is the call graph for this function:

◆ getRexR()

uint8 Xbyak::Reg::getRexR ( ) const
inline

Definition at line 523 of file xbyak.h.

523{ return isExtIdx() ? 4 : 0; }
Here is the call graph for this function:

◆ getRexW()

uint8 Xbyak::Reg::getRexW ( ) const
inline

Definition at line 522 of file xbyak.h.

522{ return isREG(64) ? 8 : 0; }
bool isREG(int bit=0) const
Definition xbyak.h:409
Here is the call graph for this function:

◆ getRexX()

uint8 Xbyak::Reg::getRexX ( ) const
inline

Definition at line 524 of file xbyak.h.

524{ return isExtIdx() ? 2 : 0; }
Here is the call graph for this function:

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