search for: func_ty

Displaying 2 results from an estimated 2 matches for "func_ty".

2017 Jun 21
2
question about llvmlite
...as follows: from ctypes import CFUNCTYPE, c_intimport archinfoimport llvmlite.ir as llimport llvmlite.binding as llvmimport pyvex CODE = b"\x55\x48\x8b\x05\xb8\x13\x00\x00"mehran = -100 llvm.initialize()llvm.initialize_native_target()llvm.initialize_native_asmprinter() module = ll.Module()func_ty = ll.FunctionType(ll.VoidType(), [])func = ll.Function(module, func_ty, name='read_instructions')a = func.argsbb_entry = func.append_basic_block('entry')irbuilder = ll.IRBuilder(bb_entry)int_type = ll.IntType(64);irsb = pyvex.block.IRSB(CODE, 0x400400, archinfo.ArchAMD64()) for stm...
2012 Mar 28
0
[LLVMdev] GSoC 2012 Proposal: Python bindings for LLVM
...unction.new(self, ty, name)* This method calls the constructor of class "*Function*" (Function.new). So let’s take a look at what this constructor is? It is also defined in the file *core.py* in llvm-py as the following: *class Function(GlobalValue): @staticmethod def new(module, func_ty, name): check_is_module(module) check_is_type(func_ty) return _make_value(_core.LLVMAddFunction(module.ptr, name, func_ty.ptr))* The most important statement in the above constructor is: *_core.LLVMAddFunction(module.ptr, name, func_ty.ptr) * If you are familiar w...