@@ -8,6 +8,7 @@ use rustc_ast::InlineAsmOptions;
88use rustc_codegen_ssa:: base:: is_call_from_compiler_builtins_to_upstream_monomorphization;
99use rustc_index:: IndexVec ;
1010use rustc_middle:: middle:: codegen_fn_attrs:: CodegenFnAttrFlags ;
11+ use rustc_middle:: mir:: InlineAsmMacro ;
1112use rustc_middle:: ty:: TypeVisitableExt ;
1213use rustc_middle:: ty:: adjustment:: PointerCoercion ;
1314use rustc_middle:: ty:: layout:: FnAbiOf ;
@@ -57,6 +58,7 @@ pub(crate) fn codegen_fn<'tcx>(
5758
5859 match & mir. basic_blocks [ START_BLOCK ] . terminator ( ) . kind {
5960 TerminatorKind :: InlineAsm {
61+ asm_macro : InlineAsmMacro :: NakedAsm ,
6062 template,
6163 operands,
6264 options,
@@ -498,6 +500,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
498500 "tail calls are not yet supported in `rustc_codegen_cranelift` backend"
499501 ) ,
500502 TerminatorKind :: InlineAsm {
503+ asm_macro : _,
501504 template,
502505 operands,
503506 options,
@@ -713,17 +716,17 @@ fn codegen_stmt<'tcx>(
713716 let from_ty = operand. layout ( ) . ty ;
714717 let to_ty = fx. monomorphize ( to_ty) ;
715718
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 {
717720 ty. builtin_deref ( true )
718721 . is_some_and ( |pointee_ty| has_ptr_meta ( fx. tcx , pointee_ty) )
719722 }
720723
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
724727 lval. write_cvalue ( fx, operand. cast_pointer_to ( dest_layout) ) ;
725728 } else {
726- // fat -ptr -> thin-ptr
729+ // wide -ptr -> thin-ptr
727730 let ( ptr, _extra) = operand. load_scalar_pair ( fx) ;
728731 lval. write_cvalue ( fx, CValue :: by_val ( ptr, dest_layout) )
729732 }
0 commit comments