develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35502 - trunk/src/jit/i386

From:
chromatic
Date:
January 13, 2009 12:01
Subject:
[svn:parrot] r35502 - trunk/src/jit/i386
Message ID:
20090113200110.B0923CB9F9@x12.develooper.com
Author: chromatic
Date: Tue Jan 13 12:01:09 2009
New Revision: 35502

Modified:
   trunk/src/jit/i386/exec_dep.c
   trunk/src/jit/i386/jit_defs.c

Log:
[JIT] Turned a magic number representing the cpu_ret opcode into
PARROT_OP_cpu_ret, which is somewhat more clear.

Modified: trunk/src/jit/i386/exec_dep.c
==============================================================================
--- trunk/src/jit/i386/exec_dep.c	(original)
+++ trunk/src/jit/i386/exec_dep.c	Tue Jan 13 12:01:09 2009
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2008, The Perl Foundation.
+ * Copyright (C) 2003-2009, The Perl Foundation.
  */
 
 /*
@@ -80,7 +80,7 @@
             cur_section->done = 1;
         }
 
-        i = (int)(((op_func_t*)interp->op_lib->op_func_table)[2]);
+        i = (int)(((op_func_t*)interp->op_lib->op_func_table)[PARROT_OP_cpu_ret]);
         j = (int)cgp_core;
 
         *offset = (void *)(i - j);

Modified: trunk/src/jit/i386/jit_defs.c
==============================================================================
--- trunk/src/jit/i386/jit_defs.c	(original)
+++ trunk/src/jit/i386/jit_defs.c	Tue Jan 13 12:01:09 2009
@@ -2060,8 +2060,7 @@
         jit_emit_mov_ri_i(interp, jit_info->native_ptr, emit_ESI, offset);
         emitm_callm(jit_info->native_ptr, emit_ESI, 0, 0, 0);
         /* now patch a B<cpu_ret> opcode after the end of the
-         * prederefed (non JIT) section
-         */
+         * prederefed (non JIT) section */
         if (last_is_branch) {
             offset = (cur_section->end - interp->code->base.data) +
                 interp->code->prederef.code;
@@ -2078,7 +2077,7 @@
                 + interp->code->prederef.code;
             cur_section->done = 1;
         }
-        *offset = ((op_func_t*)interp->op_lib->op_func_table)[2];
+        *offset = ((op_func_t*)interp->op_lib->op_func_table)[PARROT_OP_cpu_ret];
     }
     else {
         /* else call normal funtion */



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