1 use super::{InlineAsmArch, InlineAsmType}; 2 use rustc_macros::HashStable_Generic; 3 use rustc_span::Symbol; 4 5 def_reg_class! { 6 SpirV SpirVInlineAsmRegClass { 7 reg, 8 } 9 } 10 11 impl SpirVInlineAsmRegClass { valid_modifiers(self, _arch: super::InlineAsmArch) -> &'static [char]12 pub fn valid_modifiers(self, _arch: super::InlineAsmArch) -> &'static [char] { 13 &[] 14 } 15 suggest_class(self, _arch: InlineAsmArch, _ty: InlineAsmType) -> Option<Self>16 pub fn suggest_class(self, _arch: InlineAsmArch, _ty: InlineAsmType) -> Option<Self> { 17 None 18 } 19 suggest_modifier( self, _arch: InlineAsmArch, _ty: InlineAsmType, ) -> Option<(char, &'static str)>20 pub fn suggest_modifier( 21 self, 22 _arch: InlineAsmArch, 23 _ty: InlineAsmType, 24 ) -> Option<(char, &'static str)> { 25 None 26 } 27 default_modifier(self, _arch: InlineAsmArch) -> Option<(char, &'static str)>28 pub fn default_modifier(self, _arch: InlineAsmArch) -> Option<(char, &'static str)> { 29 None 30 } 31 supported_types( self, _arch: InlineAsmArch, ) -> &'static [(InlineAsmType, Option<Symbol>)]32 pub fn supported_types( 33 self, 34 _arch: InlineAsmArch, 35 ) -> &'static [(InlineAsmType, Option<Symbol>)] { 36 match self { 37 Self::reg => { 38 types! { _: I8, I16, I32, I64, F32, F64; } 39 } 40 } 41 } 42 } 43 44 def_regs! { 45 // SPIR-V is SSA-based, it does not have registers. 46 SpirV SpirVInlineAsmReg SpirVInlineAsmRegClass {} 47 } 48