MCInstrDesc.h
Go to the documentation of this file.
1 //===-- llvm/MC/MCInstrDesc.h - Instruction Descriptors -*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the MCOperandInfo and MCInstrDesc classes, which
11 // are used to describe target instructions and their operands.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 /* Capstone Disassembly Engine */
16 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2015 */
17 
18 #ifndef CS_LLVM_MC_MCINSTRDESC_H
19 #define CS_LLVM_MC_MCINSTRDESC_H
20 
21 #include "capstone/platform.h"
22 
23 //===----------------------------------------------------------------------===//
24 // Machine Operand Flags and Description
25 //===----------------------------------------------------------------------===//
26 
27 // Operand constraints
29  MCOI_TIED_TO = 0, // Must be allocated the same register as.
30  MCOI_EARLY_CLOBBER // Operand is an early clobber register operand
31 };
32 
40 };
41 
49 };
50 
51 
55 typedef struct MCOperandInfo {
61 
64 
67 
73 
74 
75 //===----------------------------------------------------------------------===//
76 // Machine Instruction Flags and Description
77 //===----------------------------------------------------------------------===//
78 
83 enum {
115 };
116 
122 typedef struct MCInstrDesc {
123  unsigned short Opcode; // The opcode number
124  unsigned char NumOperands; // Num of args (may be more if variable_ops)
125  unsigned char NumDefs; // Num of args that are definitions
126  unsigned short SchedClass; // enum identifying instr sched class
127  unsigned char Size; // Number of bytes in encoding.
128  unsigned Flags; // Flags identifying machine instr class
129  uint64_t TSFlags; // Target Specific Flag values
130  char ImplicitUses; // Registers implicitly read by this instr
131  char ImplicitDefs; // Registers implicitly defined by this instr
132  const MCOperandInfo *OpInfo; // 'NumOperands' entries about operands
133  uint64_t DeprecatedFeatureMask;// Feature bits that this is deprecated on, if any
134  // A complex method to determine is a certain is deprecated or not, and return
135  // the reason for deprecation.
136  //bool (*ComplexDeprecationInfo)(MCInst &, MCSubtargetInfo &, std::string &);
137  unsigned char ComplexDeprecationInfo; // dummy field, just to satisfy initializer
138 } MCInstrDesc;
139 
141 
143 
144 #endif
MCInstrDesc
Definition: MCInstrDesc.h:122
MCID_ConvertibleTo3Addr
@ MCID_ConvertibleTo3Addr
Definition: MCInstrDesc.h:105
MCID_HasPostISelHook
@ MCID_HasPostISelHook
Definition: MCInstrDesc.h:107
MCID_Commutable
@ MCID_Commutable
Definition: MCInstrDesc.h:104
MCID_Return
@ MCID_Return
Definition: MCInstrDesc.h:87
MCInstrDesc::TSFlags
uint64_t TSFlags
Definition: MCInstrDesc.h:129
MCID_HasOptionalDef
@ MCID_HasOptionalDef
Definition: MCInstrDesc.h:85
MCOperandInfo_isPredicate
bool MCOperandInfo_isPredicate(const MCOperandInfo *m)
Definition: MCInstrDesc.c:8
MCInstrDesc::NumDefs
unsigned char NumDefs
Definition: MCInstrDesc.h:125
MCID_MayLoad
@ MCID_MayLoad
Definition: MCInstrDesc.h:99
MCID_MayStore
@ MCID_MayStore
Definition: MCInstrDesc.h:100
MCInstrDesc::ImplicitDefs
char ImplicitDefs
Definition: MCInstrDesc.h:131
MCOI_OperandFlags
MCOI_OperandFlags
Definition: MCInstrDesc.h:36
MCID_Select
@ MCID_Select
Definition: MCInstrDesc.h:96
MCInstrDesc::OpInfo
const MCOperandInfo * OpInfo
Definition: MCInstrDesc.h:132
MCOperandInfo
Definition: MCInstrDesc.h:55
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
MCID_Branch
@ MCID_Branch
Definition: MCInstrDesc.h:91
MCID_Pseudo
@ MCID_Pseudo
Definition: MCInstrDesc.h:86
MCID_InsertSubreg
@ MCID_InsertSubreg
Definition: MCInstrDesc.h:114
MCOI_OPERAND_PCREL
@ MCOI_OPERAND_PCREL
Definition: MCInstrDesc.h:48
MCID_DelaySlot
@ MCID_DelaySlot
Definition: MCInstrDesc.h:97
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
MCOperandInfo
struct MCOperandInfo MCOperandInfo
MCOI_OperandConstraint
MCOI_OperandConstraint
Definition: MCInstrDesc.h:28
MCID_IndirectBranch
@ MCID_IndirectBranch
Definition: MCInstrDesc.h:92
int16_t
signed short int16_t
Definition: stdint-msvc2008.h:76
MCInstrDesc::ImplicitUses
char ImplicitUses
Definition: MCInstrDesc.h:130
MCID_Variadic
@ MCID_Variadic
Definition: MCInstrDesc.h:84
MCOperandInfo::Flags
uint8_t Flags
Flags - These are flags from the MCOI::OperandFlags enum.
Definition: MCInstrDesc.h:63
MCOI_TIED_TO
@ MCOI_TIED_TO
Definition: MCInstrDesc.h:29
MCID_CheapAsAMove
@ MCID_CheapAsAMove
Definition: MCInstrDesc.h:109
MCOperandInfo::OperandType
uint8_t OperandType
OperandType - Information about the type of the operand.
Definition: MCInstrDesc.h:66
MCInstrDesc
struct MCInstrDesc MCInstrDesc
MCID_NotDuplicable
@ MCID_NotDuplicable
Definition: MCInstrDesc.h:102
platform.h
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
MCInstrDesc::ComplexDeprecationInfo
unsigned char ComplexDeprecationInfo
Definition: MCInstrDesc.h:137
MCInstrDesc::NumOperands
unsigned char NumOperands
Definition: MCInstrDesc.h:124
MCOperandInfo::RegClass
int16_t RegClass
Definition: MCInstrDesc.h:60
MCInstrDesc::Size
unsigned char Size
Definition: MCInstrDesc.h:127
MCID_ExtractSubreg
@ MCID_ExtractSubreg
Definition: MCInstrDesc.h:113
MCOI_EARLY_CLOBBER
@ MCOI_EARLY_CLOBBER
Definition: MCInstrDesc.h:30
MCID_ExtraDefRegAllocReq
@ MCID_ExtraDefRegAllocReq
Definition: MCInstrDesc.h:111
MCID_Compare
@ MCID_Compare
Definition: MCInstrDesc.h:93
MCInstrDesc::DeprecatedFeatureMask
uint64_t DeprecatedFeatureMask
Definition: MCInstrDesc.h:133
MCID_Bitcast
@ MCID_Bitcast
Definition: MCInstrDesc.h:95
MCOperandInfo_isOptionalDef
bool MCOperandInfo_isOptionalDef(const MCOperandInfo *m)
Definition: MCInstrDesc.c:15
MCOI_OPERAND_IMMEDIATE
@ MCOI_OPERAND_IMMEDIATE
Definition: MCInstrDesc.h:45
MCID_Rematerializable
@ MCID_Rematerializable
Definition: MCInstrDesc.h:108
MCInstrDesc::Opcode
unsigned short Opcode
Definition: MCInstrDesc.h:123
MCInstrDesc::SchedClass
unsigned short SchedClass
Definition: MCInstrDesc.h:126
MCID_MoveImm
@ MCID_MoveImm
Definition: MCInstrDesc.h:94
MCOperandInfo::Constraints
uint32_t Constraints
Definition: MCInstrDesc.h:70
MCID_UnmodeledSideEffects
@ MCID_UnmodeledSideEffects
Definition: MCInstrDesc.h:103
MCInstrDesc::Flags
unsigned Flags
Definition: MCInstrDesc.h:128
MCID_Call
@ MCID_Call
Definition: MCInstrDesc.h:88
MCOI_OPERAND_MEMORY
@ MCOI_OPERAND_MEMORY
Definition: MCInstrDesc.h:47
MCID_RegSequence
@ MCID_RegSequence
Definition: MCInstrDesc.h:112
MCOI_OPERAND_REGISTER
@ MCOI_OPERAND_REGISTER
Definition: MCInstrDesc.h:46
MCID_Terminator
@ MCID_Terminator
Definition: MCInstrDesc.h:90
MCID_UsesCustomInserter
@ MCID_UsesCustomInserter
Definition: MCInstrDesc.h:106
MCID_Barrier
@ MCID_Barrier
Definition: MCInstrDesc.h:89
MCID_Predicable
@ MCID_Predicable
Definition: MCInstrDesc.h:101
MCOI_OPERAND_UNKNOWN
@ MCOI_OPERAND_UNKNOWN
Definition: MCInstrDesc.h:44
regress.m
m
Definition: regress/regress.py:25
MCOI_OperandType
MCOI_OperandType
Operand Type - Operands are tagged with one of the values of this enum.
Definition: MCInstrDesc.h:43
MCID_FoldableAsLoad
@ MCID_FoldableAsLoad
Definition: MCInstrDesc.h:98
MCID_ExtraSrcRegAllocReq
@ MCID_ExtraSrcRegAllocReq
Definition: MCInstrDesc.h:110
MCOI_Predicate
@ MCOI_Predicate
Definition: MCInstrDesc.h:38
MCOI_OptionalDef
@ MCOI_OptionalDef
Definition: MCInstrDesc.h:39
MCOI_LookupPtrRegClass
@ MCOI_LookupPtrRegClass
Definition: MCInstrDesc.h:37


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:35