summaryrefslogtreecommitdiff
path: root/compiler/jni/quick/jni_compiler.cc
diff options
context:
space:
mode:
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
commit33bff25bcd7a02d35c54f63740eadb1a4833fc92 (patch)
tree553db4f60878acf2a0fa7036a739d406df9a29b7 /compiler/jni/quick/jni_compiler.cc
parent321b3ca9a36d769283c64d4bdee0798db80af524 (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 'compiler/jni/quick/jni_compiler.cc')
-rw-r--r--compiler/jni/quick/jni_compiler.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
index e32b681c5b..b3177aa471 100644
--- a/compiler/jni/quick/jni_compiler.cc
+++ b/compiler/jni/quick/jni_compiler.cc
@@ -323,7 +323,7 @@ static CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver* driver,
// Note that we always have outgoing param space available for at least two params.
if (kUseReadBarrier && is_static && !is_critical_native) {
const bool kReadBarrierFastPath =
- (instruction_set != kMips) && (instruction_set != kMips64);
+ (instruction_set != InstructionSet::kMips) && (instruction_set != InstructionSet::kMips64);
std::unique_ptr<JNIMacroLabel> skip_cold_path_label;
if (kReadBarrierFastPath) {
skip_cold_path_label = __ CreateLabel();
@@ -531,7 +531,8 @@ static CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver* driver,
if (LIKELY(!is_critical_native)) {
// For normal JNI, store the return value on the stack because the call to
// JniMethodEnd will clobber the return value. It will be restored in (13).
- if ((instruction_set == kMips || instruction_set == kMips64) &&
+ if ((instruction_set == InstructionSet::kMips ||
+ instruction_set == InstructionSet::kMips64) &&
main_jni_conv->GetReturnType() == Primitive::kPrimDouble &&
return_save_location.Uint32Value() % 8 != 0) {
// Ensure doubles are 8-byte aligned for MIPS