2006-04-20 Geoff Norton <gnorton@customerdna.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Thu, 20 Apr 2006 22:59:19 +0000 (22:59 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Thu, 20 Apr 2006 22:59:19 +0000 (22:59 -0000)
        * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
        to managed wrapper.

svn path=/trunk/mono/; revision=59718

mono/mini/ChangeLog
mono/mini/mini-ppc.c

index b0d1d4ba41d3e2263e06c9661d6c746fb1beef36..b61885df300f441b105daa9d42a0dc7ce043a6d1 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-20  Geoff Norton  <gnorton@customerdna.com>
+
+       * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
+       to managed wrapper.
+                     
 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
 
        * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
index 775044adbce859c3d710b2b686ba909ca7e62a94..d467bd333019b19a0bb875bb04ed5bfd126b3dd8 100644 (file)
@@ -3821,8 +3821,13 @@ register.  Should this case include linux/ppc?
                pos++;
        }
 
-       if (method->save_lmf) {
+       if (method->wrapper_type == MONO_WRAPPER_NATIVE_TO_MANAGED) {
+               ppc_load (code, ppc_r3, cfg->domain);
+               mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, (gpointer)"mono_jit_thread_attach");
+               ppc_bl (code, 0);
+       }
 
+       if (method->save_lmf) {
                if (lmf_pthread_key != -1) {
                        emit_tls_access (code, ppc_r3, lmf_pthread_key);
                        if (G_STRUCT_OFFSET (MonoJitTlsData, lmf))