This commit is contained in:
Folkert 2023-07-26 23:15:47 +02:00
parent f59eed6366
commit bb97b9ff74
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 30 additions and 59 deletions

View file

@ -456,15 +456,15 @@ impl CallConv<AArch64GeneralReg, AArch64FloatReg, AArch64Assembler> for AArch64C
todo!("Loading returned complex symbols for AArch64");
}
fn setjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn setjmp(_buf: &mut Vec<'_, u8>) {
todo!()
}
fn longjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn longjmp(_buf: &mut Vec<'_, u8>) {
todo!()
}
fn roc_panic(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn roc_panic(_buf: &mut Vec<'_, u8>, _relocs: &mut Vec<'_, Relocation>) {
todo!()
}
}

View file

@ -135,8 +135,8 @@ pub trait CallConv<GeneralReg: RegTrait, FloatReg: RegTrait, ASM: Assembler<Gene
layout: &InLayout<'a>,
);
fn setjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>);
fn longjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>);
fn setjmp(buf: &mut Vec<'_, u8>);
fn longjmp(buf: &mut Vec<'_, u8>);
fn roc_panic(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>);
}
@ -904,7 +904,7 @@ impl<
fn build_roc_setjmp(&mut self) -> &'a [u8] {
let mut out = bumpalo::vec![in self.env.arena];
CC::setjmp(&mut out, &mut self.relocs);
CC::setjmp(&mut out);
out.into_bump_slice()
}
@ -912,7 +912,7 @@ impl<
fn build_roc_longjmp(&mut self) -> &'a [u8] {
let mut out = bumpalo::vec![in self.env.arena];
CC::longjmp(&mut out, &mut self.relocs);
CC::longjmp(&mut out);
out.into_bump_slice()
}

View file

@ -704,7 +704,6 @@ impl<
}
} else {
// This is a single element struct. Just copy the single field to the stack.
dbg!(sym, layout);
debug_assert_eq!(fields.len(), 1);
self.copy_symbol_to_stack_offset(
layout_interner,
@ -816,7 +815,6 @@ impl<
self.copy_to_stack_offset(buf, size, from_offset, to_offset)
}
Builtin::Str | Builtin::List(_) => {
dbg!(sym);
let (from_offset, size) = self.stack_offset_and_size(sym);
debug_assert_eq!(size, layout_interner.stack_size(*layout));
self.copy_to_stack_offset(buf, size, from_offset, to_offset)

View file

@ -437,7 +437,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Syste
}
}
fn setjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn setjmp(buf: &mut Vec<'_, u8>) {
use X86_64GeneralReg::*;
type ASM = X86_64Assembler;
@ -491,7 +491,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Syste
ASM::ret(buf)
}
fn longjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn longjmp(buf: &mut Vec<'_, u8>) {
use X86_64GeneralReg::*;
type ASM = X86_64Assembler;
@ -544,7 +544,7 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Syste
ASM::mov_mem64_offset32_reg64(buf, RSI, offset, R9);
}
Self::longjmp(buf, relocs)
Self::longjmp(buf)
}
}
@ -1134,15 +1134,15 @@ impl CallConv<X86_64GeneralReg, X86_64FloatReg, X86_64Assembler> for X86_64Windo
todo!("Loading returned complex symbols for X86_64");
}
fn setjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn setjmp(_buf: &mut Vec<'_, u8>) {
todo!()
}
fn longjmp(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn longjmp(_buf: &mut Vec<'_, u8>) {
todo!()
}
fn roc_panic(buf: &mut Vec<'_, u8>, relocs: &mut Vec<'_, Relocation>) {
fn roc_panic(_buf: &mut Vec<'_, u8>, _relocs: &mut Vec<'_, Relocation>) {
todo!()
}
}
@ -2752,7 +2752,7 @@ fn jmp_reg64_offset8(buf: &mut Vec<'_, u8>, base: X86_64GeneralReg, offset: i8)
let rex = add_rm_extension(base, REX_W);
#[allow(clippy::unusual_byte_groupings)]
buf.extend([rex, 0xff, 0b01_100_000 | base as u8 % 8]);
buf.extend([rex, 0xff, 0b01_100_000 | (base as u8 % 8)]);
// Using RSP or R12 requires a secondary index byte.
if base == X86_64GeneralReg::RSP || base == X86_64GeneralReg::R12 {
@ -3077,16 +3077,6 @@ fn mov_reg_base_offset32(
buf.extend(offset.to_le_bytes());
}
#[inline(always)]
fn mov_reg64_offset32_reg64(
buf: &mut Vec<'_, u8>,
dst: X86_64GeneralReg,
offset: i32,
src: X86_64GeneralReg,
) {
todo!()
}
/// `MOV r64,r/m64` -> Move r/m64 to r64, where m64 references a base + offset.
#[inline(always)]
fn mov_reg64_base64_offset32(