mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
encode Bool.true/Bool.false more intelligently
This commit is contained in:
parent
3b28e897c3
commit
1947bbcd0e
2 changed files with 2 additions and 3 deletions
|
@ -2263,8 +2263,7 @@ impl<
|
|||
}
|
||||
(Literal::Bool(x), Layout::Builtin(Builtin::Bool)) => {
|
||||
let reg = self.storage_manager.claim_general_reg(&mut self.buf, sym);
|
||||
let val = [*x as u8; 16];
|
||||
ASM::mov_reg64_imm64(&mut self.buf, reg, i128::from_ne_bytes(val) as i64);
|
||||
ASM::mov_reg64_imm64(&mut self.buf, reg, *x as i64);
|
||||
}
|
||||
(Literal::Float(x), Layout::Builtin(Builtin::Float(FloatWidth::F64))) => {
|
||||
let reg = self.storage_manager.claim_float_reg(&mut self.buf, sym);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue