Auto merge of #86416 - Amanieu:asm_clobber_only, r=nagisa
Add clobber-only register classes for asm! These are needed to properly express a function call ABI using a clobber list, even though we don't support passing actual values into/out of these registers.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user