about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSeth Pellegrino <seth@codecopse.net>2023-07-29 10:56:07 -0700
committerSeth Pellegrino <seth@codecopse.net>2023-08-08 18:09:56 -0700
commitd88ab223c5ef946c2fa5f756e7b6937a470f3dfc (patch)
treecd65f328f414de1a8e3f44fbc998feb813866375
parent897c7bb23bfd29b94de4b390cdc3c5c38be84990 (diff)
downloadrust-d88ab223c5ef946c2fa5f756e7b6937a470f3dfc.tar.gz
rust-d88ab223c5ef946c2fa5f756e7b6937a470f3dfc.zip
fix: add RiscvInterrupt* cconv to smir
These new interrupt calling conventions are not themselves stabilized,
but there are other unstable calling conventions present in the SMIR
mapping (e.g. AVR interrupts) and the mapping appears to be "complete"
so far, with no obvious way to represent unstable conventions separately
from the stable ones.
-rw-r--r--compiler/rustc_smir/src/rustc_smir/mod.rs2
-rw-r--r--compiler/rustc_smir/src/stable_mir/ty.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs
index d12de92db8a..3d9a0b9def4 100644
--- a/compiler/rustc_smir/src/rustc_smir/mod.rs
+++ b/compiler/rustc_smir/src/rustc_smir/mod.rs
@@ -877,6 +877,8 @@ impl<'tcx> Stable<'tcx> for ty::FnSig<'tcx> {
                 abi::Abi::PlatformIntrinsic => Abi::PlatformIntrinsic,
                 abi::Abi::Unadjusted => Abi::Unadjusted,
                 abi::Abi::RustCold => Abi::RustCold,
+                abi::Abi::RiscvInterruptM => Abi::RiscvInterruptM,
+                abi::Abi::RiscvInterruptS => Abi::RiscvInterruptS,
             },
         }
     }
diff --git a/compiler/rustc_smir/src/stable_mir/ty.rs b/compiler/rustc_smir/src/stable_mir/ty.rs
index c487db5b732..7aecbec4963 100644
--- a/compiler/rustc_smir/src/stable_mir/ty.rs
+++ b/compiler/rustc_smir/src/stable_mir/ty.rs
@@ -178,6 +178,8 @@ pub enum Abi {
     PlatformIntrinsic,
     Unadjusted,
     RustCold,
+    RiscvInterruptM,
+    RiscvInterruptS,
 }
 
 #[derive(Clone, Debug)]