about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2021-07-29 13:22:21 +0200
committerAmanieu d'Antras <amanieu@gmail.com>2021-08-12 12:42:58 +0100
commit2f4612260d35ef162c088b6b1a87f1e75717acb6 (patch)
treeef6f8c093b9e8107f31514cbcdb7a09630fbc1a8 /compiler/rustc_codegen_llvm/src
parente9fb7bada1dc2d288ef44852b0e1986dbcfaaab5 (diff)
downloadrust-2f4612260d35ef162c088b6b1a87f1e75717acb6.tar.gz
rust-2f4612260d35ef162c088b6b1a87f1e75717acb6.zip
Mark RISC-V vector state as clobbered in inline assembly
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/asm.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/asm.rs b/compiler/rustc_codegen_llvm/src/asm.rs
index ebc3773df57..43538b8ab35 100644
--- a/compiler/rustc_codegen_llvm/src/asm.rs
+++ b/compiler/rustc_codegen_llvm/src/asm.rs
@@ -302,7 +302,14 @@ impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
                         "~{flags}".to_string(),
                     ]);
                 }
-                InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {}
+                InlineAsmArch::RiscV32 | InlineAsmArch::RiscV64 => {
+                    constraints.extend_from_slice(&[
+                        "~{vtype}".to_string(),
+                        "~{vl}".to_string(),
+                        "~{vxsat}".to_string(),
+                        "~{vxrm}".to_string(),
+                    ]);
+                }
                 InlineAsmArch::Nvptx64 => {}
                 InlineAsmArch::PowerPC | InlineAsmArch::PowerPC64 => {}
                 InlineAsmArch::Hexagon => {}