1use rustc_attr_ir::lang_items::LangItem;
4use rustc_errors::DiagMessage;
5use rustc_hir as hir;
6use rustc_middle::traits::{ObligationCause, ObligationCauseCode};
7use rustc_middle::ty::consts::ConstExt;
8use rustc_middle::ty::{self, Const, Ty, TyCtxt};
9use rustc_span::def_id::LocalDefId;
10use rustc_span::{Span, Symbol, sym};
11
12use crate::check::check_function_signature;
13use crate::diagnostics::{UnrecognizedIntrinsicFunction, WrongNumberOfGenericArgumentsToIntrinsic};
14
15fn equate_intrinsic_type<'tcx>(
16 tcx: TyCtxt<'tcx>,
17 span: Span,
18 def_id: LocalDefId,
19 n_tps: usize,
20 n_lts: usize,
21 n_cts: usize,
22 sig: ty::PolyFnSig<'tcx>,
23) {
24 let (generics, span) = match tcx.hir_node_by_def_id(def_id) {
25 hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn { generics, .. }, .. }) => {
26 (tcx.generics_of(def_id), generics.span)
27 }
28 _ => tcx.dcx().span_bug(span, "intrinsic must be a function"),
29 };
30 let own_counts = generics.own_counts();
31
32 let gen_count_ok = |found: usize, expected: usize, descr: &str| -> bool {
33 if found != expected {
34 tcx.dcx().emit_err(WrongNumberOfGenericArgumentsToIntrinsic {
35 span,
36 found,
37 expected,
38 descr,
39 });
40 false
41 } else {
42 true
43 }
44 };
45
46 if gen_count_ok(own_counts.lifetimes, n_lts, "lifetime")
49 && gen_count_ok(own_counts.types, n_tps, "type")
50 && gen_count_ok(own_counts.consts, n_cts, "const")
51 {
52 let _ = check_function_signature(
53 tcx,
54 ObligationCause::new(span, def_id, ObligationCauseCode::IntrinsicType),
55 def_id.into(),
56 sig,
57 );
58 }
59}
60
61fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) -> hir::Safety {
63 let is_in_list = match tcx.item_name(intrinsic_id) {
64 | sym::abort_immediate
71 | sym::add_with_overflow
72 | sym::aggregate_raw_ptr
73 | sym::align_of
74 | sym::amdgpu_dispatch_ptr
75 | sym::assert_inhabited
76 | sym::assert_mem_uninitialized_valid
77 | sym::assert_zero_valid
78 | sym::autodiff
79 | sym::bitreverse
80 | sym::black_box
81 | sym::breakpoint
82 | sym::bswap
83 | sym::caller_location
84 | sym::carrying_mul_add
85 | sym::carryless_mul
86 | sym::ceilf16
87 | sym::ceilf32
88 | sym::ceilf64
89 | sym::ceilf128
90 | sym::cold_path
91 | sym::const_eval_select
92 | sym::contract_check_ensures
93 | sym::contract_check_requires
94 | sym::contract_checks
95 | sym::copysignf16
96 | sym::copysignf32
97 | sym::copysignf64
98 | sym::copysignf128
99 | sym::cos
100 | sym::ctlz
101 | sym::ctpop
102 | sym::cttz
103 | sym::discriminant_value
104 | sym::exp
105 | sym::exp2
106 | sym::fabs
107 | sym::fadd_algebraic
108 | sym::fdiv_algebraic
109 | sym::field_offset
110 | sym::field_representing_type_actual_type_id
111 | sym::field_representing_type_name
112 | sym::field_representing_type_offset
113 | sym::floorf16
114 | sym::floorf32
115 | sym::floorf64
116 | sym::floorf128
117 | sym::fmaf16
118 | sym::fmaf32
119 | sym::fmaf64
120 | sym::fmaf128
121 | sym::fmul_algebraic
122 | sym::fmuladdf16
123 | sym::fmuladdf32
124 | sym::fmuladdf64
125 | sym::fmuladdf128
126 | sym::forget
127 | sym::frem_algebraic
128 | sym::fsub_algebraic
129 | sym::gpu_launch_sized_workgroup_mem
130 | sym::integer_max
131 | sym::integer_min
132 | sym::is_val_statically_known
133 | sym::log
134 | sym::log2
135 | sym::log10
136 | sym::maximum_number_nsz_f16
137 | sym::maximum_number_nsz_f32
138 | sym::maximum_number_nsz_f64
139 | sym::maximum_number_nsz_f128
140 | sym::maximumf16
141 | sym::maximumf32
142 | sym::maximumf64
143 | sym::maximumf128
144 | sym::minimum_number_nsz_f16
145 | sym::minimum_number_nsz_f32
146 | sym::minimum_number_nsz_f64
147 | sym::minimum_number_nsz_f128
148 | sym::minimumf16
149 | sym::minimumf32
150 | sym::minimumf64
151 | sym::minimumf128
152 | sym::mul_with_overflow
153 | sym::needs_drop
154 | sym::offload
155 | sym::offload_get_num_devices
156 | sym::offset_of
157 | sym::overflow_checks
158 | sym::powf16
159 | sym::powf32
160 | sym::powf64
161 | sym::powf128
162 | sym::powif16
163 | sym::powif32
164 | sym::powif64
165 | sym::powif128
166 | sym::prefetch_read_data
167 | sym::prefetch_read_instruction
168 | sym::prefetch_write_data
169 | sym::prefetch_write_instruction
170 | sym::ptr_guaranteed_cmp
171 | sym::ptr_mask
172 | sym::ptr_metadata
173 | sym::return_address
174 | sym::rotate_left
175 | sym::rotate_right
176 | sym::round_ties_even_f16
177 | sym::round_ties_even_f32
178 | sym::round_ties_even_f64
179 | sym::round_ties_even_f128
180 | sym::roundf16
181 | sym::roundf32
182 | sym::roundf64
183 | sym::roundf128
184 | sym::rustc_peek
185 | sym::saturating_add
186 | sym::saturating_sub
187 | sym::select_unpredictable
188 | sym::sin
189 | sym::size_of
190 | sym::size_of_type_id
191 | sym::sqrtf16
192 | sym::sqrtf32
193 | sym::sqrtf64
194 | sym::sqrtf128
195 | sym::sub_with_overflow
196 | sym::three_way_compare
197 | sym::truncf16
198 | sym::truncf32
199 | sym::truncf64
200 | sym::truncf128
201 | sym::type_id
202 | sym::type_id_array_len
203 | sym::type_id_element_ty
204 | sym::type_id_eq
205 | sym::type_id_field_representing_type
206 | sym::type_id_fields
207 | sym::type_id_function_ptr
208 | sym::type_id_generics
209 | sym::type_id_is_signed
210 | sym::type_id_non_exhaustive
211 | sym::type_id_points_mutably
212 | sym::type_id_points_to
213 | sym::type_id_size_of
214 | sym::type_id_type_of
215 | sym::type_id_variant_name
216 | sym::type_id_variant_non_exhaustive
217 | sym::type_id_variants
218 | sym::type_id_vtable
219 | sym::type_name
220 | sym::ub_checks
221 | sym::va_copy
222 | sym::variant_count
223 | sym::wrapping_add
224 | sym::wrapping_mul
225 | sym::wrapping_sub
226 | sym::write_box_via_move
227 => hir::Safety::Safe,
229 _ => hir::Safety::Unsafe,
230 };
231
232 if tcx.fn_sig(intrinsic_id).skip_binder().safety() != is_in_list {
233 tcx.dcx().struct_span_err(
234 tcx.def_span(intrinsic_id),
235 DiagMessage::from(::alloc::__export::must_use({
::alloc::fmt::format(format_args!("intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{0}`",
tcx.item_name(intrinsic_id)))
})format!(
236 "intrinsic safety mismatch between list of intrinsics within the compiler and core library intrinsics for intrinsic `{}`",
237 tcx.item_name(intrinsic_id)
238 )
239 )).emit();
240 }
241
242 is_in_list
243}
244
245pub(crate) fn check_intrinsic_type(
248 tcx: TyCtxt<'_>,
249 intrinsic_id: LocalDefId,
250 span: Span,
251 intrinsic_name: Symbol,
252) {
253 let generics = tcx.generics_of(intrinsic_id);
254 let param = |n| {
255 if let &ty::GenericParamDef { name, kind: ty::GenericParamDefKind::Type { .. }, .. } =
256 generics.param_at(n as usize, tcx)
257 {
258 Ty::new_param(tcx, n, name)
259 } else {
260 Ty::new_error_with_message(tcx, span, "expected param")
261 }
262 };
263
264 let bound_vars = tcx.mk_bound_variable_kinds(&[
265 ty::BoundVariableKind::Region(ty::BoundRegionKind::Anon),
266 ty::BoundVariableKind::Region(ty::BoundRegionKind::Anon),
267 ty::BoundVariableKind::Region(ty::BoundRegionKind::ClosureEnv),
268 ]);
269 let mk_va_list_ty = |mutbl| {
270 let did = tcx.require_lang_item(LangItem::VaList, span);
271 let region = ty::Region::new_bound(
272 tcx,
273 ty::INNERMOST,
274 ty::BoundRegion { var: ty::BoundVar::ZERO, kind: ty::BoundRegionKind::Anon },
275 );
276 let env_region = ty::Region::new_bound(
277 tcx,
278 ty::INNERMOST,
279 ty::BoundRegion {
280 var: ty::BoundVar::from_u32(2),
281 kind: ty::BoundRegionKind::ClosureEnv,
282 },
283 );
284 let va_list_ty = tcx.type_of(did).instantiate(tcx, &[region.into()]).skip_norm_wip();
285 (Ty::new_ref(tcx, env_region, va_list_ty, mutbl), va_list_ty)
286 };
287 let type_id_ty = || tcx.type_of(tcx.lang_items().type_id().unwrap()).no_bound_vars().unwrap();
288
289 let safety = intrinsic_operation_unsafety(tcx, intrinsic_id);
290 let n_lts = 0;
291 let (n_tps, n_cts, inputs, output) = match intrinsic_name {
292 sym::autodiff => (4, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(3)),
293 sym::abort_immediate => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.never),
294 sym::amdgpu_dispatch_ptr => (0, 0, ::alloc::vec::Vec::new()vec![], Ty::new_imm_ptr(tcx, tcx.types.unit)),
295 sym::unreachable => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.never),
296 sym::breakpoint => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.unit),
297 sym::size_of | sym::align_of | sym::variant_count => (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.usize),
298 sym::size_of_val | sym::align_of_val => {
299 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.usize)
300 }
301 sym::type_id_size_of => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], Ty::new_option(tcx, tcx.types.usize)),
302 sym::offset_of => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.u32, tcx.types.u32]))vec![tcx.types.u32, tcx.types.u32], tcx.types.usize),
303 sym::field_offset => (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.usize),
304 sym::rustc_peek => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(0)),
305 sym::caller_location => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.caller_location_ty()),
306 sym::gpu_launch_sized_workgroup_mem => (1, 0, ::alloc::vec::Vec::new()vec![], Ty::new_mut_ptr(tcx, param(0))),
307 sym::assert_inhabited | sym::assert_zero_valid | sym::assert_mem_uninitialized_valid => {
308 (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.unit)
309 }
310 sym::forget => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], tcx.types.unit),
311 sym::transmute | sym::transmute_unchecked => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
312 sym::prefetch_read_data
313 | sym::prefetch_write_data
314 | sym::prefetch_read_instruction
315 | sym::prefetch_write_instruction => {
316 (1, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], tcx.types.unit)
317 }
318 sym::needs_drop => (1, 0, ::alloc::vec::Vec::new()vec![], tcx.types.bool),
319
320 sym::type_name => (1, 0, ::alloc::vec::Vec::new()vec![], Ty::new_static_str(tcx)),
321 sym::type_id => (1, 0, ::alloc::vec::Vec::new()vec![], type_id_ty()),
322 sym::type_id_array_len => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], tcx.types.usize),
323 sym::type_id_element_ty => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], Ty::new_option(tcx, type_id_ty())),
324 sym::type_id_eq => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty(), type_id_ty()]))vec![type_id_ty(), type_id_ty()], tcx.types.bool),
325 sym::type_id_field_representing_type => {
326 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty(), tcx.types.usize, tcx.types.usize]))vec![type_id_ty(), tcx.types.usize, tcx.types.usize], type_id_ty())
327 }
328 sym::type_id_fields => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty(), tcx.types.usize]))vec![type_id_ty(), tcx.types.usize], tcx.types.usize),
329 sym::type_id_function_ptr => {
330 let fn_ptr = tcx.require_lang_item(LangItem::FnPtr, span);
331 let fn_ptr_adt_ref = tcx.adt_def(fn_ptr);
332 let fn_ptr_ty = Ty::new_adt(tcx, fn_ptr_adt_ref, ty::List::empty());
333
334 let option = tcx.require_lang_item(LangItem::Option, span);
335 let option_adt_ref = tcx.adt_def(option);
336 let option_args = tcx.mk_args(&[fn_ptr_ty.into()]);
337 let option_fn_ptr_ty = Ty::new_adt(tcx, option_adt_ref, option_args);
338 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], option_fn_ptr_ty)
339 }
340 sym::type_id_is_signed => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], tcx.types.bool),
341 sym::type_id_points_mutably => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], tcx.types.bool),
342 sym::type_id_points_to => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], Ty::new_option(tcx, type_id_ty())),
343 sym::type_id_variants => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], tcx.types.usize),
344 sym::type_id_variant_name => {
345 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty(), tcx.types.usize]))vec![type_id_ty(), tcx.types.usize], Ty::new_static_str(tcx))
346 }
347 sym::type_id_variant_non_exhaustive => {
348 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty(), tcx.types.usize]))vec![type_id_ty(), tcx.types.usize], tcx.types.bool)
349 }
350 sym::type_id_vtable => {
351 let dyn_metadata = tcx.require_lang_item(LangItem::DynMetadata, span);
352 let dyn_metadata_adt_ref = tcx.adt_def(dyn_metadata);
353 let dyn_metadata_args =
354 tcx.mk_args(&[Ty::new_ptr(tcx, tcx.types.unit, ty::Mutability::Not).into()]);
355 let dyn_ty = Ty::new_adt(tcx, dyn_metadata_adt_ref, dyn_metadata_args);
356
357 let option_did = tcx.require_lang_item(LangItem::Option, span);
358 let option_adt_ref = tcx.adt_def(option_did);
359 let option_args = tcx.mk_args(&[dyn_ty.into()]);
360 let ret_ty = Ty::new_adt(tcx, option_adt_ref, option_args);
361
362 (0, 0, ::alloc::vec::from_elem(type_id_ty(), 2)vec![type_id_ty(); 2], ret_ty)
363 }
364 sym::type_id_type_of => (
365 0,
366 0,
367 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()],
368 tcx.type_of(tcx.lang_items().type_struct().unwrap()).no_bound_vars().unwrap(),
369 ),
370 sym::field_representing_type_actual_type_id => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], type_id_ty()),
371 sym::field_representing_type_name => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], Ty::new_static_str(tcx)),
372 sym::field_representing_type_offset => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], tcx.types.usize),
373 sym::type_id_non_exhaustive => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()], tcx.types.bool),
374 sym::type_id_generics => (
375 0,
376 0,
377 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[type_id_ty()]))vec![type_id_ty()],
378 Ty::new_imm_ref(
379 tcx,
380 tcx.lifetimes.re_static,
381 Ty::new_slice(
382 tcx,
383 tcx.type_of(tcx.lang_items().type_generic().unwrap()).no_bound_vars().unwrap(),
384 ),
385 ),
386 ),
387 sym::offload => (
388 3,
389 0,
390 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0),
Ty::new_array_with_const_len(tcx, tcx.types.u32,
Const::from_target_usize(tcx, 3)),
Ty::new_array_with_const_len(tcx, tcx.types.u32,
Const::from_target_usize(tcx, 3)), tcx.types.u32,
tcx.types.i32, param(1)]))vec![
391 param(0),
392 Ty::new_array_with_const_len(tcx, tcx.types.u32, Const::from_target_usize(tcx, 3)),
393 Ty::new_array_with_const_len(tcx, tcx.types.u32, Const::from_target_usize(tcx, 3)),
394 tcx.types.u32,
395 tcx.types.i32,
396 param(1),
397 ],
398 param(2),
399 ),
400 sym::offload_get_num_devices => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.i32),
401 sym::offset => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1)]))vec![param(0), param(1)], param(0)),
402 sym::arith_offset => (
403 1,
404 0,
405 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0)), tcx.types.isize]))vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.isize],
406 Ty::new_imm_ptr(tcx, param(0)),
407 ),
408 sym::slice_get_unchecked => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(1), tcx.types.usize]))vec![param(1), tcx.types.usize], param(0)),
409 sym::ptr_mask => (
410 1,
411 0,
412 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize]))vec![Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize],
413 Ty::new_imm_ptr(tcx, param(0)),
414 ),
415
416 sym::copy | sym::copy_nonoverlapping => (
417 1,
418 0,
419 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0)), Ty::new_mut_ptr(tcx, param(0)),
tcx.types.usize]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_mut_ptr(tcx, param(0)), tcx.types.usize],
420 tcx.types.unit,
421 ),
422 sym::volatile_copy_memory | sym::volatile_copy_nonoverlapping_memory => (
423 1,
424 0,
425 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0)),
tcx.types.usize]))vec![Ty::new_mut_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0)), tcx.types.usize],
426 tcx.types.unit,
427 ),
428 sym::compare_bytes => {
429 let byte_ptr = Ty::new_imm_ptr(tcx, tcx.types.u8);
430 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[byte_ptr, byte_ptr, tcx.types.usize]))vec![byte_ptr, byte_ptr, tcx.types.usize], tcx.types.i32)
431 }
432 sym::write_bytes | sym::volatile_set_memory => (
433 1,
434 0,
435 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), tcx.types.u8, tcx.types.usize]))vec![Ty::new_mut_ptr(tcx, param(0)), tcx.types.u8, tcx.types.usize],
436 tcx.types.unit,
437 ),
438
439 sym::sqrtf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
440 sym::sqrtf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
441 sym::sqrtf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
442 sym::sqrtf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
443
444 sym::powif16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.i32]))vec![tcx.types.f16, tcx.types.i32], tcx.types.f16),
445 sym::powif32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.i32]))vec![tcx.types.f32, tcx.types.i32], tcx.types.f32),
446 sym::powif64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.i32]))vec![tcx.types.f64, tcx.types.i32], tcx.types.f64),
447 sym::powif128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.i32]))vec![tcx.types.f128, tcx.types.i32], tcx.types.f128),
448
449 sym::powf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
450 sym::powf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
451 sym::powf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
452 sym::powf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
453
454 sym::fmaf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16, tcx.types.f16], tcx.types.f16),
455 sym::fmaf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32),
456 sym::fmaf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64),
457 sym::fmaf128 => {
458 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128, tcx.types.f128], tcx.types.f128)
459 }
460
461 sym::fmuladdf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16, tcx.types.f16], tcx.types.f16),
462 sym::fmuladdf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32, tcx.types.f32], tcx.types.f32),
463 sym::fmuladdf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64, tcx.types.f64], tcx.types.f64),
464 sym::fmuladdf128 => {
465 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128, tcx.types.f128], tcx.types.f128)
466 }
467
468 sym::exp
469 | sym::exp2
470 | sym::log
471 | sym::log2
472 | sym::log10
473 | sym::fabs
474 | sym::sin
475 | sym::cos => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(0)),
476
477 sym::minimum_number_nsz_f16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
478 sym::minimum_number_nsz_f32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
479 sym::minimum_number_nsz_f64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
480 sym::minimum_number_nsz_f128 => {
481 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128)
482 }
483
484 sym::minimumf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
485 sym::minimumf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
486 sym::minimumf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
487 sym::minimumf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
488
489 sym::maximum_number_nsz_f16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
490 sym::maximum_number_nsz_f32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
491 sym::maximum_number_nsz_f64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
492 sym::maximum_number_nsz_f128 => {
493 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128)
494 }
495
496 sym::maximumf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
497 sym::maximumf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
498 sym::maximumf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
499 sym::maximumf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
500
501 sym::copysignf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16, tcx.types.f16]))vec![tcx.types.f16, tcx.types.f16], tcx.types.f16),
502 sym::copysignf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32, tcx.types.f32]))vec![tcx.types.f32, tcx.types.f32], tcx.types.f32),
503 sym::copysignf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64, tcx.types.f64]))vec![tcx.types.f64, tcx.types.f64], tcx.types.f64),
504 sym::copysignf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128, tcx.types.f128]))vec![tcx.types.f128, tcx.types.f128], tcx.types.f128),
505
506 sym::floorf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
507 sym::floorf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
508 sym::floorf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
509 sym::floorf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
510
511 sym::ceilf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
512 sym::ceilf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
513 sym::ceilf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
514 sym::ceilf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
515
516 sym::truncf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
517 sym::truncf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
518 sym::truncf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
519 sym::truncf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
520
521 sym::round_ties_even_f16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
522 sym::round_ties_even_f32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
523 sym::round_ties_even_f64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
524 sym::round_ties_even_f128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
525
526 sym::roundf16 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f16]))vec![tcx.types.f16], tcx.types.f16),
527 sym::roundf32 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f32]))vec![tcx.types.f32], tcx.types.f32),
528 sym::roundf64 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f64]))vec![tcx.types.f64], tcx.types.f64),
529 sym::roundf128 => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.f128]))vec![tcx.types.f128], tcx.types.f128),
530
531 sym::volatile_load | sym::unaligned_volatile_load => {
532 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(0))
533 }
534 sym::volatile_store | sym::unaligned_volatile_store => {
535 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
536 }
537
538 sym::ctpop | sym::ctlz | sym::ctlz_nonzero | sym::cttz | sym::cttz_nonzero => {
539 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], tcx.types.u32)
540 }
541
542 sym::bswap | sym::bitreverse => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(0)),
543
544 sym::three_way_compare => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], tcx.ty_ordering_enum(span)),
545
546 sym::add_with_overflow | sym::sub_with_overflow | sym::mul_with_overflow => {
547 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], Ty::new_tup(tcx, &[param(0), tcx.types.bool]))
548 }
549
550 sym::carrying_mul_add => (2, 0, ::alloc::vec::from_elem(param(0), 4)vec![param(0); 4], Ty::new_tup(tcx, &[param(1), param(0)])),
551
552 sym::ptr_guaranteed_cmp => (
553 1,
554 0,
555 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
556 tcx.types.u8,
557 ),
558
559 sym::const_allocate => {
560 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.usize, tcx.types.usize]))vec![tcx.types.usize, tcx.types.usize], Ty::new_mut_ptr(tcx, tcx.types.u8))
561 }
562 sym::const_deallocate => (
563 0,
564 0,
565 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize,
tcx.types.usize]))vec![Ty::new_mut_ptr(tcx, tcx.types.u8), tcx.types.usize, tcx.types.usize],
566 tcx.types.unit,
567 ),
568 sym::const_make_global => {
569 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, tcx.types.u8)]))vec![Ty::new_mut_ptr(tcx, tcx.types.u8)], Ty::new_imm_ptr(tcx, tcx.types.u8))
570 }
571
572 sym::ptr_offset_from => (
573 1,
574 0,
575 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
576 tcx.types.isize,
577 ),
578 sym::ptr_offset_from_unsigned => (
579 1,
580 0,
581 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0)), Ty::new_imm_ptr(tcx, param(0))],
582 tcx.types.usize,
583 ),
584 sym::integer_max | sym::integer_min => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0)),
585 sym::unchecked_div | sym::unchecked_rem | sym::exact_div | sym::disjoint_bitor => {
586 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0))
587 }
588 sym::unchecked_shl | sym::unchecked_shr => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1)]))vec![param(0), param(1)], param(0)),
589 sym::rotate_left | sym::rotate_right => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), tcx.types.u32]))vec![param(0), tcx.types.u32], param(0)),
590 sym::unchecked_funnel_shl | sym::unchecked_funnel_shr => {
591 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0), tcx.types.u32]))vec![param(0), param(0), tcx.types.u32], param(0))
592 }
593 sym::unchecked_add | sym::unchecked_sub | sym::unchecked_mul => {
594 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0))
595 }
596 sym::wrapping_add | sym::wrapping_sub | sym::wrapping_mul => {
597 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0))
598 }
599 sym::saturating_add | sym::saturating_sub => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0)),
600 sym::carryless_mul => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0)),
601 sym::fadd_fast | sym::fsub_fast | sym::fmul_fast | sym::fdiv_fast | sym::frem_fast => {
602 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0))
603 }
604 sym::fadd_algebraic
605 | sym::fsub_algebraic
606 | sym::fmul_algebraic
607 | sym::fdiv_algebraic
608 | sym::frem_algebraic => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0)),
609 sym::float_to_int_unchecked => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
610
611 sym::assume => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.bool]))vec![tcx.types.bool], tcx.types.unit),
612 sym::select_unpredictable => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[tcx.types.bool, param(0), param(0)]))vec![tcx.types.bool, param(0), param(0)], param(0)),
613 sym::cold_path => (0, 0, ::alloc::vec::Vec::new()vec![], tcx.types.unit),
614
615 sym::read_via_copy => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(0)),
616 sym::write_via_move => {
617 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
618 }
619 sym::write_box_via_move => {
620 let t = param(0);
621 let maybe_uninit_t = Ty::new_maybe_uninit(tcx, t);
622 let box_mu_t = Ty::new_box(tcx, maybe_uninit_t);
623
624 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[box_mu_t, param(0)]))vec![box_mu_t, param(0)], box_mu_t)
625 }
626
627 sym::typed_swap_nonoverlapping => {
628 (1, 0, ::alloc::vec::from_elem(Ty::new_mut_ptr(tcx, param(0)), 2)vec![Ty::new_mut_ptr(tcx, param(0)); 2], tcx.types.unit)
629 }
630
631 sym::discriminant_value => {
632 let assoc_items = tcx
633 .associated_item_def_ids(tcx.require_lang_item(LangItem::DiscriminantKind, span));
634 let discriminant_def_id = assoc_items[0];
635
636 let br = ty::BoundRegion { var: ty::BoundVar::ZERO, kind: ty::BoundRegionKind::Anon };
637 (
638 1,
639 0,
640 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br),
param(0))]))vec![Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0))],
641 Ty::new_projection_from_args(
642 tcx,
643 ty::IsRigid::No,
644 discriminant_def_id,
645 tcx.mk_args(&[param(0).into()]),
646 ),
647 )
648 }
649
650 sym::catch_unwind => {
651 let mut_data = Ty::new_mut_ptr(tcx, param(0));
652 let mut_u8 = Ty::new_mut_ptr(tcx, tcx.types.u8);
653 let try_fn_ty =
654 ty::Binder::dummy(tcx.mk_fn_sig_unsafe_rust_abi([mut_data], tcx.types.unit));
655 let catch_fn_ty = ty::Binder::dummy(
656 tcx.mk_fn_sig_unsafe_rust_abi([mut_data, mut_u8], tcx.types.unit),
657 );
658 (
659 1,
660 0,
661 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_fn_ptr(tcx, try_fn_ty), mut_data,
Ty::new_fn_ptr(tcx, catch_fn_ty)]))vec![Ty::new_fn_ptr(tcx, try_fn_ty), mut_data, Ty::new_fn_ptr(tcx, catch_fn_ty)],
662 tcx.types.bool,
663 )
664 }
665
666 sym::va_copy => {
667 let (va_list_ref_ty, va_list_ty) = mk_va_list_ty(hir::Mutability::Not);
668 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[va_list_ref_ty]))vec![va_list_ref_ty], va_list_ty)
669 }
670
671 sym::va_end => (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[mk_va_list_ty(hir::Mutability::Mut).0]))vec![mk_va_list_ty(hir::Mutability::Mut).0], tcx.types.unit),
672
673 sym::va_arg => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[mk_va_list_ty(hir::Mutability::Mut).0]))vec![mk_va_list_ty(hir::Mutability::Mut).0], param(0)),
674
675 sym::nontemporal_store => {
676 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit)
677 }
678
679 sym::raw_eq => {
680 let br = ty::BoundRegion { var: ty::BoundVar::ZERO, kind: ty::BoundRegionKind::Anon };
681 let param_ty_lhs =
682 Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0));
683 let br =
684 ty::BoundRegion { var: ty::BoundVar::from_u32(1), kind: ty::BoundRegionKind::Anon };
685 let param_ty_rhs =
686 Ty::new_imm_ref(tcx, ty::Region::new_bound(tcx, ty::INNERMOST, br), param(0));
687 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param_ty_lhs, param_ty_rhs]))vec![param_ty_lhs, param_ty_rhs], tcx.types.bool)
688 }
689
690 sym::black_box => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(0)),
691
692 sym::is_val_statically_known => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], tcx.types.bool),
693
694 sym::const_eval_select => (4, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(3)),
695
696 sym::vtable_size | sym::vtable_align => {
697 (0, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, tcx.types.unit)]))vec![Ty::new_imm_ptr(tcx, tcx.types.unit)], tcx.types.usize)
698 }
699
700 sym::aggregate_raw_ptr => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(1), param(2)]))vec![param(1), param(2)], param(0)),
703 sym::ptr_metadata => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(1)),
704
705 sym::ub_checks | sym::overflow_checks => (0, 0, Vec::new(), tcx.types.bool),
706
707 sym::contract_check_requires => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], tcx.types.unit),
709 sym::contract_check_ensures => {
710 (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_option(tcx, param(0)), param(1)]))vec![Ty::new_option(tcx, param(0)), param(1)], param(1))
711 }
712
713 sym::simd_eq | sym::simd_ne | sym::simd_lt | sym::simd_le | sym::simd_gt | sym::simd_ge => {
714 (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(1))
715 }
716 sym::simd_add
717 | sym::simd_sub
718 | sym::simd_mul
719 | sym::simd_rem
720 | sym::simd_div
721 | sym::simd_shl
722 | sym::simd_shr
723 | sym::simd_and
724 | sym::simd_or
725 | sym::simd_xor
726 | sym::simd_minimum_number_nsz
727 | sym::simd_maximum_number_nsz
728 | sym::simd_saturating_add
729 | sym::simd_saturating_sub
730 | sym::simd_carryless_mul => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(0)),
731 sym::simd_arith_offset => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1)]))vec![param(0), param(1)], param(0)),
732 sym::simd_neg
733 | sym::simd_bswap
734 | sym::simd_bitreverse
735 | sym::simd_ctlz
736 | sym::simd_cttz
737 | sym::simd_ctpop
738 | sym::simd_fsqrt
739 | sym::simd_fsin
740 | sym::simd_fcos
741 | sym::simd_fexp
742 | sym::simd_fexp2
743 | sym::simd_flog2
744 | sym::simd_flog10
745 | sym::simd_flog
746 | sym::simd_fabs
747 | sym::simd_ceil
748 | sym::simd_floor
749 | sym::simd_round
750 | sym::simd_round_ties_even
751 | sym::simd_trunc => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(0)),
752 sym::simd_fma | sym::simd_relaxed_fma | sym::simd_funnel_shl | sym::simd_funnel_shr => {
753 (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0), param(0)]))vec![param(0), param(0), param(0)], param(0))
754 }
755 sym::simd_gather => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(0)),
756 sym::simd_masked_load => (3, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], param(2)),
757 sym::simd_masked_store => (3, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], tcx.types.unit),
758 sym::simd_scatter => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(2)]))vec![param(0), param(1), param(2)], tcx.types.unit),
759 sym::simd_insert | sym::simd_insert_dyn => {
760 (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), tcx.types.u32, param(1)]))vec![param(0), tcx.types.u32, param(1)], param(0))
761 }
762 sym::simd_extract | sym::simd_extract_dyn => {
763 (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), tcx.types.u32]))vec![param(0), tcx.types.u32], param(1))
764 }
765 sym::simd_splat => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(1)]))vec![param(1)], param(0)),
766 sym::simd_cast
767 | sym::simd_as
768 | sym::simd_cast_ptr
769 | sym::simd_expose_provenance
770 | sym::simd_with_exposed_provenance => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
771 sym::simd_bitmask => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
772 sym::simd_select | sym::simd_select_bitmask => {
773 (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1), param(1)]))vec![param(0), param(1), param(1)], param(1))
774 }
775 sym::simd_reduce_all | sym::simd_reduce_any => (1, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], tcx.types.bool),
776 sym::simd_reduce_add_ordered | sym::simd_reduce_mul_ordered => {
777 (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1)]))vec![param(0), param(1)], param(1))
778 }
779 sym::simd_reduce_add_unordered
780 | sym::simd_reduce_mul_unordered
781 | sym::simd_reduce_and
782 | sym::simd_reduce_or
783 | sym::simd_reduce_xor
784 | sym::simd_reduce_min
785 | sym::simd_reduce_max => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
786 sym::simd_shuffle => (3, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0), param(1)]))vec![param(0), param(0), param(1)], param(2)),
787 sym::simd_shuffle_const_generic => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(1)),
788
789 sym::sve_cast => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
790 sym::sve_tuple_create2 => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0)]))vec![param(0), param(0)], param(1)),
791 sym::sve_tuple_create3 => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0), param(0)]))vec![param(0), param(0), param(0)], param(1)),
792 sym::sve_tuple_create4 => (2, 0, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(0), param(0), param(0)]))vec![param(0), param(0), param(0), param(0)], param(1)),
793 sym::sve_tuple_get => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0)]))vec![param(0)], param(1)),
794 sym::sve_tuple_set => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[param(0), param(1)]))vec![param(0), param(1)], param(0)),
795
796 sym::atomic_cxchg | sym::atomic_cxchgweak => (
797 1,
798 2,
799 ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(0), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0), param(0)],
800 Ty::new_tup(tcx, &[param(0), tcx.types.bool]),
801 ),
802 sym::atomic_load => (1, 2, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_imm_ptr(tcx, param(0))]))vec![Ty::new_imm_ptr(tcx, param(0))], param(0)),
803 sym::atomic_store => (1, 2, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], tcx.types.unit),
804
805 sym::atomic_xchg
806 | sym::atomic_max
807 | sym::atomic_min
808 | sym::atomic_umax
809 | sym::atomic_umin => (1, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(0)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(0)], param(0)),
810 sym::atomic_xadd
811 | sym::atomic_xsub
812 | sym::atomic_and
813 | sym::atomic_nand
814 | sym::atomic_or
815 | sym::atomic_xor => (2, 1, ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
[Ty::new_mut_ptr(tcx, param(0)), param(1)]))vec![Ty::new_mut_ptr(tcx, param(0)), param(1)], param(0)),
816 sym::atomic_fence | sym::atomic_singlethreadfence => (0, 1, Vec::new(), tcx.types.unit),
817
818 sym::return_address => (0, 0, ::alloc::vec::Vec::new()vec![], Ty::new_imm_ptr(tcx, tcx.types.unit)),
819
820 other => {
821 tcx.dcx().emit_err(UnrecognizedIntrinsicFunction { span, name: other });
822 return;
823 }
824 };
825 let sig = tcx.mk_fn_sig_rust_abi(inputs, output, safety);
826 let sig = ty::Binder::bind_with_vars(sig, bound_vars);
827 equate_intrinsic_type(tcx, span, intrinsic_id, n_tps, n_lts, n_cts, sig)
828}