Fix a bug in codegenprep where it was losing track of values OptimizeMemoryInst
[oota-llvm.git] / utils / TableGen / X86DisassemblerShared.h
index 9003cbfbdee94b9db3a5d9a3ee77ad36a049a3a0..3ff922b8225c91caac7096a50941b054afa8d229 100644 (file)
 #ifndef X86DISASSEMBLERSHARED_H
 #define X86DISASSEMBLERSHARED_H
 
+#include <string.h>
 #include <string>
 
-#define INSTRUCTION_SPECIFIER_FIELDS    \
-  bool                    filtered;     \
-  InstructionContext      insnContext;  \
-  std::string             name;         \
-                                        \
-  InstructionSpecifier() {              \
-    filtered = false;                   \
-    insnContext = IC;                   \
-    name = "";                          \
-    modifierType = MODIFIER_NONE;       \
-    modifierBase = 0;                   \
-    bzero(operands, sizeof(operands));  \
+#define INSTRUCTION_SPECIFIER_FIELDS       \
+  struct OperandSpecifier operands[X86_MAX_OPERANDS]; \
+  bool                    filtered;        \
+  InstructionContext      insnContext;     \
+  std::string             name;            \
+                                           \
+  InstructionSpecifier() {                 \
+    filtered = false;                      \
+    insnContext = IC;                      \
+    name = "";                             \
+    modifierType = MODIFIER_NONE;          \
+    modifierBase = 0;                      \
+    memset(operands, 0, sizeof(operands)); \
   }
 
 #define INSTRUCTION_IDS           \