diff options
| author | Taiki Endo <te316e89@gmail.com> | 2024-11-25 00:36:22 +0900 |
|---|---|---|
| committer | Taiki Endo <te316e89@gmail.com> | 2024-11-25 00:36:22 +0900 |
| commit | 736c397f41f9030e500199fc28b56a7fab703759 (patch) | |
| tree | e3301420e984390d487ed22eb4e258698a350017 /compiler/rustc_codegen_cranelift/src/inline_asm.rs | |
| parent | ab3cf268b518f0312d86346db3bf79d5ec33b3b7 (diff) | |
| download | rust-736c397f41f9030e500199fc28b56a7fab703759.tar.gz rust-736c397f41f9030e500199fc28b56a7fab703759.zip | |
Fix clobber_abi in RV32E and RV64E inline assembly
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/inline_asm.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/inline_asm.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/inline_asm.rs b/compiler/rustc_codegen_cranelift/src/inline_asm.rs index 70176754f33..73ee47b2c63 100644 --- a/compiler/rustc_codegen_cranelift/src/inline_asm.rs +++ b/compiler/rustc_codegen_cranelift/src/inline_asm.rs @@ -472,9 +472,14 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> { let mut new_slot = |x| new_slot_fn(&mut slot_size, x); // Allocate stack slots for saving clobbered registers - let abi_clobber = InlineAsmClobberAbi::parse(self.arch, &self.tcx.sess.target, sym::C) - .unwrap() - .clobbered_regs(); + let abi_clobber = InlineAsmClobberAbi::parse( + self.arch, + &self.tcx.sess.target, + &self.tcx.sess.unstable_target_features, + sym::C, + ) + .unwrap() + .clobbered_regs(); for (i, reg) in self.registers.iter().enumerate().filter_map(|(i, r)| r.map(|r| (i, r))) { let mut need_save = true; // If the register overlaps with a register clobbered by function call, then |
