mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
fix merge conflict in the dev backend
This commit is contained in:
parent
34340de60c
commit
9897367038
2 changed files with 1 additions and 65 deletions
|
@ -1207,7 +1207,7 @@ impl<
|
|||
.load_to_general_reg(&mut self.buf, src2);
|
||||
ASM::neq_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
Layout::Builtin(Builtin::Str) => {
|
||||
Layout::STR => {
|
||||
self.build_fn_call(
|
||||
dst,
|
||||
bitcode::STR_EQUAL.to_string(),
|
||||
|
@ -1228,38 +1228,6 @@ impl<
|
|||
}
|
||||
}
|
||||
|
||||
fn build_and(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>) {
|
||||
match *arg_layout {
|
||||
Layout::BOOL => {
|
||||
let dst_reg = self.storage_manager.claim_general_reg(&mut self.buf, dst);
|
||||
let src1_reg = self
|
||||
.storage_manager
|
||||
.load_to_general_reg(&mut self.buf, src1);
|
||||
let src2_reg = self
|
||||
.storage_manager
|
||||
.load_to_general_reg(&mut self.buf, src2);
|
||||
ASM::and_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => todo!("And: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
fn build_or(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>) {
|
||||
match *arg_layout {
|
||||
Layout::BOOL => {
|
||||
let dst_reg = self.storage_manager.claim_general_reg(&mut self.buf, dst);
|
||||
let src1_reg = self
|
||||
.storage_manager
|
||||
.load_to_general_reg(&mut self.buf, src1);
|
||||
let src2_reg = self
|
||||
.storage_manager
|
||||
.load_to_general_reg(&mut self.buf, src2);
|
||||
ASM::or_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => todo!("Or: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
fn build_not(&mut self, dst: &Symbol, src: &Symbol, arg_layout: &InLayout<'a>) {
|
||||
match *arg_layout {
|
||||
Layout::BOOL => {
|
||||
|
|
|
@ -661,32 +661,6 @@ trait Backend<'a> {
|
|||
);
|
||||
self.build_neq(sym, &args[0], &args[1], &arg_layouts[0])
|
||||
}
|
||||
LowLevel::And => {
|
||||
debug_assert_eq!(2, args.len(), "And: expected to have exactly two argument");
|
||||
debug_assert_eq!(
|
||||
arg_layouts[0], arg_layouts[1],
|
||||
"And: expected all arguments of to have the same layout"
|
||||
);
|
||||
debug_assert_eq!(
|
||||
Layout::BOOL,
|
||||
*ret_layout,
|
||||
"And: expected to have return layout of type Bool"
|
||||
);
|
||||
self.build_and(sym, &args[0], &args[1], &arg_layouts[0])
|
||||
}
|
||||
LowLevel::Or => {
|
||||
debug_assert_eq!(2, args.len(), "Or: expected to have exactly two argument");
|
||||
debug_assert_eq!(
|
||||
arg_layouts[0], arg_layouts[1],
|
||||
"Or: expected all arguments of to have the same layout"
|
||||
);
|
||||
debug_assert_eq!(
|
||||
Layout::BOOL,
|
||||
*ret_layout,
|
||||
"Or: expected to have return layout of type Bool"
|
||||
);
|
||||
self.build_or(sym, &args[0], &args[1], &arg_layouts[0])
|
||||
}
|
||||
LowLevel::Not => {
|
||||
debug_assert_eq!(1, args.len(), "Not: expected to have exactly one argument");
|
||||
debug_assert_eq!(
|
||||
|
@ -1239,12 +1213,6 @@ trait Backend<'a> {
|
|||
/// build_neq stores the result of `src1 != src2` into dst.
|
||||
fn build_neq(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>);
|
||||
|
||||
/// build_and stores the result of `src1 && src2` into dst.
|
||||
fn build_and(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>);
|
||||
|
||||
/// build_or stores the result of `src1 || src2` into dst.
|
||||
fn build_or(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>);
|
||||
|
||||
/// build_not stores the result of `!src` into dst.
|
||||
fn build_not(&mut self, dst: &Symbol, src: &Symbol, arg_layout: &InLayout<'a>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue