summaryrefslogtreecommitdiff
path: root/compiler/rustc_codegen_llvm/src/asm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/asm.rs21
1 files changed, 17 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs
index 98d5b3599d9..2a6ad1be763 100644
--- a/compiler/rustc_codegen_llvm/src/asm.rs
+++ b/compiler/rustc_codegen_llvm/src/asm.rs
@@ -236,9 +236,22 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
InlineAsmArch::Nvptx64 => {}
InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {}
InlineAsmArch::Hexagon => {}
- InlineAsmArch::LoongArch64 => {}
+ InlineAsmArch::LoongArch64 => {
+ constraints.extend_from_slice(&[
+ "~{$fcc0}".to_string(),
+ "~{$fcc1}".to_string(),
+ "~{$fcc2}".to_string(),
+ "~{$fcc3}".to_string(),
+ "~{$fcc4}".to_string(),
+ "~{$fcc5}".to_string(),
+ "~{$fcc6}".to_string(),
+ "~{$fcc7}".to_string(),
+ ]);
+ }
InlineAsmArch::Mips | InlineAsmArch::Mips64 => {}
- InlineAsmArch::S390x => {}
+ InlineAsmArch::S390x => {
+ constraints.push("~{cc}".to_string());
+ }
InlineAsmArch::SpirV => {}
InlineAsmArch::Wasm32 | InlineAsmArch::Wasm64 => {}
InlineAsmArch::Bpf => {}
@@ -443,9 +456,9 @@ pub(crate) fn inline_asm_call<'ll>(
);
let call = if let Some((dest, catch, funclet)) = dest_catch_funclet {
- bx.invoke(fty, None, v, inputs, dest, catch, funclet)
+ bx.invoke(fty, None, None, v, inputs, dest, catch, funclet)
} else {
- bx.call(fty, None, v, inputs, None)
+ bx.call(fty, None, None, v, inputs, None)
};
// Store mark in a metadata node so we can map LLVM errors