devices/runtime: use new py2llvm methods

This commit is contained in:
Sebastien Bourdeauducq 2014-09-09 21:02:38 +08:00
parent eec52a2e29
commit 8aa69cb959

View File

@ -57,7 +57,7 @@ class LinkInterface:
def syscall(self, syscall_name, args, builder):
r = _chr_to_value[_syscalls[syscall_name][-1]]()
if builder is not None:
args = [arg.get_ssa_value(builder) for arg in args]
args = [arg.auto_load(builder) for arg in args]
if syscall_name in self.var_arg_fixcount:
fixcount = self.var_arg_fixcount[syscall_name]
args = args[:fixcount] \
@ -65,7 +65,7 @@ class LinkInterface:
+ args[fixcount:]
llvm_function = self.llvm_module.get_function_named(
"__syscall_" + syscall_name)
r.set_ssa_value(builder, builder.call(llvm_function, args))
r.auto_store(builder, builder.call(llvm_function, args))
return r