Permalink
Browse files

fixed bugs, pass m0_convert_i_n.m0

  • Loading branch information...
1 parent 06dcd16 commit 0679b0da8fcb2da2f9ebc475e11defaa1ef93ca2 Jimmy Zhuo committed Apr 4, 2012
Showing with 5 additions and 4 deletions.
  1. +1 −0 src/m0/c/Makefile
  2. +1 −1 src/m0/c/include/m0_ops.h
  3. +1 −1 src/m0/c/m0_ops.c
  4. +2 −2 t/m0/integration/m0_convert_i_n.m0
View
@@ -38,6 +38,7 @@ test: ../../../t/m0/integration/*.m0b
clean:
rm -f *.o m0
+ rm ../../../t/m0/integration/*.m0b
tags-emacs: tags.emacs.dummy
rm -f TAGS
@@ -17,8 +17,8 @@ enum M0_OPS {
M0_DIV_N,
M0_MOD_I,
M0_MOD_N,
- M0_ITON,
M0_NTOI,
+ M0_ITON,
M0_ASHR,
M0_LSHR,
M0_SHL,
View
@@ -200,7 +200,7 @@ m0_op_mod_i( M0_CallFrame *frame, const unsigned char *ops )
static void
m0_op_mod_n( M0_CallFrame *frame, const unsigned char *ops )
{
- frame->regs_ni.i[ops[1]] = (uint64_t)frame->regs_ni.n[ops[2]] %
+ frame->regs_ni.n[ops[1]] = (uint64_t)frame->regs_ni.n[ops[2]] %
(uint64_t)frame->regs_ni.n[ops[3]];
}
@@ -19,8 +19,8 @@
set_imm I1, 0, 99
# N1 = 99.0 (from constants segment)
- set_imm N1, 0, 3
- deref_n N1, CONSTS, N1
+ set_imm I1, 0, 3
+ deref_n N1, CONSTS, I1
# N2 = 99 (from convert_i_n)
convert_i_n I2, N1, x

0 comments on commit 0679b0d

Please sign in to comment.