2009-12-19 10:59:52 +08:00
|
|
|
//===- X86RecognizableInstr.h - Disassembler instruction spec ----*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2009-12-19 10:59:52 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file is part of the X86 Disassembler Emitter.
|
|
|
|
// It contains the interface of a single recognizable instruction.
|
|
|
|
// Documentation for the disassembler emitter in general can be found in
|
2017-07-04 21:09:29 +08:00
|
|
|
// X86DisassemblerEmitter.h.
|
2009-12-19 10:59:52 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_UTILS_TABLEGEN_X86RECOGNIZABLEINSTR_H
|
|
|
|
#define LLVM_UTILS_TABLEGEN_X86RECOGNIZABLEINSTR_H
|
2009-12-19 10:59:52 +08:00
|
|
|
|
2022-01-28 21:55:42 +08:00
|
|
|
#include "CodeGenInstruction.h"
|
2012-12-04 18:37:14 +08:00
|
|
|
#include "llvm/Support/DataTypes.h"
|
2022-01-28 21:55:42 +08:00
|
|
|
#include "llvm/Support/X86DisassemblerDecoderCommon.h"
|
|
|
|
|
|
|
|
struct InstructionSpecifier;
|
2009-12-19 10:59:52 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2022-01-28 21:55:42 +08:00
|
|
|
class Record;
|
|
|
|
|
2017-05-11 19:51:12 +08:00
|
|
|
#define X86_INSTR_MRM_MAPPING \
|
|
|
|
MAP(C0, 64) \
|
|
|
|
MAP(C1, 65) \
|
|
|
|
MAP(C2, 66) \
|
|
|
|
MAP(C3, 67) \
|
|
|
|
MAP(C4, 68) \
|
|
|
|
MAP(C5, 69) \
|
|
|
|
MAP(C6, 70) \
|
|
|
|
MAP(C7, 71) \
|
|
|
|
MAP(C8, 72) \
|
|
|
|
MAP(C9, 73) \
|
|
|
|
MAP(CA, 74) \
|
|
|
|
MAP(CB, 75) \
|
|
|
|
MAP(CC, 76) \
|
|
|
|
MAP(CD, 77) \
|
|
|
|
MAP(CE, 78) \
|
|
|
|
MAP(CF, 79) \
|
|
|
|
MAP(D0, 80) \
|
|
|
|
MAP(D1, 81) \
|
|
|
|
MAP(D2, 82) \
|
|
|
|
MAP(D3, 83) \
|
|
|
|
MAP(D4, 84) \
|
|
|
|
MAP(D5, 85) \
|
|
|
|
MAP(D6, 86) \
|
|
|
|
MAP(D7, 87) \
|
|
|
|
MAP(D8, 88) \
|
|
|
|
MAP(D9, 89) \
|
|
|
|
MAP(DA, 90) \
|
|
|
|
MAP(DB, 91) \
|
|
|
|
MAP(DC, 92) \
|
|
|
|
MAP(DD, 93) \
|
|
|
|
MAP(DE, 94) \
|
|
|
|
MAP(DF, 95) \
|
|
|
|
MAP(E0, 96) \
|
|
|
|
MAP(E1, 97) \
|
|
|
|
MAP(E2, 98) \
|
|
|
|
MAP(E3, 99) \
|
|
|
|
MAP(E4, 100) \
|
|
|
|
MAP(E5, 101) \
|
|
|
|
MAP(E6, 102) \
|
|
|
|
MAP(E7, 103) \
|
|
|
|
MAP(E8, 104) \
|
|
|
|
MAP(E9, 105) \
|
|
|
|
MAP(EA, 106) \
|
|
|
|
MAP(EB, 107) \
|
|
|
|
MAP(EC, 108) \
|
|
|
|
MAP(ED, 109) \
|
|
|
|
MAP(EE, 110) \
|
|
|
|
MAP(EF, 111) \
|
|
|
|
MAP(F0, 112) \
|
|
|
|
MAP(F1, 113) \
|
|
|
|
MAP(F2, 114) \
|
|
|
|
MAP(F3, 115) \
|
|
|
|
MAP(F4, 116) \
|
|
|
|
MAP(F5, 117) \
|
|
|
|
MAP(F6, 118) \
|
|
|
|
MAP(F7, 119) \
|
|
|
|
MAP(F8, 120) \
|
|
|
|
MAP(F9, 121) \
|
|
|
|
MAP(FA, 122) \
|
|
|
|
MAP(FB, 123) \
|
|
|
|
MAP(FC, 124) \
|
|
|
|
MAP(FD, 125) \
|
|
|
|
MAP(FE, 126) \
|
|
|
|
MAP(FF, 127)
|
|
|
|
|
|
|
|
// A clone of X86 since we can't depend on something that is generated.
|
|
|
|
namespace X86Local {
|
|
|
|
enum {
|
|
|
|
Pseudo = 0,
|
|
|
|
RawFrm = 1,
|
|
|
|
AddRegFrm = 2,
|
|
|
|
RawFrmMemOffs = 3,
|
|
|
|
RawFrmSrc = 4,
|
|
|
|
RawFrmDst = 5,
|
|
|
|
RawFrmDstSrc = 6,
|
|
|
|
RawFrmImm8 = 7,
|
|
|
|
RawFrmImm16 = 8,
|
[X86] Merge the different Jcc instructions for each condition code into single instructions that store the condition code as an operand.
Summary:
This avoids needing an isel pattern for each condition code. And it removes translation switches for converting between Jcc instructions and condition codes.
Now the printer, encoder and disassembler take care of converting the immediate. We use InstAliases to handle the assembly matching. But we print using the asm string in the instruction definition. The instruction itself is marked IsCodeGenOnly=1 to hide it from the assembly parser.
Reviewers: spatel, lebedev.ri, courbet, gchatelet, RKSimon
Reviewed By: RKSimon
Subscribers: MatzeB, qcolombet, eraman, hiraditya, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60228
llvm-svn: 357802
2019-04-06 03:28:09 +08:00
|
|
|
AddCCFrm = 9,
|
2020-02-22 04:30:27 +08:00
|
|
|
PrefixByte = 10,
|
2020-07-02 08:36:45 +08:00
|
|
|
MRMr0 = 21,
|
|
|
|
MRMSrcMemFSIB = 22,
|
|
|
|
MRMDestMemFSIB = 23,
|
2020-06-20 13:18:53 +08:00
|
|
|
MRMDestMem = 24,
|
|
|
|
MRMSrcMem = 25,
|
|
|
|
MRMSrcMem4VOp3 = 26,
|
|
|
|
MRMSrcMemOp4 = 27,
|
|
|
|
MRMSrcMemCC = 28,
|
|
|
|
MRMXmCC = 30, MRMXm = 31,
|
|
|
|
MRM0m = 32, MRM1m = 33, MRM2m = 34, MRM3m = 35,
|
|
|
|
MRM4m = 36, MRM5m = 37, MRM6m = 38, MRM7m = 39,
|
|
|
|
MRMDestReg = 40,
|
|
|
|
MRMSrcReg = 41,
|
|
|
|
MRMSrcReg4VOp3 = 42,
|
|
|
|
MRMSrcRegOp4 = 43,
|
|
|
|
MRMSrcRegCC = 44,
|
|
|
|
MRMXrCC = 46, MRMXr = 47,
|
|
|
|
MRM0r = 48, MRM1r = 49, MRM2r = 50, MRM3r = 51,
|
|
|
|
MRM4r = 52, MRM5r = 53, MRM6r = 54, MRM7r = 55,
|
|
|
|
MRM0X = 56, MRM1X = 57, MRM2X = 58, MRM3X = 59,
|
|
|
|
MRM4X = 60, MRM5X = 61, MRM6X = 62, MRM7X = 63,
|
2017-05-11 19:51:12 +08:00
|
|
|
#define MAP(from, to) MRM_##from = to,
|
|
|
|
X86_INSTR_MRM_MAPPING
|
|
|
|
#undef MAP
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2021-08-10 11:18:40 +08:00
|
|
|
OB = 0, TB = 1, T8 = 2, TA = 3, XOP8 = 4, XOP9 = 5, XOPA = 6, ThreeDNow = 7,
|
|
|
|
T_MAP5 = 8, T_MAP6 = 9
|
2017-05-11 19:51:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2018-04-03 14:37:04 +08:00
|
|
|
PD = 1, XS = 2, XD = 3, PS = 4
|
2017-05-11 19:51:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
VEX = 1, XOP = 2, EVEX = 3
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
OpSize16 = 1, OpSize32 = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
|
|
|
AdSize16 = 1, AdSize32 = 2, AdSize64 = 3
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
namespace X86Disassembler {
|
|
|
|
|
2022-01-28 21:55:42 +08:00
|
|
|
class DisassemblerTables;
|
|
|
|
|
2022-03-26 13:00:53 +08:00
|
|
|
/// Extract common fields of a single X86 instruction from a CodeGenInstruction
|
|
|
|
struct RecognizableInstrBase {
|
2014-01-31 16:47:06 +08:00
|
|
|
/// The OpPrefix field from the record
|
|
|
|
uint8_t OpPrefix;
|
|
|
|
/// The OpMap field from the record
|
|
|
|
uint8_t OpMap;
|
2009-12-19 10:59:52 +08:00
|
|
|
/// The opcode field from the record; this is the opcode used in the Intel
|
|
|
|
/// encoding and therefore distinct from the UID
|
|
|
|
uint8_t Opcode;
|
|
|
|
/// The form field from the record
|
|
|
|
uint8_t Form;
|
2014-02-02 15:08:01 +08:00
|
|
|
// The encoding field from the record
|
|
|
|
uint8_t Encoding;
|
2014-02-02 17:25:09 +08:00
|
|
|
/// The OpSize field from the record
|
|
|
|
uint8_t OpSize;
|
2014-12-24 14:05:22 +08:00
|
|
|
/// The AdSize field from the record
|
|
|
|
uint8_t AdSize;
|
2022-03-26 23:14:08 +08:00
|
|
|
/// The hasREX_W field from the record
|
|
|
|
bool HasREX_W;
|
2014-02-02 15:08:01 +08:00
|
|
|
/// The hasVEX_4V field from the record
|
|
|
|
bool HasVEX_4V;
|
2019-04-09 15:40:06 +08:00
|
|
|
/// The HasVEX_WPrefix field from the record
|
|
|
|
bool HasVEX_W;
|
|
|
|
/// The IgnoresVEX_W field from the record
|
|
|
|
bool IgnoresVEX_W;
|
2022-03-26 23:32:50 +08:00
|
|
|
/// The hasVEX_L field from the record
|
|
|
|
bool HasVEX_L;
|
2011-12-30 13:20:36 +08:00
|
|
|
/// The ignoreVEX_L field from the record
|
2011-10-04 14:30:42 +08:00
|
|
|
bool IgnoresVEX_L;
|
2013-07-28 16:28:38 +08:00
|
|
|
/// The hasEVEX_L2Prefix field from the record
|
2022-03-26 23:32:50 +08:00
|
|
|
bool HasEVEX_L2;
|
2013-07-28 16:28:38 +08:00
|
|
|
/// The hasEVEX_K field from the record
|
|
|
|
bool HasEVEX_K;
|
2013-11-03 21:46:31 +08:00
|
|
|
/// The hasEVEX_KZ field from the record
|
|
|
|
bool HasEVEX_KZ;
|
2013-07-28 16:28:38 +08:00
|
|
|
/// The hasEVEX_B field from the record
|
|
|
|
bool HasEVEX_B;
|
2017-10-23 10:26:24 +08:00
|
|
|
/// Indicates that the instruction uses the L and L' fields for RC.
|
|
|
|
bool EncodeRC;
|
2014-01-05 12:17:28 +08:00
|
|
|
/// The isCodeGenOnly field from the record
|
2009-12-19 10:59:52 +08:00
|
|
|
bool IsCodeGenOnly;
|
2022-03-26 22:29:23 +08:00
|
|
|
/// The isAsmParserOnly field from the record
|
|
|
|
bool IsAsmParserOnly;
|
2014-01-05 12:17:28 +08:00
|
|
|
/// The ForceDisassemble field from the record
|
|
|
|
bool ForceDisassemble;
|
2014-07-18 01:04:56 +08:00
|
|
|
// The CD8_Scale field from the record
|
|
|
|
uint8_t CD8_Scale;
|
2022-03-26 13:00:53 +08:00
|
|
|
/// \param insn The CodeGenInstruction to extract information from.
|
|
|
|
RecognizableInstrBase(const CodeGenInstruction &insn);
|
2022-03-26 22:29:23 +08:00
|
|
|
/// \returns true if this instruction should be emitted
|
|
|
|
bool shouldBeEmitted() const;
|
2022-03-26 13:00:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/// RecognizableInstr - Encapsulates all information required to decode a single
|
|
|
|
/// instruction, as extracted from the LLVM instruction tables. Has methods
|
|
|
|
/// to interpret the information available in the LLVM tables, and to emit the
|
|
|
|
/// instruction into DisassemblerTables.
|
|
|
|
class RecognizableInstr : public RecognizableInstrBase {
|
2022-03-26 16:33:29 +08:00
|
|
|
private:
|
2022-03-26 22:29:23 +08:00
|
|
|
/// The record from the .td files corresponding to this instruction
|
|
|
|
const Record* Rec;
|
2022-03-26 16:33:29 +08:00
|
|
|
/// The instruction name as listed in the tables
|
|
|
|
std::string Name;
|
|
|
|
// Whether the instruction has the predicate "In32BitMode"
|
|
|
|
bool Is32Bit;
|
2022-03-26 18:03:13 +08:00
|
|
|
// Whether the instruction has the predicate "In64BitMode"
|
|
|
|
bool Is64Bit;
|
2022-03-26 16:33:29 +08:00
|
|
|
/// The operands of the instruction, as listed in the CodeGenInstruction.
|
|
|
|
/// They are not one-to-one with operands listed in the MCInst; for example,
|
|
|
|
/// memory operands expand to 5 operands in the MCInst
|
|
|
|
const std::vector<CGIOperandList::OperandInfo>* Operands;
|
|
|
|
|
2022-03-26 13:00:53 +08:00
|
|
|
/// The opcode of the instruction, as used in an MCInst
|
|
|
|
InstrUID UID;
|
2009-12-19 10:59:52 +08:00
|
|
|
/// The description of the instruction that is emitted into the instruction
|
|
|
|
/// info table
|
|
|
|
InstructionSpecifier* Spec;
|
|
|
|
|
|
|
|
/// insnContext - Returns the primary context in which the instruction is
|
|
|
|
/// valid.
|
|
|
|
///
|
|
|
|
/// @return - The context in which the instruction is valid.
|
|
|
|
InstructionContext insnContext() const;
|
2011-03-15 09:23:15 +08:00
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// typeFromString - Translates an operand type from the string provided in
|
|
|
|
/// the LLVM tables to an OperandType for use in the operand specifier.
|
|
|
|
///
|
|
|
|
/// @param s - The string, as extracted by calling Rec->getName()
|
|
|
|
/// on a CodeGenInstruction::OperandInfo.
|
2022-03-26 23:14:08 +08:00
|
|
|
/// @param hasREX_W - Indicates whether the instruction has a REX.W
|
2009-12-19 10:59:52 +08:00
|
|
|
/// prefix. If it does, 32-bit register operands stay
|
|
|
|
/// 32-bit regardless of the operand size.
|
2014-02-02 17:25:09 +08:00
|
|
|
/// @param OpSize Indicates the operand size of the instruction.
|
|
|
|
/// If register size does not match OpSize, then
|
|
|
|
/// register sizes keep their size.
|
2009-12-19 10:59:52 +08:00
|
|
|
/// @return - The operand's type.
|
2014-02-02 17:25:09 +08:00
|
|
|
static OperandType typeFromString(const std::string& s,
|
2022-03-26 23:14:08 +08:00
|
|
|
bool hasREX_W, uint8_t OpSize);
|
2014-02-02 17:25:09 +08:00
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// immediateEncodingFromString - Translates an immediate encoding from the
|
|
|
|
/// string provided in the LLVM tables to an OperandEncoding for use in
|
|
|
|
/// the operand specifier.
|
|
|
|
///
|
2014-02-02 17:25:09 +08:00
|
|
|
/// @param s - See typeFromString().
|
|
|
|
/// @param OpSize - Indicates whether this is an OpSize16 instruction.
|
|
|
|
/// If it is not, then 16-bit immediate operands stay 16-bit.
|
|
|
|
/// @return - The operand's encoding.
|
2009-12-19 10:59:52 +08:00
|
|
|
static OperandEncoding immediateEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// rmRegisterEncodingFromString - Like immediateEncodingFromString, but
|
|
|
|
/// handles operands that are in the REG field of the ModR/M byte.
|
|
|
|
static OperandEncoding rmRegisterEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// rmRegisterEncodingFromString - Like immediateEncodingFromString, but
|
|
|
|
/// handles operands that are in the REG field of the ModR/M byte.
|
|
|
|
static OperandEncoding roRegisterEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
2009-12-19 10:59:52 +08:00
|
|
|
static OperandEncoding memoryEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
2009-12-19 10:59:52 +08:00
|
|
|
static OperandEncoding relocationEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
2009-12-19 10:59:52 +08:00
|
|
|
static OperandEncoding opcodeModifierEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
2011-03-15 09:23:15 +08:00
|
|
|
static OperandEncoding vvvvRegisterEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
2013-07-28 16:28:38 +08:00
|
|
|
static OperandEncoding writemaskRegisterEncodingFromString(const std::string &s,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize);
|
|
|
|
|
2018-05-01 23:54:18 +08:00
|
|
|
/// Adjust the encoding type for an operand based on the instruction.
|
2014-07-18 01:04:56 +08:00
|
|
|
void adjustOperandEncoding(OperandEncoding &encoding);
|
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// handleOperand - Converts a single operand from the LLVM table format to
|
|
|
|
/// the emitted table format, handling any duplicate operands it encounters
|
|
|
|
/// and then one non-duplicate.
|
|
|
|
///
|
|
|
|
/// @param optional - Determines whether to assert that the
|
|
|
|
/// operand exists.
|
|
|
|
/// @param operandIndex - The index into the generated operand table.
|
|
|
|
/// Incremented by this function one or more
|
2018-02-16 05:20:31 +08:00
|
|
|
/// times to reflect possible duplicate
|
2009-12-19 10:59:52 +08:00
|
|
|
/// operands).
|
|
|
|
/// @param physicalOperandIndex - The index of the current operand into the
|
|
|
|
/// set of non-duplicate ('physical') operands.
|
|
|
|
/// Incremented by this function once.
|
|
|
|
/// @param numPhysicalOperands - The number of non-duplicate operands in the
|
|
|
|
/// instructions.
|
|
|
|
/// @param operandMapping - The operand mapping, which has an entry for
|
|
|
|
/// each operand that indicates whether it is a
|
|
|
|
/// duplicate, and of what.
|
|
|
|
void handleOperand(bool optional,
|
|
|
|
unsigned &operandIndex,
|
|
|
|
unsigned &physicalOperandIndex,
|
2016-02-16 12:24:56 +08:00
|
|
|
unsigned numPhysicalOperands,
|
2012-07-12 14:52:41 +08:00
|
|
|
const unsigned *operandMapping,
|
2009-12-19 10:59:52 +08:00
|
|
|
OperandEncoding (*encodingFromString)
|
|
|
|
(const std::string&,
|
2014-02-02 17:25:09 +08:00
|
|
|
uint8_t OpSize));
|
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// emitInstructionSpecifier - Loads the instruction specifier for the current
|
|
|
|
/// instruction into a DisassemblerTables.
|
|
|
|
///
|
2014-01-02 11:58:45 +08:00
|
|
|
void emitInstructionSpecifier();
|
2018-02-16 05:20:31 +08:00
|
|
|
|
2009-12-19 10:59:52 +08:00
|
|
|
/// emitDecodePath - Populates the proper fields in the decode tables
|
|
|
|
/// corresponding to the decode paths for this instruction.
|
|
|
|
///
|
2012-09-13 20:34:29 +08:00
|
|
|
/// \param tables The DisassemblerTables to populate with the decode
|
2009-12-19 10:59:52 +08:00
|
|
|
/// decode information for the current instruction.
|
|
|
|
void emitDecodePath(DisassemblerTables &tables) const;
|
|
|
|
|
2022-03-18 16:41:10 +08:00
|
|
|
public:
|
2009-12-19 10:59:52 +08:00
|
|
|
/// Constructor - Initializes a RecognizableInstr with the appropriate fields
|
|
|
|
/// from a CodeGenInstruction.
|
|
|
|
///
|
2012-09-13 20:34:29 +08:00
|
|
|
/// \param tables The DisassemblerTables that the specifier will be added to.
|
|
|
|
/// \param insn The CodeGenInstruction to extract information from.
|
|
|
|
/// \param uid The unique ID of the current instruction.
|
2009-12-19 10:59:52 +08:00
|
|
|
RecognizableInstr(DisassemblerTables &tables,
|
|
|
|
const CodeGenInstruction &insn,
|
|
|
|
InstrUID uid);
|
|
|
|
/// processInstr - Accepts a CodeGenInstruction and loads decode information
|
|
|
|
/// for it into a DisassemblerTables if appropriate.
|
|
|
|
///
|
2012-09-13 20:34:29 +08:00
|
|
|
/// \param tables The DiassemblerTables to be populated with decode
|
2009-12-19 10:59:52 +08:00
|
|
|
/// information.
|
2012-09-13 20:34:29 +08:00
|
|
|
/// \param insn The CodeGenInstruction to be used as a source for this
|
2009-12-19 10:59:52 +08:00
|
|
|
/// information.
|
2012-09-13 20:34:29 +08:00
|
|
|
/// \param uid The unique ID of the instruction.
|
2009-12-19 10:59:52 +08:00
|
|
|
static void processInstr(DisassemblerTables &tables,
|
|
|
|
const CodeGenInstruction &insn,
|
|
|
|
InstrUID uid);
|
|
|
|
};
|
2018-02-16 05:20:31 +08:00
|
|
|
|
2022-03-25 20:54:19 +08:00
|
|
|
std::string getMnemonic(const CodeGenInstruction *I, unsigned Variant);
|
2022-03-27 08:41:17 +08:00
|
|
|
bool isRegisterOperand(const Record *Rec);
|
|
|
|
bool isMemoryOperand(const Record *Rec);
|
|
|
|
bool isImmediateOperand(const Record *Rec);
|
|
|
|
unsigned getRegOperandSize(const Record *RegRec);
|
|
|
|
unsigned getMemOperandSize(const Record *MemRec);
|
2009-12-19 10:59:52 +08:00
|
|
|
} // namespace X86Disassembler
|
|
|
|
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|