9#if defined(__i386__) || defined(__x86_64__)
27static inline int get_cpuid_count(
unsigned int __leaf,
28 unsigned int __subleaf,
29 unsigned int *__eax,
unsigned int *__ebx,
30 unsigned int *__ecx,
unsigned int *__edx)
32 unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000,
nullptr);
34 if (__max_leaf == 0 || __max_leaf < __leaf)
37 __cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
58 k_num_gpr_registers_i386,
59 "g_gpr_regnums_i386 has wrong number of register infos");
62static const uint32_t g_fpu_regnums_i386[] = {
74static_assert((
sizeof(g_fpu_regnums_i386) /
sizeof(g_fpu_regnums_i386[0])) -
76 k_num_fpr_registers_i386,
77 "g_fpu_regnums_i386 has wrong number of register infos");
87 k_num_avx_registers_i386,
88 " g_avx_regnums_i386 has wrong number of register infos");
91static const uint32_t g_mpx_regnums_i386[] = {
96static_assert((
sizeof(g_mpx_regnums_i386) /
sizeof(g_mpx_regnums_i386[0])) -
98 k_num_mpx_registers_i386,
99 "g_mpx_regnums_x86_64 has wrong number of register infos");
144 k_num_gpr_registers_x86_64,
145 "g_gpr_regnums_x86_64 has wrong number of register infos");
148static const uint32_t g_fpu_regnums_x86_64[] = {
166static_assert((
sizeof(g_fpu_regnums_x86_64) /
sizeof(g_fpu_regnums_x86_64[0])) -
168 k_num_fpr_registers_x86_64,
169 "g_fpu_regnums_x86_64 has wrong number of register infos");
181 k_num_avx_registers_x86_64,
182 "g_avx_regnums_x86_64 has wrong number of register infos");
185static const uint32_t g_mpx_regnums_x86_64[] = {
190static_assert((
sizeof(g_mpx_regnums_x86_64) /
sizeof(g_mpx_regnums_x86_64[0])) -
192 k_num_mpx_registers_x86_64,
193 "g_mpx_regnums_x86_64 has wrong number of register infos");
207 g_mpx_regnums_i386}};
214 g_fpu_regnums_x86_64},
218 g_mpx_regnums_x86_64}};
220#define REG_CONTEXT_SIZE (GetRegisterInfoInterface().GetGPRSize() + sizeof(FPR))
226#define NT_X86_XSTATE 0x202
229#define NT_PRXFPREG 0x46e62b7f
234static inline unsigned int fxsr_regset(
const ArchSpec &arch) {
242#define bit_MPX 0x4000
246#define mask_XSTATE_AVX (1ULL << 2)
247#define mask_XSTATE_BNDREGS (1ULL << 3)
248#define mask_XSTATE_BNDCFG (1ULL << 4)
249#define mask_XSTATE_MPX (mask_XSTATE_BNDREGS | mask_XSTATE_BNDCFG)
251std::unique_ptr<NativeRegisterContextLinux>
252NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
254 return std::unique_ptr<NativeRegisterContextLinux>(
255 new NativeRegisterContextLinux_x86_64(target_arch, native_thread));
258llvm::Expected<ArchSpec>
259NativeRegisterContextLinux::DetermineArchitecture(
lldb::tid_t tid) {
260 return DetermineArchitectureViaGPR(
267CreateRegisterInfoInterface(
const ArchSpec &target_arch) {
268 if (HostInfo::GetArchitecture().GetAddressByteSize() == 4) {
272 assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
273 "Register setting path assumes this is a 64-bit host");
285static std::size_t GetXSTATESize() {
294 return std::max<std::size_t>(
ecx,
sizeof(
FPR));
297NativeRegisterContextLinux_x86_64::NativeRegisterContextLinux_x86_64(
300 native_thread, CreateRegisterInfoInterface(target_arch)),
303 m_xstate_type(XStateType::
Invalid), m_ymm_set(), m_mpx_set(),
304 m_reg_info(), m_gpr_x86_64() {
307 case llvm::Triple::x86:
332 case llvm::Triple::x86_64:
358 assert(
false &&
"Unhandled target architecture.");
362 std::size_t xstate_size = GetXSTATESize();
363 m_xstate.reset(
static_cast<FPR *
>(std::malloc(xstate_size)));
364 m_iovec.iov_base = m_xstate.get();
365 m_iovec.iov_len = xstate_size;
368 ::memset(m_xstate.get(), 0, xstate_size);
371 const RegisterInfo *reg_info_fctrl = GetRegisterInfoByName(
"fctrl");
372 m_fctrl_offset_in_userarea = reg_info_fctrl->byte_offset;
377uint32_t NativeRegisterContextLinux_x86_64::GetRegisterSetCount()
const {
380 if (IsRegisterSetAvailable(set_index))
387uint32_t NativeRegisterContextLinux_x86_64::GetUserRegisterCount()
const {
390 const RegisterSet *set = GetRegisterSet(set_index);
392 count += set->num_registers;
398NativeRegisterContextLinux_x86_64::GetRegisterSet(
uint32_t set_index)
const {
399 if (!IsRegisterSetAvailable(set_index))
402 switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
403 case llvm::Triple::x86:
405 case llvm::Triple::x86_64:
408 assert(
false &&
"Unhandled target architecture.");
416NativeRegisterContextLinux_x86_64::ReadRegister(
const RegisterInfo *reg_info,
421 error.SetErrorString(
"reg_info NULL");
429 error.SetErrorStringWithFormat(
"register \"%s\" is an internal-only lldb "
430 "register, cannot read directly",
435 if (IsFPR(reg) || IsAVX(reg) || IsMPX(reg)) {
441 bool is_subreg = reg_info->invalidate_regs &&
446 full_reg = reg_info->invalidate_regs[0];
449 error = ReadRegisterRaw(full_reg, reg_value);
451 if (
error.Success()) {
454 if (is_subreg && (reg_info->byte_offset & 0x1))
470 if (reg >= m_reg_info.first_st && reg <= m_reg_info.last_st)
472 m_xstate->fxsave.stmm[reg - m_reg_info.first_st].bytes,
473 reg_info->byte_size, byte_order);
474 if (reg >= m_reg_info.first_mm && reg <= m_reg_info.last_mm)
476 m_xstate->fxsave.stmm[reg - m_reg_info.first_mm].bytes,
477 reg_info->byte_size, byte_order);
478 if (reg >= m_reg_info.first_xmm && reg <= m_reg_info.last_xmm)
480 m_xstate->fxsave.xmm[reg - m_reg_info.first_xmm].bytes,
481 reg_info->byte_size, byte_order);
482 if (reg >= m_reg_info.first_ymm && reg <= m_reg_info.last_ymm) {
485 if (CopyXSTATEtoYMM(reg, byte_order))
486 reg_value.
SetBytes(m_ymm_set.ymm[reg - m_reg_info.first_ymm].bytes,
487 reg_info->byte_size, byte_order);
489 error.SetErrorString(
"failed to copy ymm register value");
493 if (reg >= m_reg_info.first_mpxr && reg <= m_reg_info.last_mpxr) {
494 if (CopyXSTATEtoMPX(reg))
495 reg_value.
SetBytes(m_mpx_set.mpxr[reg - m_reg_info.first_mpxr].bytes,
496 reg_info->byte_size, byte_order);
498 error.SetErrorString(
"failed to copy mpx register value");
502 if (reg >= m_reg_info.first_mpxc && reg <= m_reg_info.last_mpxc) {
503 if (CopyXSTATEtoMPX(reg))
504 reg_value.
SetBytes(m_mpx_set.mpxc[reg - m_reg_info.first_mpxc].bytes,
505 reg_info->byte_size, byte_order);
507 error.SetErrorString(
"failed to copy mpx register value");
512 if (reg_value.
GetType() != RegisterValue::eTypeBytes)
513 error.SetErrorString(
514 "write failed - type was expected to be RegisterValue::eTypeBytes");
519 error.SetErrorString(
"byte order is invalid");
534 assert((reg_info->byte_offset - m_fctrl_offset_in_userarea) <
sizeof(
FPR));
535 uint8_t *src = (uint8_t *)m_xstate.get() + reg_info->byte_offset -
536 m_fctrl_offset_in_userarea;
538 if (src ==
reinterpret_cast<uint8_t *
>(&m_xstate->fxsave.ftag)) {
540 m_xstate->fxsave.ftag, m_xstate->fxsave.fstat, m_xstate->fxsave.stmm));
544 switch (reg_info->byte_size) {
546 reg_value.
SetUInt8(*(uint8_t *)src);
558 assert(
false &&
"Unhandled data size.");
559 error.SetErrorStringWithFormat(
"unhandled byte size: %" PRIu32,
560 reg_info->byte_size);
567void NativeRegisterContextLinux_x86_64::UpdateXSTATEforWrite(
570 if (IsFPR(reg_index)) {
573 xstate_bv |= XSAVE_HDR::XFeature::FP | XSAVE_HDR::XFeature::SSE;
574 }
else if (IsAVX(reg_index)) {
576 xstate_bv |= XSAVE_HDR::XFeature::YMM | XSAVE_HDR::XFeature::SSE;
577 }
else if (IsMPX(reg_index)) {
579 xstate_bv |= XSAVE_HDR::XFeature::BNDREGS | XSAVE_HDR::XFeature::BNDCSR;
583Status NativeRegisterContextLinux_x86_64::WriteRegister(
584 const RegisterInfo *reg_info,
const RegisterValue ®_value) {
585 assert(reg_info &&
"reg_info is null");
589 return Status(
"no lldb regnum for %s", reg_info && reg_info->name
591 :
"<unknown register>");
593 UpdateXSTATEforWrite(reg_index);
595 if (IsGPR(reg_index) || IsDR(reg_index))
596 return WriteRegisterRaw(reg_index, reg_value);
598 if (IsFPR(reg_index) || IsAVX(reg_index) || IsMPX(reg_index)) {
600 if (reg_index >= m_reg_info.first_st && reg_index <= m_reg_info.last_st)
601 ::memcpy(m_xstate->fxsave.stmm[reg_index - m_reg_info.first_st].bytes,
604 if (reg_index >= m_reg_info.first_mm && reg_index <= m_reg_info.last_mm)
605 ::memcpy(m_xstate->fxsave.stmm[reg_index - m_reg_info.first_mm].bytes,
608 if (reg_index >= m_reg_info.first_xmm && reg_index <= m_reg_info.last_xmm)
609 ::memcpy(m_xstate->fxsave.xmm[reg_index - m_reg_info.first_xmm].bytes,
612 if (reg_index >= m_reg_info.first_ymm &&
613 reg_index <= m_reg_info.last_ymm) {
616 ::memcpy(m_ymm_set.ymm[reg_index - m_reg_info.first_ymm].bytes,
618 if (!CopyYMMtoXSTATE(reg_index, GetByteOrder()))
619 return Status(
"CopyYMMtoXSTATE() failed");
622 if (reg_index >= m_reg_info.first_mpxr &&
623 reg_index <= m_reg_info.last_mpxr) {
624 ::memcpy(m_mpx_set.mpxr[reg_index - m_reg_info.first_mpxr].bytes,
626 if (!CopyMPXtoXSTATE(reg_index))
627 return Status(
"CopyMPXtoXSTATE() failed");
630 if (reg_index >= m_reg_info.first_mpxc &&
631 reg_index <= m_reg_info.last_mpxc) {
632 ::memcpy(m_mpx_set.mpxc[reg_index - m_reg_info.first_mpxc].bytes,
634 if (!CopyMPXtoXSTATE(reg_index))
635 return Status(
"CopyMPXtoXSTATE() failed");
649 assert((reg_info->byte_offset - m_fctrl_offset_in_userarea) <
651 uint8_t *dst = (uint8_t *)m_xstate.get() + reg_info->byte_offset -
652 m_fctrl_offset_in_userarea;
654 if (dst ==
reinterpret_cast<uint8_t *
>(&m_xstate->fxsave.ftag))
657 switch (reg_info->byte_size) {
671 assert(
false &&
"Unhandled data size.");
672 return Status(
"unhandled register data size %" PRIu32,
673 reg_info->byte_size);
682 if (IsAVX(reg_index)) {
683 if (!CopyYMMtoXSTATE(reg_index, GetByteOrder()))
684 return Status(
"CopyYMMtoXSTATE() failed");
687 if (IsMPX(reg_index)) {
688 if (!CopyMPXtoXSTATE(reg_index))
689 return Status(
"CopyMPXtoXSTATE() failed");
693 return Status(
"failed - register wasn't recognized to be a GPR or an FPR, "
694 "write strategy unknown");
697Status NativeRegisterContextLinux_x86_64::ReadAllRegisterValues(
698 lldb::WritableDataBufferSP &data_sp) {
710 uint8_t *dst = data_sp->GetBytes();
711 ::memcpy(dst, &m_gpr_x86_64, GetRegisterInfoInterface().GetGPRSize());
712 dst += GetRegisterInfoInterface().GetGPRSize();
713 if (m_xstate_type == XStateType::FXSAVE)
714 ::memcpy(dst, &m_xstate->fxsave,
sizeof(m_xstate->fxsave));
715 else if (m_xstate_type == XStateType::XSAVE) {
718 if (IsCPUFeatureAvailable(RegSet::avx)) {
720 for (
uint32_t reg = m_reg_info.first_ymm; reg <= m_reg_info.last_ymm;
722 if (!CopyXSTATEtoYMM(reg, byte_order)) {
723 error.SetErrorStringWithFormat(
724 "NativeRegisterContextLinux_x86_64::%s "
725 "CopyXSTATEtoYMM() failed for reg num "
733 if (IsCPUFeatureAvailable(RegSet::mpx)) {
734 for (
uint32_t reg = m_reg_info.first_mpxr; reg <= m_reg_info.last_mpxc;
736 if (!CopyXSTATEtoMPX(reg)) {
737 error.SetErrorStringWithFormat(
738 "NativeRegisterContextLinux_x86_64::%s "
739 "CopyXSTATEtoMPX() failed for reg num "
747 ::memcpy(dst, m_xstate.get(),
sizeof(
FPR));
749 assert(
false &&
"how do we save the floating point registers?");
750 error.SetErrorString(
"unsure how to save the floating point registers");
760 const RegisterInfo *reg_info =
761 GetRegisterInfoInterface().GetDynamicRegisterInfo(
"orig_eax");
762 if (reg_info ==
nullptr)
763 reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo(
"orig_rax");
765 if (reg_info !=
nullptr)
766 return DoWriteRegisterValue(reg_info->byte_offset, reg_info->name, value);
771Status NativeRegisterContextLinux_x86_64::WriteAllRegisterValues(
772 const lldb::DataBufferSP &data_sp) {
776 error.SetErrorStringWithFormat(
777 "NativeRegisterContextLinux_x86_64::%s invalid data_sp provided",
783 error.SetErrorStringWithFormatv(
784 "data_sp contained mismatched data size, expected {0}, actual {1}",
789 const uint8_t *src = data_sp->GetBytes();
790 if (src ==
nullptr) {
791 error.SetErrorStringWithFormat(
"NativeRegisterContextLinux_x86_64::%s "
792 "DataBuffer::GetBytes() returned a null "
797 ::memcpy(&m_gpr_x86_64, src, GetRegisterInfoInterface().GetGPRSize());
803 src += GetRegisterInfoInterface().GetGPRSize();
804 if (m_xstate_type == XStateType::FXSAVE)
805 ::memcpy(&m_xstate->fxsave, src,
sizeof(m_xstate->fxsave));
806 else if (m_xstate_type == XStateType::XSAVE)
807 ::memcpy(&m_xstate->xsave, src,
sizeof(m_xstate->xsave));
813 if (m_xstate_type == XStateType::XSAVE) {
816 if (IsCPUFeatureAvailable(RegSet::avx)) {
818 for (
uint32_t reg = m_reg_info.first_ymm; reg <= m_reg_info.last_ymm;
820 if (!CopyYMMtoXSTATE(reg, byte_order)) {
821 error.SetErrorStringWithFormat(
822 "NativeRegisterContextLinux_x86_64::%s "
823 "CopyYMMtoXSTATE() failed for reg num "
831 if (IsCPUFeatureAvailable(RegSet::mpx)) {
832 for (
uint32_t reg = m_reg_info.first_mpxr; reg <= m_reg_info.last_mpxc;
834 if (!CopyMPXtoXSTATE(reg)) {
835 error.SetErrorStringWithFormat(
836 "NativeRegisterContextLinux_x86_64::%s "
837 "CopyMPXtoXSTATE() failed for reg num "
849bool NativeRegisterContextLinux_x86_64::IsCPUFeatureAvailable(
850 RegSet feature_code)
const {
851 if (m_xstate_type == XStateType::Invalid) {
852 if (
const_cast<NativeRegisterContextLinux_x86_64 *
>(
this)->ReadFPR().Fail())
855 switch (feature_code) {
861 if ((m_xstate->xsave.i387.xcr0 & mask_XSTATE_AVX) == mask_XSTATE_AVX)
866 if ((m_xstate->xsave.i387.xcr0 & mask_XSTATE_MPX) == mask_XSTATE_MPX)
873bool NativeRegisterContextLinux_x86_64::IsRegisterSetAvailable(
877 switch (
static_cast<RegSet
>(set_index)) {
880 return (set_index < num_sets);
882 return IsCPUFeatureAvailable(RegSet::avx);
884 return IsCPUFeatureAvailable(RegSet::mpx);
889bool NativeRegisterContextLinux_x86_64::IsGPR(
uint32_t reg_index)
const {
891 return reg_index <= m_reg_info.last_gpr;
894bool NativeRegisterContextLinux_x86_64::IsFPR(
uint32_t reg_index)
const {
895 return (m_reg_info.first_fpr <= reg_index &&
896 reg_index <= m_reg_info.last_fpr);
899bool NativeRegisterContextLinux_x86_64::IsDR(
uint32_t reg_index)
const {
900 return (m_reg_info.first_dr <= reg_index &&
901 reg_index <= m_reg_info.last_dr);
904Status NativeRegisterContextLinux_x86_64::WriteFPR() {
905 switch (m_xstate_type) {
906 case XStateType::FXSAVE:
907 return WriteRegisterSet(
908 &m_iovec,
sizeof(m_xstate->fxsave),
909 fxsr_regset(GetRegisterInfoInterface().GetTargetArchitecture()));
910 case XStateType::XSAVE:
911 return WriteRegisterSet(&m_iovec,
sizeof(m_xstate->xsave), NT_X86_XSTATE);
913 return Status(
"Unrecognized FPR type.");
917bool NativeRegisterContextLinux_x86_64::IsAVX(
uint32_t reg_index)
const {
918 if (!IsCPUFeatureAvailable(RegSet::avx))
920 return (m_reg_info.first_ymm <= reg_index &&
921 reg_index <= m_reg_info.last_ymm);
924bool NativeRegisterContextLinux_x86_64::CopyXSTATEtoYMM(
926 if (!IsAVX(reg_index))
930 uint32_t reg_no = reg_index - m_reg_info.first_ymm;
932 m_xstate->fxsave.xmm[reg_no].bytes,
933 m_xstate->xsave.ymmh[reg_no].bytes);
940bool NativeRegisterContextLinux_x86_64::CopyYMMtoXSTATE(
946 uint32_t reg_no = reg - m_reg_info.first_ymm;
948 m_xstate->fxsave.xmm[reg_no].bytes,
949 m_xstate->xsave.ymmh[reg_no].bytes);
956void *NativeRegisterContextLinux_x86_64::GetFPRBuffer() {
957 switch (m_xstate_type) {
958 case XStateType::FXSAVE:
959 return &m_xstate->fxsave;
960 case XStateType::XSAVE:
967size_t NativeRegisterContextLinux_x86_64::GetFPRSize() {
968 switch (m_xstate_type) {
969 case XStateType::FXSAVE:
970 return sizeof(m_xstate->fxsave);
971 case XStateType::XSAVE:
972 return sizeof(m_iovec);
978Status NativeRegisterContextLinux_x86_64::ReadFPR() {
982 if (m_xstate_type != XStateType::FXSAVE) {
983 error = ReadRegisterSet(&m_iovec,
sizeof(m_xstate->xsave), NT_X86_XSTATE);
985 m_xstate_type = XStateType::XSAVE;
989 error = ReadRegisterSet(
990 &m_iovec,
sizeof(m_xstate->xsave),
991 fxsr_regset(GetRegisterInfoInterface().GetTargetArchitecture()));
993 m_xstate_type = XStateType::FXSAVE;
996 return Status(
"Unrecognized FPR type.");
999bool NativeRegisterContextLinux_x86_64::IsMPX(
uint32_t reg_index)
const {
1000 if (!IsCPUFeatureAvailable(RegSet::mpx))
1002 return (m_reg_info.first_mpxr <= reg_index &&
1003 reg_index <= m_reg_info.last_mpxc);
1006bool NativeRegisterContextLinux_x86_64::CopyXSTATEtoMPX(
uint32_t reg) {
1010 if (reg >= m_reg_info.first_mpxr && reg <= m_reg_info.last_mpxr) {
1011 ::memcpy(m_mpx_set.mpxr[reg - m_reg_info.first_mpxr].bytes,
1012 m_xstate->xsave.mpxr[reg - m_reg_info.first_mpxr].bytes,
1015 ::memcpy(m_mpx_set.mpxc[reg - m_reg_info.first_mpxc].bytes,
1016 m_xstate->xsave.mpxc[reg - m_reg_info.first_mpxc].bytes,
1022bool NativeRegisterContextLinux_x86_64::CopyMPXtoXSTATE(
uint32_t reg) {
1026 if (reg >= m_reg_info.first_mpxr && reg <= m_reg_info.last_mpxr) {
1027 ::memcpy(m_xstate->xsave.mpxr[reg - m_reg_info.first_mpxr].bytes,
1028 m_mpx_set.mpxr[reg - m_reg_info.first_mpxr].bytes,
sizeof(
MPXReg));
1030 ::memcpy(m_xstate->xsave.mpxc[reg - m_reg_info.first_mpxc].bytes,
1031 m_mpx_set.mpxc[reg - m_reg_info.first_mpxc].bytes,
sizeof(
MPXCsr));
1037NativeRegisterContextLinux_x86_64::GetPtraceOffset(
uint32_t reg_index) {
1039 return GetRegisterInfoAtIndex(reg_index)->byte_offset -
1040 (IsMPX(reg_index) ? 128 : 0);
1043std::optional<NativeRegisterContextLinux::SyscallData>
1044NativeRegisterContextLinux_x86_64::GetSyscallData() {
1045 switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
1046 case llvm::Triple::x86: {
1047 static const uint8_t Int80[] = {0xcd, 0x80};
1053 case llvm::Triple::x86_64: {
1054 static const uint8_t Syscall[] = {0x0f, 0x05};
1061 llvm_unreachable(
"Unhandled architecture!");
1065std::optional<NativeRegisterContextLinux::MmapData>
1066NativeRegisterContextLinux_x86_64::GetMmapData() {
1067 switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
1068 case llvm::Triple::x86:
1069 return MmapData{192, 91};
1070 case llvm::Triple::x86_64:
1071 return MmapData{9, 11};
1073 llvm_unreachable(
"Unhandled architecture!");
static llvm::raw_ostream & error(Stream &strm)
constexpr size_t k_num_register_sets
@ k_num_extended_register_sets
static const uint32_t g_gpr_regnums_x86_64[]
static const RegisterSet g_reg_sets_i386[k_num_register_sets]
const uint32_t g_gpr_regnums_i386[]
static const RegisterSet g_reg_sets_x86_64[k_num_register_sets]
const uint32_t g_avx_regnums_i386[]
static const uint32_t g_avx_regnums_x86_64[]
static size_t GetGPRSizeStatic()
An architecture specification class.
uint32_t GetAddressByteSize() const
Returns the size in bytes of an address of the current architecture.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
A command line argument class.
A subclass of DataBuffer that stores a data buffer on the heap.
RegisterInfo interface to patch RegisterInfo structure for archs.
uint16_t GetAsUInt16(uint16_t fail_value=UINT16_MAX, bool *success_ptr=nullptr) const
void SetUInt64(uint64_t uint, Type t=eTypeUInt64)
uint8_t GetAsUInt8(uint8_t fail_value=UINT8_MAX, bool *success_ptr=nullptr) const
void SetUInt16(uint16_t uint)
uint64_t GetAsUInt64(uint64_t fail_value=UINT64_MAX, bool *success_ptr=nullptr) const
void SetUInt8(uint8_t uint)
void SetBytes(const void *bytes, size_t length, lldb::ByteOrder byte_order)
const void * GetBytes() const
RegisterValue::Type GetType() const
void SetType(RegisterValue::Type type)
uint32_t GetAsUInt32(uint32_t fail_value=UINT32_MAX, bool *success_ptr=nullptr) const
void SetUInt32(uint32_t uint, Type t=eTypeUInt32)
uint32_t GetByteSize() const
#define LLDB_INVALID_REGNUM
A class that represents a running process on the host machine.
void YMMToXState(const YMMReg &input, void *xmm_bytes, void *ymmh_bytes)
uint16_t AbridgedToFullTagWord(uint8_t abridged_tw, uint16_t sw, llvm::ArrayRef< MMSReg > st_regs)
YMMReg XStateToYMM(const void *xmm_bytes, const void *ymmh_bytes)
@ k_num_fpr_registers_x86_64
@ k_num_avx_registers_x86_64
@ k_num_mpx_registers_x86_64
@ k_num_gpr_registers_x86_64
@ k_num_avx_registers_i386
@ k_num_fpr_registers_i386
@ k_num_mpx_registers_i386
@ k_num_gpr_registers_i386
uint8_t FullToAbridgedTagWord(uint16_t tw)
@ eEncodingVector
vector registers
ByteOrder
Byte ordering definitions.
@ eRegisterKindLLDB
lldb's internal register numbers