cvsuser 02/11/09 04:42:55
Modified: jit/i386 core.jit
. MANIFEST
Added: t/op comp.t
Log:
op_ic_i was broken in jit/i386 causing perl tests to fail
Revision Changes Path
1.25 +25 -25 parrot/jit/i386/core.jit
Index: core.jit
===================================================================
RCS file: /cvs/public/parrot/jit/i386/core.jit,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -w -r1.24 -r1.25
--- core.jit 13 Oct 2002 10:03:59 -0000 1.24
+++ core.jit 9 Nov 2002 12:42:52 -0000 1.25
@@ -1,7 +1,7 @@
;
; i386/core.jit
;
-; $Id: core.jit,v 1.24 2002/10/13 10:03:59 sfink Exp $
+; $Id: core.jit,v 1.25 2002/11/09 12:42:52 leo Exp $
;
# TODO complete this
@@ -560,12 +560,12 @@
}
Parrot_lt_ic_i_ic {
+ emitm_movl_i_r(NATIVECODE, *INT_CONST[1], emit_EAX);
if (MAP[2]) {
- emitm_cmpl_i_r(NATIVECODE, *INT_CONST[1], MAP[2]);
+ emitm_cmpl_r_r(NATIVECODE, MAP[2], emit_EAX);
}
else {
- emit_movl_m_r(NATIVECODE, emit_EAX, &INT_REG[2]);
- emitm_cmpl_i_r(NATIVECODE, *INT_CONST[1], emit_EAX);
+ emit_cmpl_m_r(NATIVECODE, emit_EAX, &INT_REG[2]);
}
emit_jcc(jit_info, emitm_jl, *INT_CONST[3]);
}
@@ -637,12 +637,12 @@
}
Parrot_ge_ic_i_ic {
+ emitm_movl_i_r(NATIVECODE, *INT_CONST[1], emit_EAX);
if (MAP[2]) {
- emitm_cmpl_i_r(NATIVECODE, *INT_CONST[1], MAP[2]);
+ emitm_cmpl_r_r(NATIVECODE, MAP[2], emit_EAX);
}
else {
- emit_movl_m_r(NATIVECODE, emit_EAX, &INT_REG[2]);
- emitm_cmpl_i_r(NATIVECODE, *INT_CONST[1], emit_EAX);
+ emit_cmpl_m_r(NATIVECODE, emit_EAX, &INT_REG[2]);
}
emit_jcc(jit_info, emitm_jnl, *INT_CONST[3]);
}
@@ -681,12 +681,12 @@
}
Parrot_le_ic_i_ic {
+ emitm_movl_i_r(NATIVECODE, *INT_CONST[1], emit_EAX);
if (MAP[2]) {
- emitm_cmpl_i_r(NATIVECODE, *INT_CONST[1], MAP[2]);
+ emitm_cmpl_r_r(NATIVECODE, MAP[2], emit_EAX);
}
else {
- emit_movl_m_r(NATIVECODE, emit_EAX, &INT_REG[2]);
- emitm_cmpl_i_r(NATIVECODE, *INT_CONST[1], emit_EAX);
+ emit_cmpl_m_r(NATIVECODE, emit_EAX, &INT_REG[2]);
}
emit_jcc(jit_info, emitm_jle, *INT_CONST[3]);
}
1.249 +1 -0 parrot/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /cvs/public/parrot/MANIFEST,v
retrieving revision 1.248
retrieving revision 1.249
diff -u -w -r1.248 -r1.249
--- MANIFEST 9 Nov 2002 08:01:09 -0000 1.248
+++ MANIFEST 9 Nov 2002 12:42:54 -0000 1.249
@@ -1604,6 +1604,7 @@
t/harness
t/op/basic.t
t/op/bitwise.t
+t/op/comp.t
t/op/debuginfo.t
t/op/gc.t
t/op/globals.t
1.1 parrot/t/op/comp.t
Index: comp.t
===================================================================
#! perl -w
use Parrot::Test tests => 6;
# some of these were failing with JIT/i386
output_is(<<'CODE', <<OUTPUT, "gt_ic_i_ic");
set I0, 10
gt 11, I0, ok1
print "nok gt\n"
ok1:
print "ok 1\n"
gt 9, I0, nok1
print "ok 2\n"
branch ok2
nok1:
print "nok gt 2\n"
ok2:
end
CODE
ok 1
ok 2
OUTPUT
output_is(<<'CODE', <<OUTPUT, "ge_ic_i_ic");
set I0, 10
ge 11, I0, ok1
print "nok ge\n"
ok1:
print "ok 1\n"
ge 9, I0, nok1
print "ok 2\n"
branch ok2
nok1:
print "nok ge 2\n"
ok2:
ge 10, I0, ok3
print "nok ge 3\n"
ok3:
print "ok 3\n"
end
CODE
ok 1
ok 2
ok 3
OUTPUT
output_is(<<'CODE', <<OUTPUT, "le_ic_i_ic");
set I0, 10
le 9, I0, ok1
print "nok le\n"
ok1:
print "ok 1\n"
le 11, I0, nok1
print "ok 2\n"
branch ok2
nok1:
print "nok le 2\n"
ok2:
le 10, I0, ok3
print "nok le 3\n"
ok3:
print "ok 3\n"
end
CODE
ok 1
ok 2
ok 3
OUTPUT
output_is(<<'CODE', <<OUTPUT, "lt_ic_i_ic");
set I0, 10
lt 9, I0, ok1
print "nok lt\n"
ok1:
print "ok 1\n"
lt 10, I0, nok1
print "ok 2\n"
branch ok2
nok1:
print "nok lt 2\n"
ok2:
end
CODE
ok 1
ok 2
OUTPUT
output_is(<<'CODE', <<OUTPUT, "eq_ic_i_ic");
set I0, 10
eq 9, I0, nok1
print "ok 1\n"
branch ok1
nok1:
print "nok eq\n"
ok1:
eq 10, I0, ok2
print "nok eq 2\n"
end
ok2:
print "ok 2\n"
eq 11, 10, nok3
print "ok 3\n"
end
nok3:
print "nok 3 eq \n"
end
CODE
ok 1
ok 2
ok 3
OUTPUT
output_is(<<'CODE', <<OUTPUT, "ne_ic_i_ic");
set I0, 10
ne 9, I0, ok1
print "nok 1\n"
branch nok1
ok1:
print "ok 1\n"
nok1:
ne 10, I0, nok2
print "ok 2\n"
branch ok2
nok2:
print "nok 2\n"
ok2:
ne 11, 10, ok3
print "nok 3\n"
end
ok3:
print "ok 3\n"
end
CODE
ok 1
ok 2
ok 3
OUTPUT
1;