Index: src/ia32/disasm-ia32.cc |
diff --git a/src/ia32/disasm-ia32.cc b/src/ia32/disasm-ia32.cc |
index 7a59a4f62ac85cb88e16c5e4ca1c52d27f827f2b..900668fbdcedd2943044a950e512dfaf8d5fd312 100644 |
--- a/src/ia32/disasm-ia32.cc |
+++ b/src/ia32/disasm-ia32.cc |
@@ -54,7 +54,7 @@ struct ByteMnemonic { |
}; |
-static ByteMnemonic two_operands_instr[] = { |
+static const ByteMnemonic two_operands_instr[] = { |
{0x03, "add", REG_OPER_OP_ORDER}, |
{0x09, "or", OPER_REG_OP_ORDER}, |
{0x0B, "or", REG_OPER_OP_ORDER}, |
@@ -79,7 +79,7 @@ static ByteMnemonic two_operands_instr[] = { |
}; |
-static ByteMnemonic zero_operands_instr[] = { |
+static const ByteMnemonic zero_operands_instr[] = { |
{0xC3, "ret", UNSET_OP_ORDER}, |
{0xC9, "leave", UNSET_OP_ORDER}, |
{0x90, "nop", UNSET_OP_ORDER}, |
@@ -98,14 +98,14 @@ static ByteMnemonic zero_operands_instr[] = { |
}; |
-static ByteMnemonic call_jump_instr[] = { |
+static const ByteMnemonic call_jump_instr[] = { |
{0xE8, "call", UNSET_OP_ORDER}, |
{0xE9, "jmp", UNSET_OP_ORDER}, |
{-1, "", UNSET_OP_ORDER} |
}; |
-static ByteMnemonic short_immediate_instr[] = { |
+static const ByteMnemonic short_immediate_instr[] = { |
{0x05, "add", UNSET_OP_ORDER}, |
{0x0D, "or", UNSET_OP_ORDER}, |
{0x15, "adc", UNSET_OP_ORDER}, |
@@ -117,7 +117,7 @@ static ByteMnemonic short_immediate_instr[] = { |
}; |
-static const char* jump_conditional_mnem[] = { |
+static const char* const jump_conditional_mnem[] = { |
/*0*/ "jo", "jno", "jc", "jnc", |
/*4*/ "jz", "jnz", "jna", "ja", |
/*8*/ "js", "jns", "jpe", "jpo", |
@@ -125,7 +125,7 @@ static const char* jump_conditional_mnem[] = { |
}; |
-static const char* set_conditional_mnem[] = { |
+static const char* const set_conditional_mnem[] = { |
/*0*/ "seto", "setno", "setc", "setnc", |
/*4*/ "setz", "setnz", "setna", "seta", |
/*8*/ "sets", "setns", "setpe", "setpo", |
@@ -133,7 +133,7 @@ static const char* set_conditional_mnem[] = { |
}; |
-static const char* conditional_move_mnem[] = { |
+static const char* const conditional_move_mnem[] = { |
/*0*/ "cmovo", "cmovno", "cmovc", "cmovnc", |
/*4*/ "cmovz", "cmovnz", "cmovna", "cmova", |
/*8*/ "cmovs", "cmovns", "cmovpe", "cmovpo", |
@@ -169,7 +169,7 @@ class InstructionTable { |
InstructionDesc instructions_[256]; |
void Clear(); |
void Init(); |
- void CopyTable(ByteMnemonic bm[], InstructionType type); |
+ void CopyTable(const ByteMnemonic bm[], InstructionType type); |
void SetTableRange(InstructionType type, |
byte start, |
byte end, |
@@ -208,7 +208,8 @@ void InstructionTable::Init() { |
} |
-void InstructionTable::CopyTable(ByteMnemonic bm[], InstructionType type) { |
+void InstructionTable::CopyTable(const ByteMnemonic bm[], |
+ InstructionType type) { |
for (int i = 0; bm[i].b >= 0; i++) { |
InstructionDesc* id = &instructions_[bm[i].b]; |
id->mnem = bm[i].mnem; |