mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
NumDivCeilUnchecked
This commit is contained in:
parent
5557fb7e34
commit
5e2dbe3362
2 changed files with 30 additions and 0 deletions
|
@ -1549,6 +1549,25 @@ impl<
|
|||
}
|
||||
}
|
||||
|
||||
fn build_num_div_ceil(
|
||||
&mut self,
|
||||
dst: &Symbol,
|
||||
src1: &Symbol,
|
||||
src2: &Symbol,
|
||||
layout: &InLayout<'a>,
|
||||
) {
|
||||
match self.layout_interner.get_repr(*layout) {
|
||||
LayoutRepr::Builtin(Builtin::Int(int_width)) => self.build_fn_call(
|
||||
dst,
|
||||
bitcode::NUM_DIV_CEIL[int_width].to_string(),
|
||||
&[*src1, *src2],
|
||||
&[*layout, *layout],
|
||||
layout,
|
||||
),
|
||||
x => todo!("NumDivCeilUnchecked: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
fn build_num_rem(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, layout: &InLayout<'a>) {
|
||||
match self.layout_interner.get_repr(*layout) {
|
||||
LayoutRepr::Builtin(Builtin::Int(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue