Introduce a nterp with clinit check entrypoint.

It will be used post-zygote fork, so that methods whose class is not
initialized yet keep the same entrypoint even after initialization. This
avoids dirtying shared pages.

Test: imgdiag
Bug: 162110941
Change-Id: Idb861f23b368604e79f6d3efa7ad0dff287e0209
diff --git a/tools/cpp-define-generator/mirror_class.def b/tools/cpp-define-generator/mirror_class.def
index 8cfd54e..c01aab3 100644
--- a/tools/cpp-define-generator/mirror_class.def
+++ b/tools/cpp-define-generator/mirror_class.def
@@ -16,6 +16,7 @@
 
 #if ASM_DEFINE_INCLUDE_DEPENDENCIES
 #include "mirror/class.h"
+#include "subtype_check.h"
 #endif
 
 ASM_DEFINE(MIRROR_CLASS_ACCESS_FLAGS_OFFSET,
@@ -49,3 +50,9 @@
 ASM_DEFINE(MIRROR_CLASS_IS_INTERFACE_FLAG, art::kAccInterface)
 ASM_DEFINE(MIRROR_CLASS_IS_INTERFACE_FLAG_BIT,
            art::WhichPowerOf2(art::kAccInterface))
+ASM_DEFINE(MIRROR_CLASS_IS_VISIBLY_INITIALIZED_OFFSET,
+           art::mirror::Class::StatusOffset().SizeValue() +
+               (art::SubtypeCheckBits::BitStructSizeOf() / art::kBitsPerByte))
+ASM_DEFINE(MIRROR_CLASS_IS_VISIBLY_INITIALIZED_VALUE,
+           art::enum_cast<uint32_t>(art::ClassStatus::kVisiblyInitialized) <<
+               (art::SubtypeCheckBits::BitStructSizeOf() % art::kBitsPerByte))