@@ -276,6 +276,14 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
276
276
constants_len += string. len ( ) + att_dialect as usize ;
277
277
}
278
278
279
+ InlineAsmOperandRef :: Const { value } => {
280
+ inputs. push ( AsmInOperand {
281
+ constraint : Cow :: Borrowed ( "i" ) ,
282
+ rust_idx,
283
+ val : value. immediate ( ) ,
284
+ } ) ;
285
+ }
286
+
279
287
InlineAsmOperandRef :: SymFn { instance } => {
280
288
// TODO(@Amanieu): Additional mangling is needed on
281
289
// some targets to add a leading underscore (Mach-O)
@@ -391,6 +399,10 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
391
399
// processed in the previous pass
392
400
}
393
401
402
+ InlineAsmOperandRef :: Const { .. } => {
403
+ // processed in the previous pass
404
+ }
405
+
394
406
InlineAsmOperandRef :: Label { .. } => {
395
407
// processed in the previous pass
396
408
}
@@ -464,6 +476,15 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
464
476
push_to_template ( modifier, gcc_index) ;
465
477
}
466
478
479
+ InlineAsmOperandRef :: Const { .. } => {
480
+ let in_gcc_index = inputs
481
+ . iter ( )
482
+ . position ( |op| operand_idx == op. rust_idx )
483
+ . expect ( "wrong rust index" ) ;
484
+ let gcc_index = in_gcc_index + outputs. len ( ) ;
485
+ push_to_template ( None , gcc_index) ;
486
+ }
487
+
467
488
InlineAsmOperandRef :: SymFn { instance } => {
468
489
// TODO(@Amanieu): Additional mangling is needed on
469
490
// some targets to add a leading underscore (Mach-O)
0 commit comments