diff options
| author | Gary Guo <gary@garyguo.net> | 2023-12-26 16:07:35 +0000 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2024-02-24 18:50:09 +0000 |
| commit | 8cec9989b2a8b39da211d819f1c05fab94886b34 (patch) | |
| tree | f6e1579b0b28f000f2f6a7006553ee6b77e3f647 | |
| parent | 98dcd8505470b328c7177dbaa4fad68352692c2a (diff) | |
| download | rust-8cec9989b2a8b39da211d819f1c05fab94886b34.tar.gz rust-8cec9989b2a8b39da211d819f1c05fab94886b34.zip | |
Implement asm goto in MIR and MIR lowering
| -rw-r--r-- | src/global_asm.rs | 3 | ||||
| -rw-r--r-- | src/inline_asm.rs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/global_asm.rs b/src/global_asm.rs index da07b66c762..44650898de8 100644 --- a/src/global_asm.rs +++ b/src/global_asm.rs @@ -78,7 +78,8 @@ pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String, InlineAsmOperand::In { .. } | InlineAsmOperand::Out { .. } | InlineAsmOperand::InOut { .. } - | InlineAsmOperand::SplitInOut { .. } => { + | InlineAsmOperand::SplitInOut { .. } + | InlineAsmOperand::Label { .. } => { span_bug!(op_sp, "invalid operand type for global_asm!") } } diff --git a/src/inline_asm.rs b/src/inline_asm.rs index 7793b1b7092..171ee88a11c 100644 --- a/src/inline_asm.rs +++ b/src/inline_asm.rs @@ -129,6 +129,9 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>( let instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx); CInlineAsmOperand::Symbol { symbol: fx.tcx.symbol_name(instance).name.to_owned() } } + InlineAsmOperand::Label { .. } => { + span_bug!(span, "asm! label operands are not yet supported"); + } }) .collect::<Vec<_>>(); |
