change to 64 bit pointers. May be an issue. revert this commit if issues arise

This commit is contained in:
2025-10-26 15:00:53 +05:30
parent 93285dbdd8
commit a1fe2ed4bc
3 changed files with 14 additions and 14 deletions

View File

@ -39,7 +39,7 @@ def finalize_module(original_str):
def bpf_passthrough_gen(module):
i32_ty = ir.IntType(32)
ptr_ty = ir.PointerType(ir.IntType(8))
ptr_ty = ir.PointerType(ir.IntType(64))
fnty = ir.FunctionType(ptr_ty, [i32_ty, ptr_ty])
# Declare the intrinsic
@ -158,7 +158,6 @@ def compile_to_ir(filename: str, output: str, loglevel=logging.INFO):
module.add_named_metadata("llvm.ident", [f"PythonBPF {VERSION}"])
module_string: str = finalize_module(str(module))
module_string += '\ndeclare ptr @llvm.preserve.struct.access.index.p0.p0(ptr, i32 immarg, i32 immarg) "nocallback" "nofree" "nosync" "nounwind" "willreturn" "memory(none)"'
logger.info(f"IR written to {output}")
with open(output, "w") as f: