From c8c2bb6784d70cdc6e3a75a24fc9d09970a574e4 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 15 Oct 2021 09:33:09 +0100 Subject: JNI compiler: Rewrite exception polling. Make the slow path explicit in the JNI compiler. Fix the CFI data for the exceptional path of synchronized methods. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: run-gtests.sh Test: testrunner.py --target --optimizing Bug: 172332525 Change-Id: If64965eef15c063e36b78dd8bb6cba5af34ab4fa --- compiler/utils/assembler_thumb_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/utils/assembler_thumb_test.cc') diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc index 96f4a6cf27..83b7eebe55 100644 --- a/compiler/utils/assembler_thumb_test.cc +++ b/compiler/utils/assembler_thumb_test.cc @@ -177,7 +177,8 @@ TEST_F(ArmVIXLAssemblerTest, VixlJniHelpers) { __ CreateJObject(method_register, FrameOffset(1025), scratch_register, true); __ CreateJObject(scratch_register, FrameOffset(1025), scratch_register, true); - __ ExceptionPoll(0); + std::unique_ptr exception_slow_path = __ CreateLabel(); + __ ExceptionPoll(exception_slow_path.get()); // Push the target out of range of branch emitted by ExceptionPoll. for (int i = 0; i < 64; i++) { @@ -188,6 +189,9 @@ TEST_F(ArmVIXLAssemblerTest, VixlJniHelpers) { __ DecreaseFrameSize(32); __ RemoveFrame(frame_size, callee_save_regs, /* may_suspend= */ true); + __ Bind(exception_slow_path.get()); + __ DeliverPendingException(); + EmitAndCheck("VixlJniHelpers", VixlJniHelpersResults); } -- cgit v1.2.3-59-g8ed1b