]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_target/src/asm/mod.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / compiler / rustc_target / src / asm / mod.rs
index 305ea7d50e66ea058a37d579d3223820bf4870c6..b52fa5bbcb2bae18af14da53873cd530bf9317f9 100644 (file)
@@ -533,6 +533,12 @@ impl InlineAsmRegClass {
             Self::Err => unreachable!("Use of InlineAsmRegClass::Err"),
         }
     }
+
+    /// Returns whether registers in this class can only be used as clobbers
+    /// and not as inputs/outputs.
+    pub fn is_clobber_only(self, arch: InlineAsmArch) -> bool {
+        self.supported_types(arch).is_empty()
+    }
 }
 
 #[derive(