X86DisassemblerShared.h revision 249423
11539Srgrimes//===- X86DisassemblerShared.h - Emitter shared header ----------*- C++ -*-===// 21539Srgrimes// 31539Srgrimes// The LLVM Compiler Infrastructure 41539Srgrimes// 51539Srgrimes// This file is distributed under the University of Illinois Open Source 61539Srgrimes// License. See LICENSE.TXT for details. 71539Srgrimes// 81539Srgrimes//===----------------------------------------------------------------------===// 91539Srgrimes 101539Srgrimes#ifndef X86DISASSEMBLERSHARED_H 111539Srgrimes#define X86DISASSEMBLERSHARED_H 121539Srgrimes 131539Srgrimes#include <string.h> 141539Srgrimes#include <string> 151539Srgrimes 161539Srgrimes#define INSTRUCTION_SPECIFIER_FIELDS \ 171539Srgrimes struct OperandSpecifier operands[X86_MAX_OPERANDS]; \ 181539Srgrimes bool filtered; \ 191539Srgrimes InstructionContext insnContext; \ 201539Srgrimes std::string name; \ 211539Srgrimes \ 221539Srgrimes InstructionSpecifier() { \ 231539Srgrimes filtered = false; \ 241539Srgrimes insnContext = IC; \ 251539Srgrimes name = ""; \ 261539Srgrimes modifierType = MODIFIER_NONE; \ 271539Srgrimes modifierBase = 0; \ 281539Srgrimes memset(operands, 0, sizeof(operands)); \ 291539Srgrimes } 301539Srgrimes 311539Srgrimes#define INSTRUCTION_IDS \ 321539Srgrimes InstrUID instructionIDs[256]; 331539Srgrimes 3483047Sobrien#include "../../lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h" 351539Srgrimes 361539Srgrimes#undef INSTRUCTION_SPECIFIER_FIELDS 372163Spaul#undef INSTRUCTION_IDS 382163Spaul 391539Srgrimes#endif 401539Srgrimes