about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTsukasa OI <floss_rust@irq.a4lg.com>2025-09-15 02:16:34 +0000
committerTsukasa OI <floss_rust@irq.a4lg.com>2025-09-15 02:16:34 +0000
commit5ebdec5ac2908b0bae42adbe451beeadbe8fa5de (patch)
tree03efdce305a499f55c7a29990a9cb4a340c4917a /compiler/rustc_codegen_llvm/src
parent52618eb338609df44978b0ca4451ab7941fd1c7a (diff)
downloadrust-5ebdec5ac2908b0bae42adbe451beeadbe8fa5de.tar.gz
rust-5ebdec5ac2908b0bae42adbe451beeadbe8fa5de.zip
rustc_codegen_llvm: Adjust RISC-V inline assembly's clobber list
Despite that the `fflags` register (representing floating point
exception flags) is stated as a flag register in the reference, it's not
in the default clobber list of the RISC-V inline assembly and it would
be better to fix it.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/asm.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs
index 38c1d3b53e8..b79176e9098 100644
--- a/compiler/rustc_codegen_llvm/src/asm.rs
+++ b/compiler/rustc_codegen_llvm/src/asm.rs
@@ -240,6 +240,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
                 }
                 InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
                     constraints.extend_from_slice(&[
+                        "~{fflags}".to_string(),
                         "~{vtype}".to_string(),
                         "~{vl}".to_string(),
                         "~{vxsat}".to_string(),