def _emit_call(self, op, arglocs): is_call_release_gil = rop.is_call_release_gil(op.getopnum()) # args = [resloc, size, sign, args...] from rpython.jit.backend.llsupport.descr import CallDescr func_index = 3 + is_call_release_gil cb = Aarch64CallBuilder(self, arglocs[func_index], arglocs[func_index+1:], arglocs[0]) descr = op.getdescr() assert isinstance(descr, CallDescr) cb.callconv = descr.get_call_conv() cb.argtypes = descr.get_arg_types() cb.restype = descr.get_result_type() sizeloc = arglocs[1] assert sizeloc.is_imm() cb.ressize = sizeloc.value signloc = arglocs[2] assert signloc.is_imm() cb.ressign = signloc.value if is_call_release_gil: saveerrloc = arglocs[3] assert saveerrloc.is_imm() cb.emit_call_release_gil(saveerrloc.value) else: effectinfo = descr.get_extra_info() if effectinfo is None or effectinfo.check_can_collect(): cb.emit() else: cb.emit_no_collect()
def simple_call(self, fnloc, arglocs, result_loc=r.x0): if result_loc is None: result_type = VOID result_size = 0 elif result_loc.is_vfp_reg(): result_type = FLOAT result_size = WORD else: result_type = INT result_size = WORD cb = Aarch64CallBuilder(self, fnloc, arglocs, result_loc, result_type, result_size) cb.emit()
def simple_call_no_collect(self, fnloc, arglocs): cb = Aarch64CallBuilder(self, fnloc, arglocs) cb.emit_no_collect()