From 33bff25bcd7a02d35c54f63740eadb1a4833fc92 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 1 Nov 2017 14:35:42 +0000 Subject: 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 --- disassembler/disassembler.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'disassembler/disassembler.cc') 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(instruction_set); -- cgit v1.2.3-59-g8ed1b