2009-12-05 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Sat, 5 Dec 2009 05:56:48 +0000 (05:56 -0000)
committerZoltan Varga <vargaz@gmail.com>
Sat, 5 Dec 2009 05:56:48 +0000 (05:56 -0000)
* aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
blob.

* aot-runtime.c (load_function): Update after the change above.

* mini.h: Bump AOT file format version.

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

mono/mini/ChangeLog
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/mini.h

index 031a73ee6fef0169e9f0eaf6f63d1e7470a27252..18a454e2ea143719524b972ac93ebe10329adef6 100644 (file)
@@ -1,5 +1,12 @@
 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
 
+       * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
+       blob.
+
+       * aot-runtime.c (load_function): Update after the change above.
+
+       * mini.h: Bump AOT file format version.
+
        * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
        if the delegate class is dynamic.
 
@@ -9,7 +16,7 @@
 
 2009-12-04  Geoff Norton  <gnorton@novell.com>
 
-       * debugger-agent.c: When doing a func-eval invoke on a suspended runtime, 
+       * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
        we need to track the original suspend count so the thread properly
        wakes up in resume_thread.
 
index 4807295a07bc8616d1f1db5ec35f506e864ff15f..ae0af34cfab1b6f33e20425f895f170527d6b08c 100644 (file)
@@ -3397,7 +3397,7 @@ emit_trampoline (MonoAotCompile *acfg, const char *name, guint8 *code,
 {
        char start_symbol [256];
        char symbol [256];
-       guint32 buf_size;
+       guint32 buf_size, info_offset;
        MonoJumpInfo *patch_info;
        guint8 *buf, *p;
        GPtrArray *patches;
@@ -3440,11 +3440,13 @@ emit_trampoline (MonoAotCompile *acfg, const char *name, guint8 *code,
 
        sprintf (symbol, "%s_p", name);
 
+       info_offset = add_to_blob (acfg, buf, p - buf);
+
        emit_section_change (acfg, ".text", 0);
        emit_global (acfg, symbol, FALSE);
        emit_label (acfg, symbol);
-               
-       emit_bytes (acfg, buf, p - buf);
+
+       emit_int32 (acfg, info_offset);
 
        /* Emit debug info */
        if (unwind_ops) {
index 61472ba18f4fd1dbcd9fea54a8612fcc1099f3a5..2650bd09094c22ee022ddc24ce764a0b12072ce0 100644 (file)
@@ -2932,6 +2932,8 @@ load_function (MonoAotModule *amodule, const char *name)
                /* Nothing to patch */
                return code;
 
+       p = amodule->blob + *(guint32*)p;
+
        /* Similar to mono_aot_load_method () */
 
        n_patches = decode_value (p, &p);
index 797ac00c0bed833f5008742607c54d7a3f0de071..3612c7655e4bfde4612b2a487da81ba025b54343 100644 (file)
@@ -89,7 +89,7 @@ typedef gint64 mgreg_t;
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION "64"
+#define MONO_AOT_FILE_VERSION "65"
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))