mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Fix repr matching in dev backend
This commit is contained in:
parent
744e8ca68d
commit
741d242486
1 changed files with 7 additions and 6 deletions
|
@ -1393,13 +1393,14 @@ impl<
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_eq(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>) {
|
fn build_eq(&mut self, dst: &Symbol, src1: &Symbol, src2: &Symbol, arg_layout: &InLayout<'a>) {
|
||||||
match self.interner().get(*arg_layout).repr {
|
let repr = self.interner().get(*arg_layout).repr;
|
||||||
|
match repr {
|
||||||
single_register_int_builtins!() | LayoutRepr::BOOL => {
|
single_register_int_builtins!() | LayoutRepr::BOOL => {
|
||||||
let width = match *arg_layout {
|
let width = match repr {
|
||||||
Layout::BOOL | Layout::I8 | Layout::U8 => RegisterWidth::W8,
|
LayoutRepr::BOOL | LayoutRepr::I8 | LayoutRepr::U8 => RegisterWidth::W8,
|
||||||
Layout::I16 | Layout::U16 => RegisterWidth::W16,
|
LayoutRepr::I16 | LayoutRepr::U16 => RegisterWidth::W16,
|
||||||
Layout::U32 | Layout::I32 => RegisterWidth::W32,
|
LayoutRepr::U32 | LayoutRepr::I32 => RegisterWidth::W32,
|
||||||
Layout::I64 | Layout::U64 => RegisterWidth::W64,
|
LayoutRepr::I64 | LayoutRepr::U64 => RegisterWidth::W64,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue