Author: benm
Date: 2005-06-28 16:26:29 -0400 (Tue, 28 Jun 2005)
New Revision: 46670

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/mini.c
Log:
2005-06-27  Ben Maurer  <[EMAIL PROTECTED]>

        * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
        outside of the macro, so strange stuff doesn't happen with gcc4
        (NEW_AOTCONST_TOKEN): Likewise.



Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog      2005-06-28 20:03:49 UTC (rev 46669)
+++ trunk/mono/mono/mini/ChangeLog      2005-06-28 20:26:29 UTC (rev 46670)
@@ -1,3 +1,9 @@
+2005-06-27  Ben Maurer  <[EMAIL PROTECTED]>
+
+       * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
+       outside of the macro, so strange stuff doesn't happen with gcc4
+       (NEW_AOTCONST_TOKEN): Likewise.
+
 2005-06-28  Martin Baulig  <[EMAIL PROTECTED]>
 
        * mini.c (mini_class_is_system_array): New static method; use this

Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2005-06-28 20:03:49 UTC (rev 46669)
+++ trunk/mono/mono/mini/mini.c 2005-06-28 20:26:29 UTC (rev 46670)
@@ -346,33 +346,35 @@
                (dest)->inst_right = (gpointer)(el2);   \
        } while (0)
 
-#define NEW_AOTCONST(cfg,dest,patch_type,cons) do {    \
-               (dest) = mono_mempool_alloc0 ((cfg)->mempool, sizeof 
(MonoInst));       \
-               (dest)->opcode = cfg->compile_aot ? OP_GOT_ENTRY : OP_PCONST;   
\
-        if (cfg->compile_aot) { \
-            MonoInst *group, *got_var; \
-            NEW_TEMPLOAD ((cfg), got_var, mono_get_got_var (cfg)->inst_c0); \
-                   NEW_PATCH_INFO ((cfg), group, cons, patch_type); \
-            (dest)->inst_p0 = got_var; \
-            (dest)->inst_p1 = group; \
-        } else { \
-                    (dest)->inst_p0 = (cons);  \
-             (dest)->inst_i1 = (gpointer)(patch_type); \
-        } \
-               (dest)->type = STACK_PTR;       \
-    } while (0)
+#define NEW_AOTCONST(cfg,dest,patch_type,cons) do {                    \
+               (dest) = mono_mempool_alloc0 ((cfg)->mempool, sizeof 
(MonoInst)); \
+               (dest)->opcode = cfg->compile_aot ? OP_GOT_ENTRY : OP_PCONST; \
+               if (cfg->compile_aot) {                                 \
+                       MonoInst *group, *got_var, *got_loc;            \
+                       got_loc = mono_get_got_var (cfg);               \
+                       NEW_TEMPLOAD ((cfg), got_var, got_loc->inst_c0); \
+                       NEW_PATCH_INFO ((cfg), group, cons, patch_type); \
+                       (dest)->inst_p0 = got_var;                      \
+                       (dest)->inst_p1 = group;                        \
+               } else {                                                \
+                       (dest)->inst_p0 = (cons);                       \
+                       (dest)->inst_i1 = (gpointer)(patch_type);       \
+               }                                                       \
+               (dest)->type = STACK_PTR;                               \
+       } while (0)
 
 #define NEW_AOTCONST_TOKEN(cfg,dest,patch_type,image,token,stack_type) do { \
-        MonoInst *group, *got_var; \
-               (dest) = mono_mempool_alloc0 ((cfg)->mempool, sizeof 
(MonoInst));       \
-               (dest)->opcode = OP_GOT_ENTRY;  \
-        NEW_TEMPLOAD ((cfg), got_var, mono_get_got_var (cfg)->inst_c0); \
-               NEW_PATCH_INFO ((cfg), group, NULL, patch_type); \
-        group->inst_p0 = mono_jump_info_token_new ((cfg)->mempool, (image), 
(token)); \
-        (dest)->inst_p0 = got_var; \
-        (dest)->inst_p1 = group; \
-               (dest)->type = (stack_type);    \
-    } while (0)
+               MonoInst *group, *got_var, *got_loc;                    \
+               (dest) = mono_mempool_alloc0 ((cfg)->mempool, sizeof 
(MonoInst)); \
+               (dest)->opcode = OP_GOT_ENTRY;                          \
+               got_loc = mono_get_got_var (cfg);                       \
+               NEW_TEMPLOAD ((cfg), got_var, got_loc->inst_c0);        \
+               NEW_PATCH_INFO ((cfg), group, NULL, patch_type);        \
+               group->inst_p0 = mono_jump_info_token_new ((cfg)->mempool, 
(image), (token)); \
+               (dest)->inst_p0 = got_var;                              \
+               (dest)->inst_p1 = group;                                \
+               (dest)->type = (stack_type);                            \
+       } while (0)
 
 #else
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to