diff options
author | Vladimir Marko <vmarko@google.com> | 2017-11-01 14:35:42 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2017-11-02 10:11:02 +0000 |
commit | 33bff25bcd7a02d35c54f63740eadb1a4833fc92 (patch) | |
tree | 553db4f60878acf2a0fa7036a739d406df9a29b7 /disassembler/disassembler.cc | |
parent | 321b3ca9a36d769283c64d4bdee0798db80af524 (diff) |
ART: Make InstructionSet an enum class and add kLast.
Adding InstructionSet::kLast shall make it easier to encode
the InstructionSet in fewer bits using BitField<>. However,
introducing `kLast` into the `art` namespace is not a good
idea, so we change the InstructionSet to an enum class.
This also uncovered a case of InstructionSet::kNone being
erroneously used instead of vixl32::Condition::None(), so
it's good to remove `kNone` from the `art` namespace.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I6fa6168dfba4ed6da86d021a69c80224f09997a6
Diffstat (limited to 'disassembler/disassembler.cc')
-rw-r--r-- | disassembler/disassembler.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/disassembler/disassembler.cc b/disassembler/disassembler.cc index 5af51c1355..2ed41c860a 100644 --- a/disassembler/disassembler.cc +++ b/disassembler/disassembler.cc @@ -36,17 +36,17 @@ Disassembler::Disassembler(DisassemblerOptions* disassembler_options) } Disassembler* Disassembler::Create(InstructionSet instruction_set, DisassemblerOptions* options) { - if (instruction_set == kArm || instruction_set == kThumb2) { + if (instruction_set == InstructionSet::kArm || instruction_set == InstructionSet::kThumb2) { return new arm::DisassemblerArm(options); - } else if (instruction_set == kArm64) { + } else if (instruction_set == InstructionSet::kArm64) { return new arm64::DisassemblerArm64(options); - } else if (instruction_set == kMips) { + } else if (instruction_set == InstructionSet::kMips) { return new mips::DisassemblerMips(options, /* is_o32_abi */ true); - } else if (instruction_set == kMips64) { + } else if (instruction_set == InstructionSet::kMips64) { return new mips::DisassemblerMips(options, /* is_o32_abi */ false); - } else if (instruction_set == kX86) { + } else if (instruction_set == InstructionSet::kX86) { return new x86::DisassemblerX86(options, false); - } else if (instruction_set == kX86_64) { + } else if (instruction_set == InstructionSet::kX86_64) { return new x86::DisassemblerX86(options, true); } else { UNIMPLEMENTED(FATAL) << static_cast<uint32_t>(instruction_set); |