Skip to content

Commit 8cec998

Browse files
committed
Implement asm goto in MIR and MIR lowering
1 parent 98dcd85 commit 8cec998

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/global_asm.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String,
7878
InlineAsmOperand::In { .. }
7979
| InlineAsmOperand::Out { .. }
8080
| InlineAsmOperand::InOut { .. }
81-
| InlineAsmOperand::SplitInOut { .. } => {
81+
| InlineAsmOperand::SplitInOut { .. }
82+
| InlineAsmOperand::Label { .. } => {
8283
span_bug!(op_sp, "invalid operand type for global_asm!")
8384
}
8485
}

src/inline_asm.rs

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
129129
let instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx);
130130
CInlineAsmOperand::Symbol { symbol: fx.tcx.symbol_name(instance).name.to_owned() }
131131
}
132+
InlineAsmOperand::Label { .. } => {
133+
span_bug!(span, "asm! label operands are not yet supported");
134+
}
132135
})
133136
.collect::<Vec<_>>();
134137

0 commit comments

Comments
 (0)