1 use super::{InlineAsmArch, InlineAsmType};
2 use rustc_macros::HashStable_Generic;
3 use rustc_span::Symbol;
7 S390x S390xInlineAsmRegClass {
13 impl S390xInlineAsmRegClass {
14 pub fn valid_modifiers(self, _arch: super::InlineAsmArch) -> &'static [char] {
18 pub fn suggest_class(self, _arch: InlineAsmArch, _ty: InlineAsmType) -> Option<Self> {
22 pub fn suggest_modifier(
26 ) -> Option<(char, &'static str)> {
30 pub fn default_modifier(self, _arch: InlineAsmArch) -> Option<(char, &'static str)> {
34 pub fn supported_types(
37 ) -> &'static [(InlineAsmType, Option<Symbol>)] {
39 (Self::reg, _) => types! { _: I8, I16, I32, I64; },
40 (Self::freg, _) => types! { _: F32, F64; },
46 S390x S390xInlineAsmReg S390xInlineAsmRegClass {
78 "The frame pointer cannot be used as an operand for inline asm",
80 "The stack pointer cannot be used as an operand for inline asm",
82 "c0", "c1", "c2", "c3",
83 "c4", "c5", "c6", "c7",
84 "c8", "c9", "c10", "c11",
85 "c12", "c13", "c14", "c15"
87 "control registers are reserved by the kernel and cannot be used as operands for inline asm",
89 "a0", "a1", "a2", "a3",
90 "a4", "a5", "a6", "a7",
91 "a8", "a9", "a10", "a11",
92 "a12", "a13", "a14", "a15"
94 "access registers are not supported and cannot be used as operands for inline asm",
98 impl S390xInlineAsmReg {
101 out: &mut dyn fmt::Write,
102 _arch: InlineAsmArch,
103 _modifier: Option<char>,
105 write!(out, "%{}", self.name())