Skip to content

Commit

Permalink
Add output for two more pirop's
Browse files Browse the repository at this point in the history
  • Loading branch information
atrodo committed Apr 19, 2011
1 parent 7616c50 commit 80decd7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions compilers/opsc/lasm.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,23 @@ method handle_op($op)

self<fh>.print(" $dest = $rhs;\n");
}
if ($op<pirop> eq '+=')
{
my $dest := self.handle_node($op[0]);
my $rhs := self.handle_node($op[1]);

self<fh>.print(" $dest = ADD $dest, $rhs;\n");
}
if ($op<pirop> eq '+')
{
my $dest := '$';# ~ %reg_map{$type} ~ "1";
my $src1 := self.handle_node($op[0]);
my $src2 := self.handle_node($op[1]);

self<fh>.print(" $dest = ADD $src1, $src2;\n");

return $dest;
}
return;
}

Expand Down

0 comments on commit 80decd7

Please sign in to comment.