@@ -300,6 +300,14 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
300
300
constants_len += string. len ( ) + att_dialect as usize ;
301
301
}
302
302
303
+ InlineAsmOperandRef :: Const { value } => {
304
+ inputs. push ( AsmInOperand {
305
+ constraint : Cow :: Borrowed ( "i" ) ,
306
+ rust_idx,
307
+ val : value. immediate ( ) ,
308
+ } ) ;
309
+ }
310
+
303
311
InlineAsmOperandRef :: SymFn { instance } => {
304
312
// TODO(@Amanieu): Additional mangling is needed on
305
313
// some targets to add a leading underscore (Mach-O)
@@ -415,6 +423,10 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
415
423
// processed in the previous pass
416
424
}
417
425
426
+ InlineAsmOperandRef :: Const { .. } => {
427
+ // processed in the previous pass
428
+ }
429
+
418
430
InlineAsmOperandRef :: Label { .. } => {
419
431
// processed in the previous pass
420
432
}
@@ -488,6 +500,15 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
488
500
push_to_template ( modifier, gcc_index) ;
489
501
}
490
502
503
+ InlineAsmOperandRef :: Const { .. } => {
504
+ let in_gcc_index = inputs
505
+ . iter ( )
506
+ . position ( |op| operand_idx == op. rust_idx )
507
+ . expect ( "wrong rust index" ) ;
508
+ let gcc_index = in_gcc_index + outputs. len ( ) ;
509
+ push_to_template ( None , gcc_index) ;
510
+ }
511
+
491
512
InlineAsmOperandRef :: SymFn { instance } => {
492
513
// TODO(@Amanieu): Additional mangling is needed on
493
514
// some targets to add a leading underscore (Mach-O)
0 commit comments