diff options
Diffstat (limited to 'compiler/utils')
| -rw-r--r-- | compiler/utils/dedupe_set_test.cc | 2 | ||||
| -rw-r--r-- | compiler/utils/label.h | 12 | ||||
| -rw-r--r-- | compiler/utils/managed_register.h | 12 | ||||
| -rw-r--r-- | compiler/utils/mips64/assembler_mips64.cc | 11 | ||||
| -rw-r--r-- | compiler/utils/mips64/assembler_mips64.h | 3 | ||||
| -rw-r--r-- | compiler/utils/swap_space.cc | 2 | ||||
| -rw-r--r-- | compiler/utils/type_reference.h | 51 |
7 files changed, 28 insertions, 65 deletions
diff --git a/compiler/utils/dedupe_set_test.cc b/compiler/utils/dedupe_set_test.cc index 4c0979e0b7..b390508ed4 100644 --- a/compiler/utils/dedupe_set_test.cc +++ b/compiler/utils/dedupe_set_test.cc @@ -23,7 +23,7 @@ #include "base/array_ref.h" #include "dedupe_set-inl.h" #include "gtest/gtest.h" -#include "thread-inl.h" +#include "thread-current-inl.h" namespace art { diff --git a/compiler/utils/label.h b/compiler/utils/label.h index 0f82ad5ff1..4c6ae8e218 100644 --- a/compiler/utils/label.h +++ b/compiler/utils/label.h @@ -29,24 +29,24 @@ class AssemblerFixup; namespace arm { class ArmAssembler; class Thumb2Assembler; -} +} // namespace arm namespace arm64 { class Arm64Assembler; -} +} // namespace arm64 namespace mips { class MipsAssembler; -} +} // namespace mips namespace mips64 { class Mips64Assembler; -} +} // namespace mips64 namespace x86 { class X86Assembler; class NearLabel; -} +} // namespace x86 namespace x86_64 { class X86_64Assembler; class NearLabel; -} +} // namespace x86_64 class ExternalLabel { public: diff --git a/compiler/utils/managed_register.h b/compiler/utils/managed_register.h index 184cdf5050..2b7b2aa7ce 100644 --- a/compiler/utils/managed_register.h +++ b/compiler/utils/managed_register.h @@ -26,24 +26,24 @@ namespace art { namespace arm { class ArmManagedRegister; -} +} // namespace arm namespace arm64 { class Arm64ManagedRegister; -} +} // namespace arm64 namespace mips { class MipsManagedRegister; -} +} // namespace mips namespace mips64 { class Mips64ManagedRegister; -} +} // namespace mips64 namespace x86 { class X86ManagedRegister; -} +} // namespace x86 namespace x86_64 { class X86_64ManagedRegister; -} +} // namespace x86_64 class ManagedRegister : public ValueObject { public: diff --git a/compiler/utils/mips64/assembler_mips64.cc b/compiler/utils/mips64/assembler_mips64.cc index c03b98c5c2..b8b800abe3 100644 --- a/compiler/utils/mips64/assembler_mips64.cc +++ b/compiler/utils/mips64/assembler_mips64.cc @@ -1795,6 +1795,17 @@ void Mips64Assembler::IlvrD(VectorRegister wd, VectorRegister ws, VectorRegister EmitMsa3R(0x5, 0x3, wt, ws, wd, 0x14); } +void Mips64Assembler::ReplicateFPToVectorRegister(VectorRegister dst, + FpuRegister src, + bool is_double) { + // Float or double in FPU register Fx can be considered as 0th element in vector register Wx. + if (is_double) { + SplatiD(dst, static_cast<VectorRegister>(src), 0); + } else { + SplatiW(dst, static_cast<VectorRegister>(src), 0); + } +} + void Mips64Assembler::LoadConst32(GpuRegister rd, int32_t value) { TemplateLoadConst32(this, rd, value); } diff --git a/compiler/utils/mips64/assembler_mips64.h b/compiler/utils/mips64/assembler_mips64.h index c92cf4c048..9b4064543f 100644 --- a/compiler/utils/mips64/assembler_mips64.h +++ b/compiler/utils/mips64/assembler_mips64.h @@ -774,6 +774,9 @@ class Mips64Assembler FINAL : public Assembler, public JNIMacroAssembler<Pointer void IlvrW(VectorRegister wd, VectorRegister ws, VectorRegister wt); void IlvrD(VectorRegister wd, VectorRegister ws, VectorRegister wt); + // Helper for replicating floating point value in all destination elements. + void ReplicateFPToVectorRegister(VectorRegister dst, FpuRegister src, bool is_double); + // Higher level composite instructions. int InstrCountForLoadReplicatedConst32(int64_t); void LoadConst32(GpuRegister rd, int32_t value); diff --git a/compiler/utils/swap_space.cc b/compiler/utils/swap_space.cc index a1eb08e041..4f6c915142 100644 --- a/compiler/utils/swap_space.cc +++ b/compiler/utils/swap_space.cc @@ -23,7 +23,7 @@ #include "base/logging.h" #include "base/macros.h" #include "base/mutex.h" -#include "thread-inl.h" +#include "thread-current-inl.h" namespace art { diff --git a/compiler/utils/type_reference.h b/compiler/utils/type_reference.h deleted file mode 100644 index a0fa1a4a63..0000000000 --- a/compiler/utils/type_reference.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2016 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ART_COMPILER_UTILS_TYPE_REFERENCE_H_ -#define ART_COMPILER_UTILS_TYPE_REFERENCE_H_ - -#include <stdint.h> - -#include "base/logging.h" -#include "dex_file_types.h" -#include "string_reference.h" - -namespace art { - -class DexFile; - -// A type is located by its DexFile and the string_ids_ table index into that DexFile. -struct TypeReference { - TypeReference(const DexFile* file, dex::TypeIndex index) : dex_file(file), type_index(index) { } - - const DexFile* dex_file; - dex::TypeIndex type_index; -}; - -// Compare the actual referenced type names. Used for type reference deduplication. -struct TypeReferenceValueComparator { - bool operator()(TypeReference tr1, TypeReference tr2) const { - // Note that we want to deduplicate identical boot image types even if they are - // referenced by different dex files, so we simply compare the descriptors. - StringReference sr1(tr1.dex_file, tr1.dex_file->GetTypeId(tr1.type_index).descriptor_idx_); - StringReference sr2(tr2.dex_file, tr2.dex_file->GetTypeId(tr2.type_index).descriptor_idx_); - return StringReferenceValueComparator()(sr1, sr2); - } -}; - -} // namespace art - -#endif // ART_COMPILER_UTILS_TYPE_REFERENCE_H_ |