Sean Callanan | 04cc307 | 2009-12-19 02:59:52 +0000 | [diff] [blame] | 1 | //===- 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 Lopes | 91b866a | 2009-12-19 11:52:18 +0000 | [diff] [blame] | 13 | #include <string.h> |
Chandler Carruth | 91d19d8 | 2012-12-04 10:37:14 +0000 | [diff] [blame] | 14 | #include <string> |
Sean Callanan | 04cc307 | 2009-12-19 02:59:52 +0000 | [diff] [blame] | 15 | |
Sean Callanan | 04cc307 | 2009-12-19 02:59:52 +0000 | [diff] [blame] | 16 | #define INSTRUCTION_IDS \ |
| 17 | InstrUID instructionIDs[256]; |
| 18 | |
| 19 | #include "../../lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h" |
| 20 | |
| 21 | #undef INSTRUCTION_SPECIFIER_FIELDS |
| 22 | #undef INSTRUCTION_IDS |
| 23 | |
Richard Smith | 82b47d5 | 2014-04-20 21:35:26 +0000 | [diff] [blame^] | 24 | struct InstructionSpecifier { |
| 25 | llvm::X86Disassembler::OperandSpecifier operands[X86_MAX_OPERANDS]; |
| 26 | llvm::X86Disassembler::InstructionContext insnContext; |
| 27 | std::string name; |
| 28 | |
| 29 | InstructionSpecifier() { |
| 30 | insnContext = llvm::X86Disassembler::IC; |
| 31 | name = ""; |
| 32 | memset(operands, 0, sizeof(operands)); |
| 33 | } |
| 34 | }; |
| 35 | |
Sean Callanan | 04cc307 | 2009-12-19 02:59:52 +0000 | [diff] [blame] | 36 | #endif |