@@ -8,6 +8,7 @@ use rustc_ast::InlineAsmOptions;
8
8
use rustc_codegen_ssa:: base:: is_call_from_compiler_builtins_to_upstream_monomorphization;
9
9
use rustc_index:: IndexVec ;
10
10
use rustc_middle:: middle:: codegen_fn_attrs:: CodegenFnAttrFlags ;
11
+ use rustc_middle:: mir:: InlineAsmMacro ;
11
12
use rustc_middle:: ty:: TypeVisitableExt ;
12
13
use rustc_middle:: ty:: adjustment:: PointerCoercion ;
13
14
use rustc_middle:: ty:: layout:: FnAbiOf ;
@@ -57,6 +58,7 @@ pub(crate) fn codegen_fn<'tcx>(
57
58
58
59
match & mir. basic_blocks [ START_BLOCK ] . terminator ( ) . kind {
59
60
TerminatorKind :: InlineAsm {
61
+ asm_macro : InlineAsmMacro :: NakedAsm ,
60
62
template,
61
63
operands,
62
64
options,
@@ -498,6 +500,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
498
500
"tail calls are not yet supported in `rustc_codegen_cranelift` backend"
499
501
) ,
500
502
TerminatorKind :: InlineAsm {
503
+ asm_macro : _,
501
504
template,
502
505
operands,
503
506
options,
@@ -713,17 +716,17 @@ fn codegen_stmt<'tcx>(
713
716
let from_ty = operand. layout ( ) . ty ;
714
717
let to_ty = fx. monomorphize ( to_ty) ;
715
718
716
- fn is_fat_ptr < ' tcx > ( fx : & FunctionCx < ' _ , ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
719
+ fn is_wide_ptr < ' tcx > ( fx : & FunctionCx < ' _ , ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
717
720
ty. builtin_deref ( true )
718
721
. is_some_and ( |pointee_ty| has_ptr_meta ( fx. tcx , pointee_ty) )
719
722
}
720
723
721
- if is_fat_ptr ( fx, from_ty) {
722
- if is_fat_ptr ( fx, to_ty) {
723
- // fat -ptr -> fat -ptr
724
+ if is_wide_ptr ( fx, from_ty) {
725
+ if is_wide_ptr ( fx, to_ty) {
726
+ // wide -ptr -> wide -ptr
724
727
lval. write_cvalue ( fx, operand. cast_pointer_to ( dest_layout) ) ;
725
728
} else {
726
- // fat -ptr -> thin-ptr
729
+ // wide -ptr -> thin-ptr
727
730
let ( ptr, _extra) = operand. load_scalar_pair ( fx) ;
728
731
lval. write_cvalue ( fx, CValue :: by_val ( ptr, dest_layout) )
729
732
}
0 commit comments