Update fmt and use of memcpy
I'm still not totally sure if this is the right way to implement the memcpy, but that portion compiles correctly now. Now to fix the compile errors everywhere else :).
This commit is contained in:
@@ -120,15 +120,20 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
||||
ref dst,
|
||||
ref size,
|
||||
}) => {
|
||||
bx.memcpy(
|
||||
dst,
|
||||
todo!(),
|
||||
src,
|
||||
todo!(),
|
||||
size,
|
||||
todo!(),
|
||||
);
|
||||
bx
|
||||
let dst_val = self.codegen_place(&mut bx, dst.as_ref());
|
||||
let src_val = self.codegen_place(&mut bx, src.as_ref());
|
||||
let size_val = self.codegen_operand(&mut bx, size);
|
||||
let size = size_val.immediate_or_packed_pair(&mut bx);
|
||||
bx.memcpy(
|
||||
dst_val.llval,
|
||||
dst_val.align,
|
||||
src_val.llval,
|
||||
src_val.align,
|
||||
size,
|
||||
// TODO probably want to have this change based on alignment above?
|
||||
crate::MemFlags::empty(),
|
||||
);
|
||||
bx
|
||||
}
|
||||
mir::StatementKind::FakeRead(..)
|
||||
| mir::StatementKind::Retag { .. }
|
||||
|
||||
Reference in New Issue
Block a user