def int_invert_impl(context, builder, sig, args): [typ] = sig.args [val] = args # Invert before upcasting, for unsigned numbers res = builder.xor(val, Constant.all_ones(val.type)) res = context.cast(builder, res, typ, sig.return_type) return impl_ret_untracked(context, builder, sig.return_type, res)
def int_invert_impl(context, builder, sig, args): [typ] = sig.args [val] = args # Invert before upcasting, for unsigned numbers res = builder.xor(val, Constant.all_ones(val.type)) res = context.cast(builder, res, typ, sig.return_type) return impl_ret_untracked(context, builder, sig.return_type, res)
def int_invert_impl(context, builder, sig, args): [typ] = sig.args [val] = args val = context.cast(builder, val, typ, sig.return_type) return builder.xor(val, Constant.all_ones(val.type))