summaryrefslogtreecommitdiff
path: root/utils/TableGen/X86DisassemblerShared.h
blob: 6bcb78307a2cee2ee73dd81d826890fc4d250a57 (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
36
37
//===- 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]; \
  bool                    filtered;        \
  InstructionContext      insnContext;     \
  std::string             name;            \
                                           \
  InstructionSpecifier() {                 \
    filtered = false;                      \
    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