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:
commit
99f8efec46
11 changed files with 273 additions and 62 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue