develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34180 - branches/jit_h_files/src/jit/i386

From:
Whiteknight
Date:
December 20, 2008 20:35
Subject:
[svn:parrot] r34180 - branches/jit_h_files/src/jit/i386
Message ID:
20081221043522.E94C1CBA12@x12.develooper.com
Author: Whiteknight
Date: Sat Dec 20 20:35:22 2008
New Revision: 34180

Modified:
   branches/jit_h_files/src/jit/i386/jit_defs.c
   branches/jit_h_files/src/jit/i386/jit_emit.h

Log:
[jit_h_files] fixing up some macros which cause global conflicts by renaming them to JIT_*

Modified: branches/jit_h_files/src/jit/i386/jit_defs.c
==============================================================================
--- branches/jit_h_files/src/jit/i386/jit_defs.c	(original)
+++ branches/jit_h_files/src/jit/i386/jit_defs.c	Sat Dec 20 20:35:22 2008
@@ -903,7 +903,7 @@
      * cmp Parrot_FixedIntegerArray_get_integer_keyed_int, %esi
      * jne L1
      */
-    jit_emit_mov_RM_i(interp, NATIVECODE, emit_EDI, ROFFS_PMC(2));
+    jit_emit_mov_RM_i(interp, NATIVECODE, emit_EDI, JIT_ROFFS_PMC(2));
     emitm_movl_m_r(interp, NATIVECODE, emit_EAX, emit_EDI, emit_None, 1,
             offsetof(struct PMC, vtable));
     emitm_movl_m_r(interp, NATIVECODE, emit_ESI, emit_EAX, emit_None, 1, offset);
@@ -924,7 +924,7 @@
         jit_emit_mov_rr_i(NATIVECODE, emit_ECX, MAP(3));
     }
     else {
-        jit_emit_mov_RM_i(interp, NATIVECODE, emit_ECX, ROFFS_INT(3));
+        jit_emit_mov_RM_i(interp, NATIVECODE, emit_ECX, JIT_ROFFS_INT(3));
     }
     /*  range check */
     jit_emit_cmp_ri_i(interp, NATIVECODE, emit_ECX, 0);
@@ -965,7 +965,7 @@
      * cmp Parrot_FixedIntegerArray_set_integer_keyed_int, %esi
      * jne L1
      */
-    jit_emit_mov_RM_i(interp, NATIVECODE, emit_EDI, ROFFS_PMC(1));
+    jit_emit_mov_RM_i(interp, NATIVECODE, emit_EDI, JIT_ROFFS_PMC(1));
     emitm_movl_m_r(interp, NATIVECODE, emit_EAX, emit_EDI, emit_None, 1,
             offsetof(struct PMC, vtable));
     emitm_movl_m_r(interp, NATIVECODE, emit_ESI, emit_EAX, emit_None, 1, offset);
@@ -986,7 +986,7 @@
         jit_emit_mov_rr_i(NATIVECODE, emit_ECX, MAP(2));
     }
     else {
-        jit_emit_mov_RM_i(interp, NATIVECODE, emit_ECX, ROFFS_INT(2));
+        jit_emit_mov_RM_i(interp, NATIVECODE, emit_ECX, JIT_ROFFS_INT(2));
     }
     /*  range check */
     jit_emit_cmp_ri_i(interp, NATIVECODE, emit_ECX, 0);
@@ -1010,7 +1010,7 @@
         jit_emit_mov_rr_i(NATIVECODE, emit_EDX, MAP(3));
     }
     else {
-        jit_emit_mov_RM_i(interp, NATIVECODE, emit_EDX, ROFFS_INT(3));
+        jit_emit_mov_RM_i(interp, NATIVECODE, emit_EDX, JIT_ROFFS_INT(3));
     }
     emitm_movl_r_m(interp, NATIVECODE, emit_EDX, emit_EAX, emit_ECX, 4, 0);
 
@@ -1101,7 +1101,7 @@
                  */
 #  if EXEC_CAPABLE
                 if (jit_info->objfile) {
-                    jit_emit_fload_m_n(interp, jit_info->native_ptr, CONST(i));
+                    jit_emit_fload_m_n(interp, jit_info->native_ptr, JIT_CONST(i));
                     Parrot_exec_add_text_rellocation(jit_info->objfile,
                             jit_info->native_ptr, RTYPE_DATA, "const_table", -4);
                 }
@@ -1127,7 +1127,7 @@
             case PARROT_ARG_SC:
 #  if EXEC_CAPABLE
                 if (jit_info->objfile) {
-                    emitm_pushl_m(jit_info->native_ptr, CONST(i));
+                    emitm_pushl_m(jit_info->native_ptr, JIT_CONST(i));
                     Parrot_exec_add_text_rellocation(jit_info->objfile,
                             jit_info->native_ptr, RTYPE_DATA, "const_table", -4);
                 }
@@ -1142,7 +1142,7 @@
             case PARROT_ARG_PC:
 #  if EXEC_CAPABLE
                 if (jit_info->objfile) {
-                    emitm_pushl_m(jit_info->native_ptr, CONST(i));
+                    emitm_pushl_m(jit_info->native_ptr, JIT_CONST(i));
                     Parrot_exec_add_text_rellocation(jit_info->objfile,
                             jit_info->native_ptr, RTYPE_DATA,
                             "const_table", -4);
@@ -1385,7 +1385,7 @@
     emitm_pushl_r(jit_info->native_ptr, emit_ECX);
 #  if EXEC_CAPABLE
     if (jit_info->objfile) {
-        CALL("pmc_new_noinit");
+        JIT_CALL("pmc_new_noinit");
     }
     else
 #  endif
@@ -1592,10 +1592,10 @@
             break;
         case PARROT_ARG_FLOATVAL|PARROT_ARG_CONSTANT:
             if (recursive) {
-                jit_emit_mov_ri_n(interp, NATIVECODE, FSR1, &CONST(2)->u.number);
+                jit_emit_mov_ri_n(interp, NATIVECODE, FSR1, &JI_CONST(2)->u.number);
             }
             else {
-                jit_emit_mov_ri_n(interp, NATIVECODE, FSR1, &CONST(2)->u.number);
+                jit_emit_mov_ri_n(interp, NATIVECODE, FSR1, &JIT_CONST(2)->u.number);
                 jit_emit_fstore_mb_n(interp, NATIVECODE, emit_EAX, 0);
             }
             break;
@@ -1705,7 +1705,7 @@
                 break;
             case PARROT_ARG_FLOATVAL|PARROT_ARG_CONSTANT:
                 jit_emit_mov_ri_n(interp, NATIVECODE, params_map,
-                        &CONST(2 + i)->u.number);
+                        &JIT_CONST(2 + i)->u.number);
                 break;
             default:
                 Parrot_ex_throw_from_c_args(interp, NULL, 1,

Modified: branches/jit_h_files/src/jit/i386/jit_emit.h
==============================================================================
--- branches/jit_h_files/src/jit/i386/jit_emit.h	(original)
+++ branches/jit_h_files/src/jit/i386/jit_emit.h	Sat Dec 20 20:35:22 2008
@@ -1478,11 +1478,11 @@
 #  undef Parrot_jit_vtable_unlessp_op
 #  undef Parrot_jit_vtable_newp_ic_op
 
-#  define CONST(i) (int *)(jit_info->cur_op[i] * \
+#  define JIT_CONST(i) (int *)(jit_info->cur_op[i] * \
        sizeof (PackFile_Constant) + \
        offsetof(PackFile_Constant, u))
 
-#  define CALL(f) Parrot_exec_add_text_rellocation_func(jit_info->objfile, \
+#  define JIT_CALL(f) Parrot_exec_add_text_rellocation_func(jit_info->objfile, \
        jit_info->native_ptr, (f)); \
        emitm_calll(jit_info->native_ptr, EXEC_CALLDISP);
 /* emit a call to a vtable func
@@ -1493,24 +1493,10 @@
 #  include "parrot/oplib/ops.h"
 EXTERN INTVAL Parrot_FixedIntegerArray_get_integer_keyed_int(Interp*, PMC*, INTVAL);
 EXTERN void Parrot_FixedIntegerArray_set_integer_keyed_int(Interp*, PMC*, INTVAL, INTVAL);
-#  define ROFFS_PMC(x) REG_OFFS_PMC(jit_info->cur_op[(x)])
-#  define ROFFS_INT(x) REG_OFFS_INT(jit_info->cur_op[(x)])
+#  define JIT_ROFFS_PMC(x) REG_OFFS_PMC(jit_info->cur_op[(x)])
+#  define JIT_ROFFS_INT(x) REG_OFFS_INT(jit_info->cur_op[(x)])
 #  define NATIVECODE jit_info->native_ptr
 
-
-#  undef ROFFS_PMC
-#  undef ROFFS_INT
-#  undef NATIVECODE
-
-/*
-#  undef IREG
-#  undef NREG
-#  undef SREG
-#  undef PREG
-#  undef CONST
-#  undef CALL
-*/
-
 #endif /* JIT_VTABLE_OPS */
 
 #if EXEC_CAPABLE



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About