summaryrefslogtreecommitdiff
path: root/compiler/utils/jni_macro_assembler.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2021-11-02 10:51:57 +0000
committer Vladimir Marko <vmarko@google.com> 2021-11-08 13:43:17 +0000
commitad33392536e606eac02bf3ee261fa7ddd26646a0 (patch)
tree415155d35754c830cabafdc5f522731b8eab92cc /compiler/utils/jni_macro_assembler.h
parent39c36b28c7111411a509a0578741382842e6a067 (diff)
JNI: Rewrite read barrier slow path.
Preserve all argument registers in the slow path to prepare for moving arguments in registers for @FastNative. Move the read barrier check earlier as it logically belongs to the transition frame creation. For Baker read barriers, add a mark bit check with fast return to the main path. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: run-gtests.sh Test: testrunner.py --target --optimizing Bug: 172332525 Change-Id: I50bbc0bc9d54577281e7667aafebb4a53a539af1
Diffstat (limited to 'compiler/utils/jni_macro_assembler.h')
-rw-r--r--compiler/utils/jni_macro_assembler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/utils/jni_macro_assembler.h b/compiler/utils/jni_macro_assembler.h
index 0ccf4cd60e..7f5dc2f76b 100644
--- a/compiler/utils/jni_macro_assembler.h
+++ b/compiler/utils/jni_macro_assembler.h
@@ -257,6 +257,10 @@ class JNIMacroAssembler : public DeletableArenaObject<kArenaAllocAssembler> {
virtual void Jump(JNIMacroLabel* label) = 0;
// Emit a conditional jump to the label by applying a unary condition test to the GC marking flag.
virtual void TestGcMarking(JNIMacroLabel* label, JNIMacroUnaryCondition cond) = 0;
+ // Emit a conditional jump to the label by applying a unary condition test to object's mark bit.
+ virtual void TestMarkBit(ManagedRegister ref,
+ JNIMacroLabel* label,
+ JNIMacroUnaryCondition cond) = 0;
// Code at this offset will serve as the target for the Jump call.
virtual void Bind(JNIMacroLabel* label) = 0;