diff options
author | Vladimir Marko <vmarko@google.com> | 2017-11-23 16:05:19 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2018-04-04 10:34:36 +0100 |
commit | c9dd2207dfdab42586b1d6a5e7f11cf2fcea3a7a (patch) | |
tree | 879df31fd10658093b8931117ee617064ce82519 /compiler/optimizing/codegen_test_utils.h | |
parent | 30a2d9c61da75359dee4ce90236d19fc6341b07a (diff) |
Compile link-time thunks in codegen.
Prepare for experimenting with Baker read barrier marking
introspection entrypoints for JIT.
Test: m test-art-host-gtest
Test: Compare compiled boot*.oat before and after (no diff).
Test: Pixel 2 XL boots.
Bug: 36141117
Change-Id: Idb413a31b158db4bf89a8707ea46dd167a06f110
Diffstat (limited to 'compiler/optimizing/codegen_test_utils.h')
-rw-r--r-- | compiler/optimizing/codegen_test_utils.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h index c41c290c8b..792cfb539a 100644 --- a/compiler/optimizing/codegen_test_utils.h +++ b/compiler/optimizing/codegen_test_utils.h @@ -195,7 +195,9 @@ class InternalCodeAllocator : public CodeAllocator { } size_t GetSize() const { return size_; } - uint8_t* GetMemory() const { return memory_.get(); } + ArrayRef<const uint8_t> GetMemory() const OVERRIDE { + return ArrayRef<const uint8_t>(memory_.get(), size_); + } private: size_t size_; @@ -269,8 +271,8 @@ static void Run(const InternalCodeAllocator& allocator, InstructionSet target_isa = codegen.GetInstructionSet(); typedef Expected (*fptr)(); - CommonCompilerTest::MakeExecutable(allocator.GetMemory(), allocator.GetSize()); - fptr f = reinterpret_cast<fptr>(allocator.GetMemory()); + CommonCompilerTest::MakeExecutable(allocator.GetMemory().data(), allocator.GetMemory().size()); + fptr f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(allocator.GetMemory().data())); if (target_isa == InstructionSet::kThumb2) { // For thumb we need the bottom bit set. f = reinterpret_cast<fptr>(reinterpret_cast<uintptr_t>(f) + 1); |