Skip to content

Commit

Permalink
cilkcc: codegen supports mul, div, rem for int
Browse files Browse the repository at this point in the history
  • Loading branch information
maekawatoshiki committed Oct 13, 2020
1 parent bf78285 commit 9ef8c61
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cilkcc/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ impl<'a> FunctionCodeGenerator<'a> {
Ok((self.builder.build_add(lhs, rhs), lty))
}
ast::BinaryOp::Sub => Ok((self.builder.build_sub(lhs, rhs), lty)),
ast::BinaryOp::Mul => Ok((self.builder.build_mul(lhs, rhs), lty)),
ast::BinaryOp::Div => Ok((self.builder.build_div(lhs, rhs), lty)),
ast::BinaryOp::Rem => Ok((self.builder.build_rem(lhs, rhs), lty)),
_ => unimplemented!(),
}
}
Expand Down

0 comments on commit 9ef8c61

Please sign in to comment.