From 93465e6c3106043b8db7089ff7a1a4d610d8f79f Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Wed, 29 Jan 2025 06:46:05 +0900 Subject: Mark condition/carry bit as clobbered in C-SKY inline assembly --- compiler/rustc_codegen_llvm/src/asm.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_llvm/src/asm.rs') diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs index 3722d4350a2..be5673eddf9 100644 --- a/compiler/rustc_codegen_llvm/src/asm.rs +++ b/compiler/rustc_codegen_llvm/src/asm.rs @@ -286,7 +286,9 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> { InlineAsmArch::M68k => { constraints.push("~{ccr}".to_string()); } - InlineAsmArch::CSKY => {} + InlineAsmArch::CSKY => { + constraints.push("~{psr}".to_string()); + } } } if !options.contains(InlineAsmOptions::NOMEM) { -- cgit 1.4.1-3-g733a5