Home
last modified time | relevance | path

Searched refs:expected_code (Results 1 – 5 of 5) sorted by relevance

/art/dex2oat/linker/x86_64/
Drelative_patcher_x86_64_test.cc72 static const uint8_t expected_code[] = { in TEST_F() local
75 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
121 static const uint8_t expected_code[] = { in TEST_F() local
128 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
145 static const uint8_t expected_code[] = { in TEST_F() local
152 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
169 static const uint8_t expected_code[] = { in TEST_F() local
176 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
/art/dex2oat/linker/x86/
Drelative_patcher_x86_test.cc52 static const uint8_t expected_code[] = { in TEST_F() local
55 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
101 static const uint8_t expected_code[] = { in TEST_F() local
108 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
132 static const uint8_t expected_code[] = { in TEST_F() local
141 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
164 static const uint8_t expected_code[] = { in TEST_F() local
173 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
/art/dex2oat/linker/arm64/
Drelative_patcher_arm64_test.cc223 const std::vector<uint8_t> expected_code = CompileMethodCallThunk(); in CheckThunk() local
224 if (output_.size() < thunk_offset + expected_code.size()) { in CheckThunk()
226 << "thunk_offset + expected_code.size() == " << (thunk_offset + expected_code.size()); in CheckThunk()
229 ArrayRef<const uint8_t> linked_code(&output_[thunk_offset], expected_code.size()); in CheckThunk()
230 if (linked_code == ArrayRef<const uint8_t>(expected_code)) { in CheckThunk()
234 DumpDiff(ArrayRef<const uint8_t>(expected_code), linked_code); in CheckThunk()
312 auto expected_code = GenNopsAndAdrpLdr(num_nops, method1_offset, target_offset); in TestNopsAdrpLdr() local
313 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TestNopsAdrpLdr()
336 auto expected_code = GenNopsAndAdrpAdd(num_nops, method1_offset, string_offset); in TestNopsAdrpAdd() local
337 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TestNopsAdrpAdd()
[all …]
/art/dex2oat/linker/arm/
Drelative_patcher_thumb2_test.cc250 const std::vector<uint8_t> expected_code = CompileMethodCallThunk(); in CheckThunk() local
251 if (output_.size() < thunk_offset + expected_code.size()) { in CheckThunk()
253 << "thunk_offset + expected_code.size() == " << (thunk_offset + expected_code.size()); in CheckThunk()
256 ArrayRef<const uint8_t> linked_code(&output_[thunk_offset], expected_code.size()); in CheckThunk()
257 if (linked_code == ArrayRef<const uint8_t>(expected_code)) { in CheckThunk()
261 DumpDiff(ArrayRef<const uint8_t>(expected_code), linked_code); in CheckThunk()
397 const uint8_t expected_code[] = { in CheckPcRelativePatch() local
404 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in CheckPcRelativePatch()
414 static const uint8_t expected_code[] = { in TEST_F() local
417 EXPECT_TRUE(CheckLinkedMethod(MethodRef(1u), ArrayRef<const uint8_t>(expected_code))); in TEST_F()
[all …]
/art/dex2oat/linker/
Drelative_patcher_test.h216 bool CheckLinkedMethod(MethodReference method_ref, const ArrayRef<const uint8_t>& expected_code) { in CheckLinkedMethod() argument
226 CHECK_EQ(compiled_methods_[idx]->GetQuickCode().size(), expected_code.size()); in CheckLinkedMethod()
232 CHECK_LE(offset + expected_code.size(), output_.size()); in CheckLinkedMethod()
233 ArrayRef<const uint8_t> linked_code(&output_[offset], expected_code.size()); in CheckLinkedMethod()
234 if (linked_code == expected_code) { in CheckLinkedMethod()
238 DumpDiff(expected_code, linked_code); in CheckLinkedMethod()
242 void DumpDiff(const ArrayRef<const uint8_t>& expected_code, in DumpDiff() argument
249 for (size_t i = 0; i != expected_code.size(); ++i) { in DumpDiff()
250 expected_hex << " " << digits[expected_code[i] >> 4] << digits[expected_code[i] & 0xf]; in DumpDiff()
253 found_diff = (expected_code[i] != linked_code[i]); in DumpDiff()