blob: 036e92430b0cca576beab50ed66efe7ff40c7e0b [file] [log] [blame]
Sean Callanan04cc3072009-12-19 02:59:52 +00001//===- X86DisassemblerShared.h - Emitter shared header ----------*- 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#ifndef X86DISASSEMBLERSHARED_H
11#define X86DISASSEMBLERSHARED_H
12
Nuno Lopes91b866a2009-12-19 11:52:18 +000013#include <string.h>
Chandler Carruth91d19d82012-12-04 10:37:14 +000014#include <string>
Sean Callanan04cc3072009-12-19 02:59:52 +000015
Daniel Dunbar3a821f72009-12-19 04:16:57 +000016#define INSTRUCTION_SPECIFIER_FIELDS \
Craig Topperb8aec082012-08-01 07:39:18 +000017 struct OperandSpecifier operands[X86_MAX_OPERANDS]; \
Daniel Dunbar3a821f72009-12-19 04:16:57 +000018 InstructionContext insnContext; \
19 std::string name; \
20 \
21 InstructionSpecifier() { \
Daniel Dunbar3a821f72009-12-19 04:16:57 +000022 insnContext = IC; \
23 name = ""; \
Daniel Dunbar3a821f72009-12-19 04:16:57 +000024 memset(operands, 0, sizeof(operands)); \
Sean Callanan04cc3072009-12-19 02:59:52 +000025 }
26
27#define INSTRUCTION_IDS \
28 InstrUID instructionIDs[256];
29
30#include "../../lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h"
31
32#undef INSTRUCTION_SPECIFIER_FIELDS
33#undef INSTRUCTION_IDS
34
35#endif