mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
change to 64 bit pointers. May be an issue. revert this commit if issues arise
This commit is contained in:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user