9#ifndef LLDB_CORE_OPCODE_H
10#define LLDB_CORE_OPCODE_H
15#include "llvm/ADT/bit.h"
83 uint8_t
GetOpcode8(uint8_t invalid_opcode = UINT8_MAX)
const {
102 return invalid_opcode;
105 uint16_t
GetOpcode16(uint16_t invalid_opcode = UINT16_MAX)
const {
125 return invalid_opcode;
148 return invalid_opcode;
172 return invalid_opcode;
228 int Dump(
Stream *s, uint32_t min_byte_width)
const;
241 return sizeof(
m_data.inst8);
243 return sizeof(
m_data.inst16);
245 return m_data.inst.length;
248 return sizeof(
m_data.inst32);
250 return sizeof(
m_data.inst64);
252 return m_data.inst.length;
void SetOpcode16(uint16_t inst, lldb::ByteOrder order)
void SetOpcodeBytes(const void *bytes, size_t length)
Opcode(uint16_t inst, lldb::ByteOrder order)
void DoSetOpcodeBytes(const void *bytes, size_t length, Opcode::Type type, lldb::ByteOrder order)
uint8_t GetOpcode8(uint8_t invalid_opcode=UINT8_MAX) const
void SetOpcode16_2(uint32_t inst, lldb::ByteOrder order)
static constexpr size_t kMaxByteSize
The size in bytes of the fixed buffer used to store opcode bytes.
Opcode(uint8_t inst, lldb::ByteOrder order)
uint32_t GetByteSize() const
bool GetEndianSwap() const
void SetOpcode64(uint64_t inst, lldb::ByteOrder order)
lldb::ByteOrder m_byte_order
struct lldb_private::Opcode::@117017165353344322347136027142074320135273153214::@067256214025177322235123266021137222221234113202 inst
const void * GetOpcodeDataBytes() const
uint8_t bytes[kMaxByteSize]
Opcode::Type GetType() const
union lldb_private::Opcode::@117017165353344322347136027142074320135273153214 m_data
int Dump(Stream *s, uint32_t min_byte_width) const
const void * GetOpcodeBytes() const
Opcode(uint32_t inst, lldb::ByteOrder order)
Opcode(uint64_t inst, lldb::ByteOrder order)
lldb::ByteOrder GetDataByteOrder() const
void SetOpcode8(uint8_t inst, lldb::ByteOrder order)
void SetOpcode16_32TupleBytes(const void *bytes, size_t length, lldb::ByteOrder order)
uint32_t GetData(DataExtractor &data) const
uint32_t GetOpcode32(uint32_t invalid_opcode=UINT32_MAX) const
uint16_t GetOpcode16(uint16_t invalid_opcode=UINT16_MAX) const
void SetOpcode32(uint32_t inst, lldb::ByteOrder order)
uint64_t GetOpcode64(uint64_t invalid_opcode=UINT64_MAX) const
Opcode(uint8_t *bytes, size_t length, Opcode::Type type, lldb::ByteOrder order)
A stream class that can stream formatted output to a file.
lldb::ByteOrder InlHostByteOrder()
A class that represents a running process on the host machine.
ByteOrder
Byte ordering definitions.