[llvm] r206719 - Don't define llvm::X86Disassembler::InstructionSpecifier in different ways in
Richard Smith
richard-llvm at metafoo.co.uk
Sun Apr 20 14:35:27 PDT 2014
Author: rsmith
Date: Sun Apr 20 16:35:26 2014
New Revision: 206719
URL: http://llvm.org/viewvc/llvm-project?rev=206719&view=rev
Log:
Don't define llvm::X86Disassembler::InstructionSpecifier in different ways in
different source files.
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
llvm/trunk/utils/TableGen/X86DisassemblerShared.h
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h?rev=206719&r1=206718&r2=206719&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h Sun Apr 20 16:35:26 2014
@@ -16,9 +16,6 @@
#ifndef X86DISASSEMBLERDECODER_H
#define X86DISASSEMBLERDECODER_H
-#define INSTRUCTION_SPECIFIER_FIELDS \
- uint16_t operands;
-
#define INSTRUCTION_IDS \
uint16_t instructionIDs;
@@ -532,6 +529,14 @@ typedef int (*byteReader_t)(const void*
typedef void (*dlog_t)(void* arg, const char *log);
/*
+ * The specification for how to extract and interpret a full instruction and
+ * its operands.
+ */
+struct InstructionSpecifier {
+ uint16_t operands;
+};
+
+/*
* The x86 internal instruction, which is produced by the decoder.
*/
struct InternalInstruction {
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h?rev=206719&r1=206718&r2=206719&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h Sun Apr 20 16:35:26 2014
@@ -539,15 +539,6 @@ enum ModifierType {
#define X86_MAX_OPERANDS 5
/*
- * The specification for how to extract and interpret a full instruction and
- * its operands.
- */
-struct InstructionSpecifier {
- /* The macro below must be defined wherever this file is included. */
- INSTRUCTION_SPECIFIER_FIELDS
-};
-
-/*
* Decoding mode for the Intel disassembler. 16-bit, 32-bit, and 64-bit mode
* are supported, and represent real mode, IA-32e, and IA-32e in 64-bit mode,
* respectively.
Modified: llvm/trunk/utils/TableGen/X86DisassemblerShared.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerShared.h?rev=206719&r1=206718&r2=206719&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86DisassemblerShared.h (original)
+++ llvm/trunk/utils/TableGen/X86DisassemblerShared.h Sun Apr 20 16:35:26 2014
@@ -13,17 +13,6 @@
#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];
@@ -32,4 +21,16 @@
#undef INSTRUCTION_SPECIFIER_FIELDS
#undef INSTRUCTION_IDS
+struct InstructionSpecifier {
+ llvm::X86Disassembler::OperandSpecifier operands[X86_MAX_OPERANDS];
+ llvm::X86Disassembler::InstructionContext insnContext;
+ std::string name;
+
+ InstructionSpecifier() {
+ insnContext = llvm::X86Disassembler::IC;
+ name = "";
+ memset(operands, 0, sizeof(operands));
+ }
+};
+
#endif
More information about the llvm-commits
mailing list