File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ pub(crate) fn codegen_inline_asm<'tcx>(
108
108
109
109
let mut asm_gen = InlineAssemblyGenerator {
110
110
tcx : fx. tcx ,
111
- arch : InlineAsmArch :: X86_64 ,
111
+ arch : fx . tcx . sess . asm_arch . unwrap ( ) ,
112
112
template,
113
113
operands,
114
114
options,
@@ -306,12 +306,8 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
306
306
let mut slots_output = vec ! [ None ; self . operands. len( ) ] ;
307
307
308
308
let new_slot_fn = |slot_size : & mut Size , reg_class : InlineAsmRegClass | {
309
- let reg_size = reg_class
310
- . supported_types ( InlineAsmArch :: X86_64 )
311
- . iter ( )
312
- . map ( |( ty, _) | ty. size ( ) )
313
- . max ( )
314
- . unwrap ( ) ;
309
+ let reg_size =
310
+ reg_class. supported_types ( self . arch ) . iter ( ) . map ( |( ty, _) | ty. size ( ) ) . max ( ) . unwrap ( ) ;
315
311
let align = rustc_target:: abi:: Align :: from_bytes ( reg_size. bytes ( ) ) . unwrap ( ) ;
316
312
let offset = slot_size. align_to ( align) ;
317
313
* slot_size = offset + reg_size;
You can’t perform that action at this time.
0 commit comments