summaryrefslogtreecommitdiff
path: root/runtime/mirror/dex_cache-inl.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-07-04 11:56:08 +0100
committer Vladimir Marko <vmarko@google.com> 2018-07-19 13:42:20 +0100
commitca8de0a70eab62707f3c71a211093f340fdcd5f4 (patch)
treea391c1307e87edad399418236a2a1842a8f06f34 /runtime/mirror/dex_cache-inl.h
parent7f7f9d3991f3a55da8934a3b72890d4776373598 (diff)
Move .art.rel data to a section in .art, part 1.
Refactor the code so that we can collect all relocation offsets while writing the image. Test: Manually verify that the aosp_taimen-userdebug boot image is identical before and after this change; using WIP follow-up code, check that we record the same locations as the patchoat-generated .rel files. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 77856493 Change-Id: Id8c78e417e77e859a82a680504253f41e84560d6
Diffstat (limited to 'runtime/mirror/dex_cache-inl.h')
-rw-r--r--runtime/mirror/dex_cache-inl.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
index faec6e6bf8..bbe15ac1bb 100644
--- a/runtime/mirror/dex_cache-inl.h
+++ b/runtime/mirror/dex_cache-inl.h
@@ -257,7 +257,7 @@ NativeDexCachePair<T> DexCache::GetNativePairPtrSize(std::atomic<NativeDexCacheP
} else {
auto* array = reinterpret_cast<std::atomic<ConversionPair32>*>(pair_array);
ConversionPair32 value = array[idx].load(std::memory_order_relaxed);
- return NativeDexCachePair<T>(reinterpret_cast<T*>(value.first), value.second);
+ return NativeDexCachePair<T>(reinterpret_cast32<T*>(value.first), value.second);
}
}
@@ -272,9 +272,8 @@ void DexCache::SetNativePairPtrSize(std::atomic<NativeDexCachePair<T>>* pair_arr
AtomicStoreRelease16B(&array[idx], v);
} else {
auto* array = reinterpret_cast<std::atomic<ConversionPair32>*>(pair_array);
- ConversionPair32 v(
- dchecked_integral_cast<uint32_t>(reinterpret_cast<uintptr_t>(pair.object)),
- dchecked_integral_cast<uint32_t>(pair.index));
+ ConversionPair32 v(reinterpret_cast32<uint32_t>(pair.object),
+ dchecked_integral_cast<uint32_t>(pair.index));
array[idx].store(v, std::memory_order_release);
}
}