diff options
| author | 2017-05-17 09:16:30 +0000 | |
|---|---|---|
| committer | 2017-05-17 09:16:31 +0000 | |
| commit | d1c22768e77d2c9c06d7dfa36bde24bf5b6ac8a0 (patch) | |
| tree | d5f7c10205caa55ba75da223f6f7d012a8787130 /compiler/compiled_method_test.cc | |
| parent | 8e0a5dee37e848ae9bc7ff11c8a0eb66048a5e9e (diff) | |
| parent | 764d454d1d51448deb81f6e8d2d7d317c7f4d1b4 (diff) | |
Merge "Remove LoadString/Class kind kBootImageLinkTimeAddress."
Diffstat (limited to 'compiler/compiled_method_test.cc')
| -rw-r--r-- | compiler/compiled_method_test.cc | 86 |
1 files changed, 76 insertions, 10 deletions
diff --git a/compiler/compiled_method_test.cc b/compiler/compiled_method_test.cc index 99ee875da2..81a2cde794 100644 --- a/compiler/compiled_method_test.cc +++ b/compiler/compiled_method_test.cc @@ -62,10 +62,38 @@ TEST(CompiledMethod, LinkerPatchOperators) { LinkerPatch::RelativeCodePatch(16u, dex_file1, 1001u), LinkerPatch::RelativeCodePatch(16u, dex_file2, 1000u), LinkerPatch::RelativeCodePatch(16u, dex_file2, 1001u), - LinkerPatch::TypePatch(16u, dex_file1, 1000u), - LinkerPatch::TypePatch(16u, dex_file1, 1001u), - LinkerPatch::TypePatch(16u, dex_file2, 1000u), - LinkerPatch::TypePatch(16u, dex_file2, 1001u), + LinkerPatch::RelativeTypePatch(16u, dex_file1, 3000u, 1000u), + LinkerPatch::RelativeTypePatch(16u, dex_file1, 3001u, 1000u), + LinkerPatch::RelativeTypePatch(16u, dex_file1, 3000u, 1001u), + LinkerPatch::RelativeTypePatch(16u, dex_file1, 3001u, 1001u), + LinkerPatch::RelativeTypePatch(16u, dex_file2, 3000u, 1000u), + LinkerPatch::RelativeTypePatch(16u, dex_file2, 3001u, 1000u), + LinkerPatch::RelativeTypePatch(16u, dex_file2, 3000u, 1001u), + LinkerPatch::RelativeTypePatch(16u, dex_file2, 3001u, 1001u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file1, 3000u, 1000u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file1, 3001u, 1000u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file1, 3000u, 1001u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file1, 3001u, 1001u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file2, 3000u, 1000u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file2, 3001u, 1000u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file2, 3000u, 1001u), + LinkerPatch::TypeBssEntryPatch(16u, dex_file2, 3001u, 1001u), + LinkerPatch::RelativeStringPatch(16u, dex_file1, 3000u, 1000u), + LinkerPatch::RelativeStringPatch(16u, dex_file1, 3001u, 1000u), + LinkerPatch::RelativeStringPatch(16u, dex_file1, 3000u, 1001u), + LinkerPatch::RelativeStringPatch(16u, dex_file1, 3001u, 1001u), + LinkerPatch::RelativeStringPatch(16u, dex_file2, 3000u, 1000u), + LinkerPatch::RelativeStringPatch(16u, dex_file2, 3001u, 1000u), + LinkerPatch::RelativeStringPatch(16u, dex_file2, 3000u, 1001u), + LinkerPatch::RelativeStringPatch(16u, dex_file2, 3001u, 1001u), + LinkerPatch::StringBssEntryPatch(16u, dex_file1, 3000u, 1000u), + LinkerPatch::StringBssEntryPatch(16u, dex_file1, 3001u, 1000u), + LinkerPatch::StringBssEntryPatch(16u, dex_file1, 3000u, 1001u), + LinkerPatch::StringBssEntryPatch(16u, dex_file1, 3001u, 1001u), + LinkerPatch::StringBssEntryPatch(16u, dex_file2, 3000u, 1000u), + LinkerPatch::StringBssEntryPatch(16u, dex_file2, 3001u, 1000u), + LinkerPatch::StringBssEntryPatch(16u, dex_file2, 3000u, 1001u), + LinkerPatch::StringBssEntryPatch(16u, dex_file2, 3001u, 1001u), LinkerPatch::DexCacheArrayPatch(16u, dex_file1, 3000u, 2000u), LinkerPatch::DexCacheArrayPatch(16u, dex_file1, 3001u, 2000u), LinkerPatch::DexCacheArrayPatch(16u, dex_file1, 3000u, 2001u), @@ -74,10 +102,15 @@ TEST(CompiledMethod, LinkerPatchOperators) { LinkerPatch::DexCacheArrayPatch(16u, dex_file2, 3001u, 2000u), LinkerPatch::DexCacheArrayPatch(16u, dex_file2, 3000u, 2001u), LinkerPatch::DexCacheArrayPatch(16u, dex_file2, 3001u, 2001u), + LinkerPatch::BakerReadBarrierBranchPatch(16u, 0u, 0u), + LinkerPatch::BakerReadBarrierBranchPatch(16u, 0u, 1u), + LinkerPatch::BakerReadBarrierBranchPatch(16u, 1u, 0u), + LinkerPatch::BakerReadBarrierBranchPatch(16u, 1u, 1u), + LinkerPatch::MethodPatch(32u, dex_file1, 1000u), LinkerPatch::MethodPatch(32u, dex_file1, 1001u), LinkerPatch::MethodPatch(32u, dex_file2, 1000u), - LinkerPatch::MethodPatch(32u, dex_file2, 1001u), + LinkerPatch::MethodPatch(32u, dex_file2, 1001u), // Index 3. LinkerPatch::CodePatch(32u, dex_file1, 1000u), LinkerPatch::CodePatch(32u, dex_file1, 1001u), LinkerPatch::CodePatch(32u, dex_file2, 1000u), @@ -86,10 +119,38 @@ TEST(CompiledMethod, LinkerPatchOperators) { LinkerPatch::RelativeCodePatch(32u, dex_file1, 1001u), LinkerPatch::RelativeCodePatch(32u, dex_file2, 1000u), LinkerPatch::RelativeCodePatch(32u, dex_file2, 1001u), - LinkerPatch::TypePatch(32u, dex_file1, 1000u), - LinkerPatch::TypePatch(32u, dex_file1, 1001u), - LinkerPatch::TypePatch(32u, dex_file2, 1000u), - LinkerPatch::TypePatch(32u, dex_file2, 1001u), + LinkerPatch::RelativeTypePatch(32u, dex_file1, 3000u, 1000u), + LinkerPatch::RelativeTypePatch(32u, dex_file1, 3001u, 1000u), + LinkerPatch::RelativeTypePatch(32u, dex_file1, 3000u, 1001u), + LinkerPatch::RelativeTypePatch(32u, dex_file1, 3001u, 1001u), + LinkerPatch::RelativeTypePatch(32u, dex_file2, 3000u, 1000u), + LinkerPatch::RelativeTypePatch(32u, dex_file2, 3001u, 1000u), + LinkerPatch::RelativeTypePatch(32u, dex_file2, 3000u, 1001u), + LinkerPatch::RelativeTypePatch(32u, dex_file2, 3001u, 1001u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file1, 3000u, 1000u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file1, 3001u, 1000u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file1, 3000u, 1001u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file1, 3001u, 1001u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file2, 3000u, 1000u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file2, 3001u, 1000u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file2, 3000u, 1001u), + LinkerPatch::TypeBssEntryPatch(32u, dex_file2, 3001u, 1001u), + LinkerPatch::RelativeStringPatch(32u, dex_file1, 3000u, 1000u), + LinkerPatch::RelativeStringPatch(32u, dex_file1, 3001u, 1000u), + LinkerPatch::RelativeStringPatch(32u, dex_file1, 3000u, 1001u), + LinkerPatch::RelativeStringPatch(32u, dex_file1, 3001u, 1001u), + LinkerPatch::RelativeStringPatch(32u, dex_file2, 3000u, 1000u), + LinkerPatch::RelativeStringPatch(32u, dex_file2, 3001u, 1000u), + LinkerPatch::RelativeStringPatch(32u, dex_file2, 3000u, 1001u), + LinkerPatch::RelativeStringPatch(32u, dex_file2, 3001u, 1001u), + LinkerPatch::StringBssEntryPatch(32u, dex_file1, 3000u, 1000u), + LinkerPatch::StringBssEntryPatch(32u, dex_file1, 3001u, 1000u), + LinkerPatch::StringBssEntryPatch(32u, dex_file1, 3000u, 1001u), + LinkerPatch::StringBssEntryPatch(32u, dex_file1, 3001u, 1001u), + LinkerPatch::StringBssEntryPatch(32u, dex_file2, 3000u, 1000u), + LinkerPatch::StringBssEntryPatch(32u, dex_file2, 3001u, 1000u), + LinkerPatch::StringBssEntryPatch(32u, dex_file2, 3000u, 1001u), + LinkerPatch::StringBssEntryPatch(32u, dex_file2, 3001u, 1001u), LinkerPatch::DexCacheArrayPatch(32u, dex_file1, 3000u, 2000u), LinkerPatch::DexCacheArrayPatch(32u, dex_file1, 3001u, 2000u), LinkerPatch::DexCacheArrayPatch(32u, dex_file1, 3000u, 2001u), @@ -98,7 +159,12 @@ TEST(CompiledMethod, LinkerPatchOperators) { LinkerPatch::DexCacheArrayPatch(32u, dex_file2, 3001u, 2000u), LinkerPatch::DexCacheArrayPatch(32u, dex_file2, 3000u, 2001u), LinkerPatch::DexCacheArrayPatch(32u, dex_file2, 3001u, 2001u), - LinkerPatch::MethodPatch(16u, dex_file2, 1001u), // identical with patch as index 3. + LinkerPatch::BakerReadBarrierBranchPatch(32u, 0u, 0u), + LinkerPatch::BakerReadBarrierBranchPatch(32u, 0u, 1u), + LinkerPatch::BakerReadBarrierBranchPatch(32u, 1u, 0u), + LinkerPatch::BakerReadBarrierBranchPatch(32u, 1u, 1u), + + LinkerPatch::MethodPatch(16u, dex_file2, 1001u), // identical with patch at index 3. }; constexpr size_t last_index = arraysize(patches) - 1u; |