mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
LLVMIRGenerator: fix syscall emission.
This commit is contained in:
parent
6a29775bf0
commit
9fd25a1cc4
@ -793,10 +793,13 @@ class LLVMIRGenerator:
|
|||||||
|
|
||||||
def _prepare_ffi_call(self, insn):
|
def _prepare_ffi_call(self, insn):
|
||||||
llargs = [self.map(arg) for arg in insn.arguments()]
|
llargs = [self.map(arg) for arg in insn.arguments()]
|
||||||
llfunty = ll.FunctionType(self.llty_of_type(insn.type, for_return=True),
|
llfunname = insn.target_function().type.name
|
||||||
[llarg.type for llarg in llargs])
|
llfun = self.llmodule.get_global(llfunname)
|
||||||
llfun = ll.Function(self.llmodule, llfunty,
|
if llfun is None:
|
||||||
insn.target_function().type.name)
|
llfunty = ll.FunctionType(self.llty_of_type(insn.type, for_return=True),
|
||||||
|
[llarg.type for llarg in llargs])
|
||||||
|
llfun = ll.Function(self.llmodule, llfunty,
|
||||||
|
insn.target_function().type.name)
|
||||||
return llfun, list(llargs)
|
return llfun, list(llargs)
|
||||||
|
|
||||||
# See session.c:{send,receive}_rpc_value and comm_generic.py:_{send,receive}_rpc_value.
|
# See session.c:{send,receive}_rpc_value and comm_generic.py:_{send,receive}_rpc_value.
|
||||||
|
Loading…
Reference in New Issue
Block a user