enable even more dev-backend num tests

This commit is contained in:
Folkert 2024-01-02 22:23:47 +01:00
parent b7a41bcb3e
commit 7a365eb88f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 189 additions and 243 deletions

View file

@ -1010,7 +1010,7 @@ trait Backend<'a> {
arg_layouts[0], *ret_layout,
"NumAdd: expected to have the same argument and return layout"
);
self.build_num_add(sym, &args[0], &args[1], ret_layout)
self.build_num_add_wrap(sym, &args[0], &args[1], ret_layout)
}
LowLevel::NumAddChecked => {
self.build_num_add_checked(sym, &args[0], &args[1], &arg_layouts[0], ret_layout)
@ -2198,6 +2198,14 @@ trait Backend<'a> {
return_layout: &InLayout<'a>,
);
fn build_num_add_wrap(
&mut self,
dst: &Symbol,
src1: &Symbol,
src2: &Symbol,
layout: &InLayout<'a>,
);
/// build_num_sub_checked stores the sum of src1 and src2 into dst.
fn build_num_sub_checked(
&mut self,