Fix clobber_abi in RV32E and RV64E inline assembly

This commit is contained in:
Taiki Endo
2024-11-25 00:36:22 +09:00
parent ab3cf268b5
commit 736c397f41
5 changed files with 95 additions and 6 deletions

View File

@@ -80,7 +80,12 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
let mut clobber_abis = FxIndexMap::default();
if let Some(asm_arch) = asm_arch {
for (abi_name, abi_span) in &asm.clobber_abis {
match asm::InlineAsmClobberAbi::parse(asm_arch, &self.tcx.sess.target, *abi_name) {
match asm::InlineAsmClobberAbi::parse(
asm_arch,
&self.tcx.sess.target,
&self.tcx.sess.unstable_target_features,
*abi_name,
) {
Ok(abi) => {
// If the abi was already in the list, emit an error
match clobber_abis.get(&abi) {