[runtime] Remove handler block trampoline code
[mono.git] / mono / metadata / object-offsets.h
index fdddc7f5783e973e988d1ff8ffd1abe653ccdfcf..9f2fa37e04e5c1a7edf0e51ddadc83e6ca9ba57d 100644 (file)
@@ -1,4 +1,6 @@
-/*
+
+/**
+\file
 This is a parameterized header. It's supposed/ok to be included multiple times.
 
 Input defines: (those to be defined by the includer file)
@@ -12,6 +14,12 @@ DECL_ALIGN2(name,alignment)
 Optional:
 USE_CROSS_COMPILE_OFFSETS - if defined, force the cross compiler offsets to be used, otherwise
        they will only be used if MONO_CROSS_COMPILE is defined
+DISABLE_METADATA_OFFSETS - Disable the definition of offsets for structures defined in metadata/.
+DISABLE_JIT_OFFSETS - Disable the definition of offsets for structures defined in mini/.
+
+The last two are needed because metadata shouldn't include JIT offsets since the structures
+are not defined, while the JIT shouldn't include metadata offsets, since some of them
+are GC specific, and the JIT needs to remain GC agnostic.
 
 Output defines:
 
@@ -51,12 +59,12 @@ DECL_SIZE(float)
 DECL_SIZE(double)
 DECL_SIZE(gpointer)
 
+// Offsets for structures defined in metadata/
 #ifndef DISABLE_METADATA_OFFSETS
-//object offsets
 DECL_OFFSET(MonoObject, vtable)
 DECL_OFFSET(MonoObject, synchronisation)
 
-DECL_OFFSET(MonoObjectHandlePayload, __obj)
+DECL_OFFSET(MonoObjectHandlePayload, __raw)
 
 DECL_OFFSET(MonoClass, interface_bitmap)
 DECL_OFFSET(MonoClass, byval_arg)
@@ -141,6 +149,7 @@ DECL_OFFSET(SgenThreadInfo, tlab_temp_end)
 
 #endif //DISABLE METADATA OFFSETS
 
+// Offsets for structures defined in mini/
 #ifndef DISABLE_JIT_OFFSETS
 DECL_OFFSET(MonoLMF, previous_lmf)
 
@@ -149,7 +158,6 @@ DECL_OFFSET(MonoMethodRuntimeGenericContext, class_vtable)
 DECL_OFFSET(MonoJitTlsData, lmf)
 DECL_OFFSET(MonoJitTlsData, class_cast_from)
 DECL_OFFSET(MonoJitTlsData, class_cast_to)
-DECL_OFFSET(MonoJitTlsData, handler_block_return_address)
 DECL_OFFSET(MonoJitTlsData, restore_stack_prot)
 
 DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, locals_size)
@@ -204,6 +212,9 @@ DECL_OFFSET(MonoLMF, fp)
 DECL_OFFSET(MonoLMF, ip)
 DECL_OFFSET(MonoLMF, iregs)
 DECL_OFFSET(MonoLMF, fregs)
+DECL_OFFSET(DynCallArgs, fpregs)
+DECL_OFFSET(DynCallArgs, has_fpregs)
+DECL_OFFSET(SeqPointInfo, ss_tramp_addr)
 #elif defined(TARGET_ARM64)
 DECL_OFFSET(MonoLMF, pc)
 DECL_OFFSET(MonoLMF, gregs)
@@ -255,6 +266,15 @@ DECL_OFFSET(SeqPointInfo, ss_tramp_addr)
 DECL_OFFSET(SeqPointInfo, bp_addrs)
 #endif
 
+#ifdef ENABLE_INTERPRETER
+DECL_OFFSET(InterpMethodArguments, ilen)
+DECL_OFFSET(InterpMethodArguments, iargs)
+DECL_OFFSET(InterpMethodArguments, flen)
+DECL_OFFSET(InterpMethodArguments, fargs)
+DECL_OFFSET(InterpMethodArguments, retval)
+DECL_OFFSET(InterpMethodArguments, is_float_ret)
+#endif
+
 #endif //DISABLE_JIT_OFFSETS
 
 #endif //USED_CROSS_COMPILER_OFFSETS