cvsuser 04/10/19 03:53:35
Modified: jit/ppc core.jit jit_emit.h
Log:
50% more MOPS for ppc JIT
Revision Changes Path
1.17 +8 -2 parrot/jit/ppc/core.jit
Index: core.jit
===================================================================
RCS file: /cvs/public/parrot/jit/ppc/core.jit,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -w -r1.16 -r1.17
--- core.jit 12 Jan 2004 12:11:45 -0000 1.16
+++ core.jit 19 Oct 2004 10:53:35 -0000 1.17
@@ -2,9 +2,11 @@
; ppc/core.jit
;
;
-; $Id: core.jit,v 1.16 2004/01/12 12:11:45 leo Exp $
+; $Id: core.jit,v 1.17 2004/10/19 10:53:35 leo Exp $
;
+# TODO complete this
+#define P_ARITH ((PREV_OP == dec_i) || (PREV_OP == inc_i) || (PREV_OP == sub_i_i_i))
Parrot_end {
jit_emit_lwz(NATIVECODE, r1, 0, r1);
jit_emit_lwz(NATIVECODE, r0, 8, r1);
@@ -558,7 +560,11 @@
}
TEMPLATE Parrot_ifunless_i_ic {
- if (MAP[1]) {
+ if (P_ARITH && MAP[1]) {
+ /* set the Rc bit of prev for the sake of +50% more MOPS */
+ NATIVECODE[-1] |= 1;
+ }
+ else if (MAP[1]) {
jit_emit_cmp_ri(NATIVECODE, MAP[1], 0);
}
else {
1.41 +8 -1 parrot/jit/ppc/jit_emit.h
Index: jit_emit.h
===================================================================
RCS file: /cvs/public/parrot/jit/ppc/jit_emit.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -w -r1.40 -r1.41
--- jit_emit.h 18 Oct 2004 01:35:32 -0000 1.40
+++ jit_emit.h 19 Oct 2004 10:53:35 -0000 1.41
@@ -3,7 +3,7 @@
*
* PPC
*
- * $Id: jit_emit.h,v 1.40 2004/10/18 01:35:32 brentdax Exp $
+ * $Id: jit_emit.h,v 1.41 2004/10/19 10:53:35 leo Exp $
*/
#if !defined(PARROT_PPC_JIT_EMIT_H_GUARD)
@@ -777,6 +777,12 @@
{
jit_emit_mov_mr_i(
((Parrot_jit_info_t *)(interpreter->jit_info))->native_ptr, mem, reg);
+ /*
+ * if we save registers, the last instruction isn't the ins that
+ * sets condition codes, so the speed hack in Parrot_ifunless_i_ic
+ * doesn't work.
+ */
+ ((Parrot_jit_info_t *)(interpreter->jit_info))->prev_op = 0;
}
/* move mem (i.e. intreg) to reg */
@@ -793,6 +799,7 @@
{
jit_emit_mov_mr_n(
((Parrot_jit_info_t *)(interpreter->jit_info))->native_ptr, mem, reg);
+ ((Parrot_jit_info_t *)(interpreter->jit_info))->prev_op = 0;
}
/* move mem (i.e. numreg) to reg */