Skip to content

Commit 8ad78cb

Browse files
committed
Mark LoongArch float-point condition flags as clobbered in inline assembly
1 parent ad6b20b commit 8ad78cb

File tree

1 file changed

+12
-1
lines changed
  • compiler/rustc_codegen_llvm/src

1 file changed

+12
-1
lines changed

compiler/rustc_codegen_llvm/src/asm.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,18 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
236236
InlineAsmArch::Nvptx64 => {}
237237
InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {}
238238
InlineAsmArch::Hexagon => {}
239-
InlineAsmArch::LoongArch64 => {}
239+
InlineAsmArch::LoongArch64 => {
240+
constraints.extend_from_slice(&[
241+
"~{$fcc0}".to_string(),
242+
"~{$fcc1}".to_string(),
243+
"~{$fcc2}".to_string(),
244+
"~{$fcc3}".to_string(),
245+
"~{$fcc4}".to_string(),
246+
"~{$fcc5}".to_string(),
247+
"~{$fcc6}".to_string(),
248+
"~{$fcc7}".to_string(),
249+
]);
250+
}
240251
InlineAsmArch::Mips | InlineAsmArch::Mips64 => {}
241252
InlineAsmArch::S390x => {}
242253
InlineAsmArch::SpirV => {}

0 commit comments

Comments
 (0)