mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
Switch dev backend from unimplemented! to todo!
This commit is contained in:
parent
1ce648ac27
commit
7abbf3a043
5 changed files with 83 additions and 116 deletions
|
@ -154,7 +154,7 @@ impl CallConv<AArch64GeneralReg, AArch64FloatReg> for AArch64Call {
|
|||
}
|
||||
#[inline(always)]
|
||||
fn float_callee_saved(_reg: &AArch64FloatReg) -> bool {
|
||||
unimplemented!("AArch64 FloatRegs not implemented yet");
|
||||
todo!("AArch64 FloatRegs");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -254,7 +254,7 @@ impl CallConv<AArch64GeneralReg, AArch64FloatReg> for AArch64Call {
|
|||
_ret_layout: &Layout<'a>,
|
||||
mut _stack_size: u32,
|
||||
) -> u32 {
|
||||
unimplemented!("Loading args not yet implemented for AArch64");
|
||||
todo!("Loading args for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -265,7 +265,7 @@ impl CallConv<AArch64GeneralReg, AArch64FloatReg> for AArch64Call {
|
|||
_arg_layouts: &[Layout<'a>],
|
||||
_ret_layout: &Layout<'a>,
|
||||
) -> u32 {
|
||||
unimplemented!("Storing args not yet implemented for AArch64");
|
||||
todo!("Storing args for AArch64");
|
||||
}
|
||||
|
||||
fn return_struct<'a>(
|
||||
|
@ -275,18 +275,18 @@ impl CallConv<AArch64GeneralReg, AArch64FloatReg> for AArch64Call {
|
|||
_field_layouts: &[Layout<'a>],
|
||||
_ret_reg: Option<AArch64GeneralReg>,
|
||||
) {
|
||||
unimplemented!("Returning structs not yet implemented for AArch64");
|
||||
todo!("Returning structs for AArch64");
|
||||
}
|
||||
|
||||
fn returns_via_arg_pointer(_ret_layout: &Layout) -> bool {
|
||||
unimplemented!("Returning via arg pointer not yet implemented for AArch64");
|
||||
todo!("Returning via arg pointer for AArch64");
|
||||
}
|
||||
}
|
||||
|
||||
impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
||||
#[inline(always)]
|
||||
fn abs_reg64_reg64(_buf: &mut Vec<'_, u8>, _dst: AArch64GeneralReg, _src: AArch64GeneralReg) {
|
||||
unimplemented!("abs_reg64_reg64 is not yet implement for AArch64");
|
||||
todo!("abs_reg64_reg64 for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -296,7 +296,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_src: AArch64FloatReg,
|
||||
) {
|
||||
unimplemented!("abs_reg64_reg64 is not yet implement for AArch64");
|
||||
todo!("abs_reg64_reg64 for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -307,13 +307,11 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
imm32: i32,
|
||||
) {
|
||||
if imm32 < 0 {
|
||||
unimplemented!("immediate addition with values less than 0 are not yet implemented");
|
||||
todo!("immediate addition with values less than 0");
|
||||
} else if imm32 < 0xFFF {
|
||||
add_reg64_reg64_imm12(buf, dst, src, imm32 as u16);
|
||||
} else {
|
||||
unimplemented!(
|
||||
"immediate additions with values greater than 12bits are not yet implemented"
|
||||
);
|
||||
todo!("immediate additions with values greater than 12bits");
|
||||
}
|
||||
}
|
||||
#[inline(always)]
|
||||
|
@ -332,12 +330,12 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64FloatReg,
|
||||
_src2: AArch64FloatReg,
|
||||
) {
|
||||
unimplemented!("adding floats not yet implemented for AArch64");
|
||||
todo!("adding floats for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn call(_buf: &mut Vec<'_, u8>, _relocs: &mut Vec<'_, Relocation>, _fn_name: String) {
|
||||
unimplemented!("calling functions literal not yet implemented for AArch64");
|
||||
todo!("calling functions literal for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -347,12 +345,12 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64GeneralReg,
|
||||
_src2: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("register multiplication not implemented yet for AArch64");
|
||||
todo!("register multiplication for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn jmp_imm32(_buf: &mut Vec<'_, u8>, _offset: i32) -> usize {
|
||||
unimplemented!("jump instructions not yet implemented for AArch64");
|
||||
todo!("jump instructions for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -368,7 +366,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_imm: u64,
|
||||
_offset: i32,
|
||||
) -> usize {
|
||||
unimplemented!("jump not equal instructions not yet implemented for AArch64");
|
||||
todo!("jump not equal instructions for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -378,7 +376,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_imm: f32,
|
||||
) {
|
||||
unimplemented!("loading f32 literal not yet implemented for AArch64");
|
||||
todo!("loading f32 literal for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_freg64_imm64(
|
||||
|
@ -387,7 +385,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_imm: f64,
|
||||
) {
|
||||
unimplemented!("loading f64 literal not yet implemented for AArch64");
|
||||
todo!("loading f64 literal for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_reg64_imm64(buf: &mut Vec<'_, u8>, dst: AArch64GeneralReg, imm: i64) {
|
||||
|
@ -408,7 +406,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
}
|
||||
#[inline(always)]
|
||||
fn mov_freg64_freg64(_buf: &mut Vec<'_, u8>, _dst: AArch64FloatReg, _src: AArch64FloatReg) {
|
||||
unimplemented!("moving data between float registers not yet implemented for AArch64");
|
||||
todo!("moving data between float registers for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_reg64_reg64(buf: &mut Vec<'_, u8>, dst: AArch64GeneralReg, src: AArch64GeneralReg) {
|
||||
|
@ -417,70 +415,68 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
|
||||
#[inline(always)]
|
||||
fn mov_freg64_base32(_buf: &mut Vec<'_, u8>, _dst: AArch64FloatReg, _offset: i32) {
|
||||
unimplemented!(
|
||||
"loading floating point reg from base offset not yet implemented for AArch64"
|
||||
);
|
||||
todo!("loading floating point reg from base offset for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_reg64_base32(buf: &mut Vec<'_, u8>, dst: AArch64GeneralReg, offset: i32) {
|
||||
if offset < 0 {
|
||||
unimplemented!("negative base offsets are not yet implement for AArch64");
|
||||
todo!("negative base offsets for AArch64");
|
||||
} else if offset < (0xFFF << 8) {
|
||||
debug_assert!(offset % 8 == 0);
|
||||
ldr_reg64_imm12(buf, dst, AArch64GeneralReg::FP, (offset as u16) >> 3);
|
||||
} else {
|
||||
unimplemented!("base offsets over 32k are not yet implement for AArch64");
|
||||
todo!("base offsets over 32k for AArch64");
|
||||
}
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_base32_freg64(_buf: &mut Vec<'_, u8>, _offset: i32, _src: AArch64FloatReg) {
|
||||
unimplemented!("saving floating point reg to base offset not yet implemented for AArch64");
|
||||
todo!("saving floating point reg to base offset for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_base32_reg64(buf: &mut Vec<'_, u8>, offset: i32, src: AArch64GeneralReg) {
|
||||
if offset < 0 {
|
||||
unimplemented!("negative base offsets are not yet implement for AArch64");
|
||||
todo!("negative base offsets for AArch64");
|
||||
} else if offset < (0xFFF << 8) {
|
||||
debug_assert!(offset % 8 == 0);
|
||||
str_reg64_imm12(buf, src, AArch64GeneralReg::FP, (offset as u16) >> 3);
|
||||
} else {
|
||||
unimplemented!("base offsets over 32k are not yet implement for AArch64");
|
||||
todo!("base offsets over 32k for AArch64");
|
||||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn mov_freg64_stack32(_buf: &mut Vec<'_, u8>, _dst: AArch64FloatReg, _offset: i32) {
|
||||
unimplemented!("loading floating point reg from stack not yet implemented for AArch64");
|
||||
todo!("loading floating point reg from stack for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_reg64_stack32(buf: &mut Vec<'_, u8>, dst: AArch64GeneralReg, offset: i32) {
|
||||
if offset < 0 {
|
||||
unimplemented!("negative stack offsets are not yet implement for AArch64");
|
||||
todo!("negative stack offsets for AArch64");
|
||||
} else if offset < (0xFFF << 8) {
|
||||
debug_assert!(offset % 8 == 0);
|
||||
ldr_reg64_imm12(buf, dst, AArch64GeneralReg::ZRSP, (offset as u16) >> 3);
|
||||
} else {
|
||||
unimplemented!("stack offsets over 32k are not yet implement for AArch64");
|
||||
todo!("stack offsets over 32k for AArch64");
|
||||
}
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_stack32_freg64(_buf: &mut Vec<'_, u8>, _offset: i32, _src: AArch64FloatReg) {
|
||||
unimplemented!("saving floating point reg to stack not yet implemented for AArch64");
|
||||
todo!("saving floating point reg to stack for AArch64");
|
||||
}
|
||||
#[inline(always)]
|
||||
fn mov_stack32_reg64(buf: &mut Vec<'_, u8>, offset: i32, src: AArch64GeneralReg) {
|
||||
if offset < 0 {
|
||||
unimplemented!("negative stack offsets are not yet implement for AArch64");
|
||||
todo!("negative stack offsets for AArch64");
|
||||
} else if offset < (0xFFF << 8) {
|
||||
debug_assert!(offset % 8 == 0);
|
||||
str_reg64_imm12(buf, src, AArch64GeneralReg::ZRSP, (offset as u16) >> 3);
|
||||
} else {
|
||||
unimplemented!("stack offsets over 32k are not yet implement for AArch64");
|
||||
todo!("stack offsets over 32k for AArch64");
|
||||
}
|
||||
}
|
||||
#[inline(always)]
|
||||
fn neg_reg64_reg64(_buf: &mut Vec<'_, u8>, _dst: AArch64GeneralReg, _src: AArch64GeneralReg) {
|
||||
unimplemented!("neg is not yet implement for AArch64");
|
||||
todo!("neg for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -491,15 +487,11 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
imm32: i32,
|
||||
) {
|
||||
if imm32 < 0 {
|
||||
unimplemented!(
|
||||
"immediate subtractions with values less than 0 are not yet implemented"
|
||||
);
|
||||
todo!("immediate subtractions with values less than 0");
|
||||
} else if imm32 < 0xFFF {
|
||||
sub_reg64_reg64_imm12(buf, dst, src, imm32 as u16);
|
||||
} else {
|
||||
unimplemented!(
|
||||
"immediate subtractions with values greater than 12bits are not yet implemented"
|
||||
);
|
||||
todo!("immediate subtractions with values greater than 12bits");
|
||||
}
|
||||
}
|
||||
#[inline(always)]
|
||||
|
@ -509,7 +501,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64GeneralReg,
|
||||
_src2: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers subtractions not implemented yet for AArch64");
|
||||
todo!("registers subtractions for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -519,7 +511,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64GeneralReg,
|
||||
_src2: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers equality not implemented yet for AArch64");
|
||||
todo!("registers equality for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -529,7 +521,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64GeneralReg,
|
||||
_src2: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers non-equality not implemented yet for AArch64");
|
||||
todo!("registers non-equality for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -539,7 +531,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64GeneralReg,
|
||||
_src2: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers less than not implemented yet for AArch64");
|
||||
todo!("registers less than for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -548,7 +540,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_src: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers to float not implemented yet for AArch64");
|
||||
todo!("registers to float for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -557,7 +549,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_src: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers to float not implemented yet for AArch64");
|
||||
todo!("registers to float for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -566,7 +558,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_src: AArch64FloatReg,
|
||||
) {
|
||||
unimplemented!("registers to float not implemented yet for AArch64");
|
||||
todo!("registers to float for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -575,7 +567,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_dst: AArch64FloatReg,
|
||||
_src: AArch64FloatReg,
|
||||
) {
|
||||
unimplemented!("registers to float not implemented yet for AArch64");
|
||||
todo!("registers to float for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
@ -585,7 +577,7 @@ impl Assembler<AArch64GeneralReg, AArch64FloatReg> for AArch64Assembler {
|
|||
_src1: AArch64GeneralReg,
|
||||
_src2: AArch64GeneralReg,
|
||||
) {
|
||||
unimplemented!("registers greater than or equal not implemented yet for AArch64");
|
||||
todo!("registers greater than or equal for AArch64");
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
|
@ -572,7 +572,7 @@ impl<
|
|||
Layout::Builtin(Builtin::Str) => {
|
||||
if CC::returns_via_arg_pointer(ret_layout) {
|
||||
// This will happen on windows, return via pointer here.
|
||||
unimplemented!("FnCall: Returning strings via pointer not yet implemented");
|
||||
todo!("FnCall: Returning strings via pointer");
|
||||
} else {
|
||||
let offset = self.claim_stack_size(16);
|
||||
self.symbol_storage_map.insert(
|
||||
|
@ -590,10 +590,7 @@ impl<
|
|||
Layout::Struct([]) => {
|
||||
// Nothing needs to be done to load a returned empty struct.
|
||||
}
|
||||
x => unimplemented!(
|
||||
"FnCall: receiving return type, {:?}, is not yet implemented",
|
||||
x
|
||||
),
|
||||
x => todo!("FnCall: receiving return type, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -637,10 +634,7 @@ impl<
|
|||
self.buf[jne_location + i] = *byte;
|
||||
}
|
||||
} else {
|
||||
unimplemented!(
|
||||
"Switch: branch info, {:?}, is not yet implemented",
|
||||
branch_info
|
||||
);
|
||||
todo!("Switch: branch info, {:?}", branch_info);
|
||||
}
|
||||
}
|
||||
let (branch_info, stmt) = default_branch;
|
||||
|
@ -658,10 +652,7 @@ impl<
|
|||
);
|
||||
}
|
||||
} else {
|
||||
unimplemented!(
|
||||
"Switch: branch info, {:?}, is not yet implemented",
|
||||
branch_info
|
||||
);
|
||||
todo!("Switch: branch info, {:?}", branch_info);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -803,7 +794,7 @@ impl<
|
|||
let src_reg = self.load_to_float_reg(src);
|
||||
ASM::abs_freg64_freg64(&mut self.buf, &mut self.relocs, dst_reg, src_reg);
|
||||
}
|
||||
x => unimplemented!("NumAbs: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumAbs: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -821,7 +812,7 @@ impl<
|
|||
let src2_reg = self.load_to_float_reg(src2);
|
||||
ASM::add_freg64_freg64_freg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumAdd: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumAdd: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -833,7 +824,7 @@ impl<
|
|||
let src2_reg = self.load_to_general_reg(src2);
|
||||
ASM::imul_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumMul: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumMul: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -844,7 +835,7 @@ impl<
|
|||
let src_reg = self.load_to_general_reg(src);
|
||||
ASM::neg_reg64_reg64(&mut self.buf, dst_reg, src_reg);
|
||||
}
|
||||
x => unimplemented!("NumNeg: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumNeg: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -856,7 +847,7 @@ impl<
|
|||
let src2_reg = self.load_to_general_reg(src2);
|
||||
ASM::sub_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumSub: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumSub: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -868,7 +859,7 @@ impl<
|
|||
let src2_reg = self.load_to_general_reg(src2);
|
||||
ASM::eq_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumEq: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumEq: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -880,7 +871,7 @@ impl<
|
|||
let src2_reg = self.load_to_general_reg(src2);
|
||||
ASM::neq_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumNeq: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumNeq: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -898,7 +889,7 @@ impl<
|
|||
let src2_reg = self.load_to_general_reg(src2);
|
||||
ASM::lt_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumLt: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumLt: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -953,11 +944,7 @@ impl<
|
|||
let src_reg = self.load_to_float_reg(src);
|
||||
ASM::mov_freg64_freg64(&mut self.buf, dst_reg, src_reg);
|
||||
}
|
||||
(a, r) => unimplemented!(
|
||||
"NumToFloat: layout, arg {:?}, ret {:?}, not implemented yet",
|
||||
a,
|
||||
r
|
||||
),
|
||||
(a, r) => todo!("NumToFloat: layout, arg {:?}, ret {:?}", a, r),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -975,7 +962,7 @@ impl<
|
|||
let src2_reg = self.load_to_general_reg(src2);
|
||||
ASM::gte_reg64_reg64_reg64(&mut self.buf, dst_reg, src1_reg, src2_reg);
|
||||
}
|
||||
x => unimplemented!("NumGte: layout, {:?}, not implemented yet", x),
|
||||
x => todo!("NumGte: layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1115,7 +1102,7 @@ impl<
|
|||
ASM::mov_reg64_imm64(&mut self.buf, reg, num);
|
||||
ASM::mov_base32_reg64(&mut self.buf, offset + 8, reg);
|
||||
}
|
||||
x => unimplemented!("loading literal, {:?}, is not yet implemented", x),
|
||||
x => todo!("loading literal, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1236,7 +1223,7 @@ impl<
|
|||
Layout::Builtin(Builtin::Str) => {
|
||||
if self.symbol_storage_map.contains_key(&Symbol::RET_POINTER) {
|
||||
// This will happen on windows, return via pointer here.
|
||||
unimplemented!("Returning strings via pointer not yet implemented");
|
||||
todo!("Returning strings via pointer");
|
||||
} else {
|
||||
ASM::mov_reg64_base32(&mut self.buf, CC::GENERAL_RETURN_REGS[0], *offset);
|
||||
ASM::mov_reg64_base32(
|
||||
|
@ -1259,12 +1246,9 @@ impl<
|
|||
CC::return_struct(&mut self.buf, offset, size, field_layouts, ret_reg);
|
||||
}
|
||||
}
|
||||
x => unimplemented!(
|
||||
"returning symbol with layout, {:?}, is not yet implemented",
|
||||
x
|
||||
),
|
||||
x => todo!("returning symbol with layout, {:?}", x),
|
||||
},
|
||||
Some(x) => unimplemented!("returning symbol storage, {:?}, is not yet implemented", x),
|
||||
Some(x) => todo!("returning symbol storage, {:?}", x),
|
||||
None if layout == &Layout::Struct(&[]) => {
|
||||
// Empty struct is not defined and does nothing.
|
||||
}
|
||||
|
@ -1596,10 +1580,7 @@ impl<
|
|||
internal_error!("unknown struct: {:?}", sym);
|
||||
}
|
||||
}
|
||||
x => unimplemented!(
|
||||
"copying data to the stack with layout, {:?}, not implemented yet",
|
||||
x
|
||||
),
|
||||
x => todo!("copying data to the stack with layout, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -265,12 +265,12 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64SystemV {
|
|||
);
|
||||
general_i += 2;
|
||||
} else {
|
||||
unimplemented!("loading strings args on the stack is not yet implemented");
|
||||
todo!("loading strings args on the stack");
|
||||
}
|
||||
}
|
||||
Layout::Struct(&[]) => {}
|
||||
x => {
|
||||
unimplemented!("Loading args with layout {:?} not yet implemented", x);
|
||||
todo!("Loading args with layout {:?}", x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64SystemV {
|
|||
// Nothing needs to be done for any of these cases.
|
||||
}
|
||||
x => {
|
||||
unimplemented!("receiving return type, {:?}, is not yet implemented", x);
|
||||
todo!("receiving return type, {:?}", x);
|
||||
}
|
||||
}
|
||||
for (i, layout) in arg_layouts.iter().enumerate() {
|
||||
|
@ -426,14 +426,12 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64SystemV {
|
|||
}
|
||||
general_i += 2;
|
||||
} else {
|
||||
unimplemented!(
|
||||
"calling functions with strings on the stack is not yet implemented"
|
||||
);
|
||||
todo!("calling functions with strings on the stack");
|
||||
}
|
||||
}
|
||||
Layout::Struct(&[]) => {}
|
||||
x => {
|
||||
unimplemented!("calling with arg type, {:?}, is not yet implemented", x);
|
||||
todo!("calling with arg type, {:?}", x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -447,7 +445,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64SystemV {
|
|||
_field_layouts: &[Layout<'a>],
|
||||
_ret_reg: Option<X86_64GeneralReg>,
|
||||
) {
|
||||
unimplemented!("Returning structs not yet implemented for X86_64");
|
||||
todo!("Returning structs for X86_64");
|
||||
}
|
||||
|
||||
fn returns_via_arg_pointer(ret_layout: &Layout) -> bool {
|
||||
|
@ -603,20 +601,18 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
}
|
||||
Layout::Builtin(Builtin::Str) => {
|
||||
// I think this just needs to be passed on the stack, so not a huge deal.
|
||||
unimplemented!(
|
||||
"Passing str args with Windows fast call not yet implemented."
|
||||
);
|
||||
todo!("Passing str args with Windows fast call");
|
||||
}
|
||||
Layout::Struct(&[]) => {}
|
||||
x => {
|
||||
unimplemented!("Loading args with layout {:?} not yet implemented", x);
|
||||
todo!("Loading args with layout {:?}", x);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
arg_offset += match layout {
|
||||
single_register_builtins!() => 8,
|
||||
x => {
|
||||
unimplemented!("Loading args with layout {:?} not yet implemented", x);
|
||||
todo!("Loading args with layout {:?}", x);
|
||||
}
|
||||
};
|
||||
symbol_map.insert(
|
||||
|
@ -648,7 +644,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
// Nothing needs to be done for any of these cases.
|
||||
}
|
||||
x => {
|
||||
unimplemented!("receiving return type, {:?}, is not yet implemented", x);
|
||||
todo!("receiving return type, {:?}", x);
|
||||
}
|
||||
}
|
||||
for (i, layout) in arg_layouts.iter().enumerate() {
|
||||
|
@ -722,7 +718,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
}
|
||||
SymbolStorage::GeneralReg(_)
|
||||
| SymbolStorage::BaseAndGeneralReg { .. } => {
|
||||
unimplemented!("Cannot load general symbol into FloatReg")
|
||||
internal_error!("Cannot load general symbol into FloatReg")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -747,7 +743,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
}
|
||||
SymbolStorage::GeneralReg(_)
|
||||
| SymbolStorage::BaseAndGeneralReg { .. } => {
|
||||
unimplemented!("Cannot load general symbol into FloatReg")
|
||||
internal_error!("Cannot load general symbol into FloatReg")
|
||||
}
|
||||
}
|
||||
stack_offset += 8;
|
||||
|
@ -755,11 +751,11 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
}
|
||||
Layout::Builtin(Builtin::Str) => {
|
||||
// I think this just needs to be passed on the stack, so not a huge deal.
|
||||
unimplemented!("Passing str args with Windows fast call not yet implemented.");
|
||||
todo!("Passing str args with Windows fast call");
|
||||
}
|
||||
Layout::Struct(&[]) => {}
|
||||
x => {
|
||||
unimplemented!("calling with arg type, {:?}, is not yet implemented", x);
|
||||
todo!("calling with arg type, {:?}", x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -773,7 +769,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg> for X86_64WindowsFastcall {
|
|||
_field_layouts: &[Layout<'a>],
|
||||
_ret_reg: Option<X86_64GeneralReg>,
|
||||
) {
|
||||
unimplemented!("Returning structs not yet implemented for X86_64WindowsFastCall");
|
||||
todo!("Returning structs for X86_64WindowsFastCall");
|
||||
}
|
||||
|
||||
fn returns_via_arg_pointer(ret_layout: &Layout) -> bool {
|
||||
|
@ -977,9 +973,7 @@ impl Assembler<X86_64GeneralReg, X86_64FloatReg> for X86_64Assembler {
|
|||
) -> usize {
|
||||
buf.reserve(13);
|
||||
if imm > i32::MAX as u64 {
|
||||
unimplemented!(
|
||||
"comparison with values greater than i32::max not yet implemented for jne"
|
||||
);
|
||||
todo!("comparison with values greater than i32::max");
|
||||
}
|
||||
cmp_reg64_imm32(buf, reg, imm as i32);
|
||||
jne_imm32(buf, offset);
|
||||
|
|
|
@ -209,7 +209,7 @@ trait Backend<'a> {
|
|||
self.build_jump(id, args, arg_layouts.into_bump_slice(), ret_layout);
|
||||
self.free_symbols(stmt);
|
||||
}
|
||||
x => unimplemented!("the statement, {:?}, is not yet implemented", x),
|
||||
x => todo!("the statement, {:?}", x),
|
||||
}
|
||||
}
|
||||
// build_switch generates a instructions for a switch statement.
|
||||
|
@ -309,7 +309,7 @@ trait Backend<'a> {
|
|||
layout,
|
||||
)
|
||||
}
|
||||
x => unimplemented!("the call type, {:?}, is not yet implemented", x),
|
||||
x => todo!("the call type, {:?}", x),
|
||||
}
|
||||
}
|
||||
Expr::Struct(fields) => {
|
||||
|
@ -323,7 +323,7 @@ trait Backend<'a> {
|
|||
} => {
|
||||
self.load_struct_at_index(sym, structure, *index, field_layouts);
|
||||
}
|
||||
x => unimplemented!("the expression, {:?}, is not yet implemented", x),
|
||||
x => todo!("the expression, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -556,7 +556,7 @@ trait Backend<'a> {
|
|||
arg_layouts,
|
||||
ret_layout,
|
||||
),
|
||||
x => unimplemented!("low level, {:?}. is not yet implemented", x),
|
||||
x => todo!("low level, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -587,7 +587,7 @@ trait Backend<'a> {
|
|||
self.build_eq(sym, &args[0], &Symbol::DEV_TMP, &arg_layouts[0]);
|
||||
self.free_symbol(&Symbol::DEV_TMP)
|
||||
}
|
||||
_ => unimplemented!("the function, {:?}, is not yet implemented", func_sym),
|
||||
_ => todo!("the function, {:?}", func_sym),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ pub fn build_module<'a>(
|
|||
),
|
||||
)
|
||||
}
|
||||
x => unimplemented!("the target, {:?}, is not yet implemented", x),
|
||||
x => todo!("the target, {:?}", x),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ fn generate_wrapper<'a, B: Backend<'a>>(
|
|||
Err(e) => internal_error!("{:?}", e),
|
||||
}
|
||||
} else {
|
||||
unimplemented!("failed to find fn symbol for {:?}", wraps);
|
||||
internal_error!("failed to find fn symbol for {:?}", wraps);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue