diff options
| author | bors <bors@rust-lang.org> | 2021-08-14 22:29:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-14 22:29:27 +0000 |
| commit | 85109e257ac97a0904106cafaf6e014c1d812326 (patch) | |
| tree | 489892f68d2ce963169cedb6eb781df2b5189dcf /compiler/rustc_codegen_llvm/src/asm.rs | |
| parent | 8007b506ac5da629f223b755f5a5391edd5f6d01 (diff) | |
| parent | 3fd463a5ca98c54b4e79271280c69ce5468e1173 (diff) | |
| download | rust-85109e257ac97a0904106cafaf6e014c1d812326.tar.gz rust-85109e257ac97a0904106cafaf6e014c1d812326.zip | |
Auto merge of #87581 - Amanieu:asm_clobber_abi, r=nagisa
Add support for clobber_abi to asm! This PR adds the `clobber_abi` feature that was proposed in #81092. Fixes #81092 cc `@rust-lang/wg-inline-asm` r? `@nagisa`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/asm.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/asm.rs | 9 |
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 4790b44bd19..4387f5301a5 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 => {} |
