[artiq] WIP

This commit is contained in:
David Mak 2024-08-15 13:18:35 +08:00
parent c3b7aa6386
commit 9a87373b48
1 changed files with 21 additions and 20 deletions

View File

@ -647,26 +647,27 @@ fn format_rpc_ret<'ctx>(
.unwrap())
},
|generator, ctx| {
let data_addr = phi.as_basic_value().into_pointer_value();
let data_addr = ctx
.builder
.build_load(
ctx.builder
.build_bitcast(data_addr, llvm_ppi8, "")
.map(BasicValueEnum::into_pointer_value)
.unwrap(),
"",
)
.map(BasicValueEnum::into_pointer_value)
.unwrap();
call_memcpy_generic(
ctx,
ndarray.ptr_to_data(ctx),
data_addr,
llvm_pdata_sizeof,
llvm_i1.const_zero(),
);
// let data_addr = phi.as_basic_value().into_pointer_value();
// let data_addr = ctx
// .builder
// .build_load(
// ctx.builder
// .build_bitcast(data_addr, llvm_ppi8, "")
// .map(BasicValueEnum::into_pointer_value)
// .unwrap(),
// "",
// )
// .map(BasicValueEnum::into_pointer_value)
// .unwrap();
//
// call_memcpy_generic(
// ctx,
// ndarray.ptr_to_data(ctx),
// data_addr,
// llvm_pdata_sizeof,
// llvm_i1.const_zero(),
// );
call_memcpy_generic(ctx, ndarray.ptr_to_data(ctx), phi.as_basic_value().into_pointer_value(), llvm_pdata_sizeof, llvm_i1.const_zero());
let pbuffer_dims_begin = unsafe {
buffer.ptr_offset_unchecked(ctx, generator, &llvm_pdata_sizeof, None)