Skip to content

Commit

Permalink
change iton/ntoi to match the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cotto committed Jul 9, 2011
1 parent b226909 commit 1272180
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/m0/perl5/m0_assembler.pl
Expand Up @@ -601,8 +601,8 @@ sub parse_chunks {
0x0B div_n
0x0C mod_i
0x0D mod_n
0x0E iton
0x0F ntoi
0x0E convert_i_n
0x0F convert_n_i
0x10 ashr
0x11 lshr
0x12 shl
Expand Down
16 changes: 8 additions & 8 deletions src/m0/perl5/m0_interp.pl
Expand Up @@ -116,8 +116,8 @@ sub new_interp {
\&m0_opfunc_div_n,
\&m0_opfunc_mod_i,
\&m0_opfunc_mod_n,
\&m0_opfunc_iton,
\&m0_opfunc_ntoi,
\&m0_opfunc_convert_i_n,
\&m0_opfunc_convert_n_i,
\&m0_opfunc_ashr,
\&m0_opfunc_lshr,
\&m0_opfunc_shl,
Expand Down Expand Up @@ -340,18 +340,18 @@ sub m0_opfunc_mod_n {
$$cf->[$a1] = $$cf->[$a2] % $$cf->[$a3];
}

sub m0_opfunc_iton {
sub m0_opfunc_convert_i_n {
my ($cf, $a1, $a2, $a3) = @_;
m0_say "iton $a1, $a2, $a3";
m0_say "convert_i_n $a1, $a2, $a3";

$$cf->[$a2] = int($$cf->[$a1]);
$$cf->[$a1] = int($$cf->[$a2]);
}

sub m0_opfunc_ntoi {
sub m0_opfunc_convert_n_i{
my ($cf, $a1, $a2, $a3) = @_;
m0_say "ntoi $a1, $a2, $a3";
m0_say "convert_n_i $a1, $a2, $a3";

$$cf->[$a2] = $$cf->[$a1];
$$cf->[$a1] = $$cf->[$a2];
}

sub m0_opfunc_ashr {
Expand Down

0 comments on commit 1272180

Please sign in to comment.