make things compile/run

This commit is contained in:
Folkert 2021-03-09 20:19:34 +01:00
parent 2031488d1a
commit c1d0af5b39
2 changed files with 1 additions and 4 deletions

View file

@ -2492,9 +2492,6 @@ struct SwitchArgsIr<'a, 'ctx> {
} }
fn const_i128<'a, 'ctx, 'env>(env: &Env<'a, 'ctx, 'env>, value: i128) -> IntValue<'ctx> { fn const_i128<'a, 'ctx, 'env>(env: &Env<'a, 'ctx, 'env>, value: i128) -> IntValue<'ctx> {
// TODO verify the order [a, b] is correct for larger numbers when we can parse them
debug_assert!(value <= i64::MAX as i128);
// truncate the lower 64 bits // truncate the lower 64 bits
let value = value as u128; let value = value as u128;
let a = value as u64; let a = value as u64;

View file

@ -520,7 +520,7 @@ impl<
Literal::Int(x) => { Literal::Int(x) => {
let reg = self.claim_general_reg(sym)?; let reg = self.claim_general_reg(sym)?;
let val = *x; let val = *x;
ASM::mov_reg64_imm64(&mut self.buf, reg, val); ASM::mov_reg64_imm64(&mut self.buf, reg, val as i64);
Ok(()) Ok(())
} }
Literal::Float(x) => { Literal::Float(x) => {