aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/X86DisassemblerShared.h
blob: 036e92430b0cca576beab50ed66efe7ff40c7e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//===- X86DisassemblerShared.h - Emitter shared header ----------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef X86DISASSEMBLERSHARED_H
#define X86DISASSEMBLERSHARED_H

#include <string.h>
#include <string>

#define INSTRUCTION_SPECIFIER_FIELDS       \
  struct OperandSpecifier operands[X86_MAX_OPERANDS]; \
  InstructionContext      insnContext;     \
  std::string             name;            \
                                           \
  InstructionSpecifier() {                 \
    insnContext = IC;                      \
    name = "";                             \
    memset(operands, 0, sizeof(operands)); \
  }

#define INSTRUCTION_IDS           \
  InstrUID   instructionIDs[256];

#include "../../lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h"

#undef INSTRUCTION_SPECIFIER_FIELDS
#undef INSTRUCTION_IDS

#endif