summaryrefslogtreecommitdiff
path: root/compiler/exception_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/exception_test.cc')
-rw-r--r--compiler/exception_test.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/exception_test.cc b/compiler/exception_test.cc
index 15c07870a1..b56a991e74 100644
--- a/compiler/exception_test.cc
+++ b/compiler/exception_test.cc
@@ -15,6 +15,7 @@
*/
#include <memory>
+#include <type_traits>
#include "base/arena_allocator.h"
#include "base/callee_save_type.h"
@@ -76,13 +77,10 @@ class ExceptionTest : public CommonRuntimeTest {
ArenaStack arena_stack(&pool);
ScopedArenaAllocator allocator(&arena_stack);
StackMapStream stack_maps(&allocator, kRuntimeISA);
- stack_maps.BeginStackMapEntry(kDexPc,
- native_pc_offset,
- /* register_mask */ 0u,
- /* sp_mask */ nullptr,
- /* num_dex_registers */ 0u,
- /* inlining_depth */ 0u);
+ stack_maps.BeginMethod(4 * sizeof(void*), 0u, 0u, 0u);
+ stack_maps.BeginStackMapEntry(kDexPc, native_pc_offset);
stack_maps.EndStackMapEntry();
+ stack_maps.EndMethod();
const size_t stack_maps_size = stack_maps.PrepareForFillIn();
const size_t header_size = sizeof(OatQuickMethodHeader);
const size_t code_alignment = GetInstructionSetAlignment(kRuntimeISA);
@@ -92,6 +90,7 @@ class ExceptionTest : public CommonRuntimeTest {
MemoryRegion stack_maps_region(&fake_header_code_and_maps_[0], stack_maps_size);
stack_maps.FillInCodeInfo(stack_maps_region);
OatQuickMethodHeader method_header(code_offset, 0u, 4 * sizeof(void*), 0u, 0u, code_size);
+ static_assert(std::is_trivially_copyable<OatQuickMethodHeader>::value, "Cannot use memcpy");
memcpy(&fake_header_code_and_maps_[code_offset - header_size], &method_header, header_size);
std::copy(fake_code_.begin(),
fake_code_.end(),