<s> { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , } ; if ( Kind < FirstTargetFixupKind ) return MCAsmBackend :: getFixupKindInfo ( Kind ) ;

assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && <STR_LIT> ) ;


<s> const MCFixupKindInfo & <ISA_LIT>AsmBackend :: getFixupKindInfo ( MCFixupKind Kind ) const { const static MCFixupKindInfo InfosLE [ <STR_LIT> ] = { { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , } ;

const static MCFixupKindInfo InfosBE [ <STR_LIT> ] = {


<s> default : llvm_unreachable ( <STR_LIT> ) ; case FK_Data_1 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_2 : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_4 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> :


<s> case <STR_LIT> : case <STR_LIT> : { int64_t Offset = int64_t ( Value ) - <NUM_LIT> ; return Offset > <NUM_LIT> || Offset < <NUM_LIT> || Offset & <NUM_LIT> ; } } llvm_unreachable ( <STR_LIT> ) ;


<s> const static MCFixupKindInfo Infos [ <STR_LIT> ] = { { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , } ; if ( Kind < FirstTargetFixupKind ) return MCAsmBackend :: getFixupKindInfo ( Kind ) ; assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && <STR_LIT> ) ;

return Infos [ Kind - FirstTargetFixupKind ] ;


<s> llvm_unreachable ( <STR_LIT> ) ; case FK_Data_1 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_2 : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_4 :


<s> default : return Op ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ;


<s> if ( ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> ) { if ( const MCSymbolRefExpr * A = Target . getSymA ( ) ) { const MCSymbol & Sym = A -> getSymbol ( ) . AliasedSymbol ( ) ; if ( Asm . isThumbFunc ( & Sym ) ) Value |= <NUM_LIT> ;


<s> Value = adjustFixupValue ( Fixup , Value , IsPCRel , Ctx , IsLittleEndian , true ) ; if ( ! Value ) return ; unsigned Offset = Fixup . getOffset ( ) ; assert ( Offset + NumBytes <= Data . size ( ) && <STR_LIT> ) ; unsigned FullSizeBytes ; if ( ! IsLittleEndian ) {

FullSizeBytes = getFixupKindContainerSizeBytes ( Fixup . getKind ( ) ) ;


<s> unsigned FullSizeBytes ; if ( ! IsLittleEndian ) { FullSizeBytes = getFixupKindContainerSizeBytes ( Fixup . getKind ( ) ) ; assert ( ( Offset + FullSizeBytes ) <= Data . size ( ) && <STR_LIT> ) ; assert ( NumBytes <= FullSizeBytes && <STR_LIT> ) ; } for ( unsigned i = <NUM_LIT> ; i != NumBytes ; ++ i ) { unsigned Idx = IsLittleEndian ? i : ( FullSizeBytes - <NUM_LIT> - i ) ;

Data [ Offset + Idx ] |= uint8_t ( ( Value >> ( i * <NUM_LIT> ) ) & <NUM_LIT> ) ;


<s> const MCSymbolRefExpr * A = Target . getSymA ( ) ; const MCSymbol * Sym = A ? & A -> getSymbol ( ) : nullptr ; const unsigned FixupKind = Fixup . getKind ( ) ; if ( FixupKind == FK_Data_4 || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> ) { if ( Sym ) { if ( Asm . isThumbFunc ( Sym ) ) Value |= <NUM_LIT> ; } } if ( IsResolved && ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) { assert ( Sym && <STR_LIT> ) ;

if ( Sym -> isExternal ( ) || Value >= <NUM_LIT> ) IsResolved = false ;


MachO :: CPUSubType<ISA_LIT> CS = StringSwitch < MachO :: CPUSubType<ISA_LIT> > ( TheTriple . getArchName ( ) ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V4T ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V5TEJ ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6 ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7EM ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7K ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7S ) . Default ( MachO :: CPU_SUBTYPE_<ISA_LIT>_V7 ) ;


<s> if ( ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> ) { if ( A ) { const MCSymbol & Sym = A -> getSymbol ( ) ; if ( Asm . isThumbFunc ( & Sym ) ) Value |= <NUM_LIT> ; } }

if ( A && ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) {


<s> if ( ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> ) { if ( A ) { const MCSymbol & Sym = A -> getSymbol ( ) ; if ( Asm . isThumbFunc ( & Sym ) ) Value |= <NUM_LIT> ; } } if ( A && ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) {


<s> for ( unsigned i = <NUM_LIT> ; i != NumBytes ; ++ i ) { unsigned Idx = IsLittleEndian ? i : ( FullSizeBytes - <NUM_LIT> - i ) ;


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_4 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> :


<s> case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_4 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> :


<s> const MCSymbolData & SymData = Asm . getSymbolData ( Sym ) ; IsResolved = ( SymData . getFragment ( ) == DF ) ; } if ( A && ( ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) ) IsResolved = false ; ( void ) adjustFixupValue ( Fixup , Value , false , & Asm . getContext ( ) , IsLittleEndian ) ;


<s> const MCSymbolData & SymData = Asm . getSymbolData ( Sym ) ; IsResolved = ( SymData . getFragment ( ) == DF ) ; } if ( A && ( ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) ) IsResolved = false ;

( void ) adjustFixupValue ( Fixup , Value , false , & Asm . getContext ( ) , IsLittleEndian ) ;


<s> if ( IsLittleEndian ) { uint32_t Swapped = ( Value & <NUM_LIT> ) >> <NUM_LIT> ; Swapped |= ( Value & <NUM_LIT> ) << <NUM_LIT> ; return Swapped ; } else return Value ;


<s> static uint32_t swapHalfWords ( uint32_t Value , bool IsLittleEndian ) { if ( IsLittleEndian ) {

uint32_t Swapped = ( Value & <NUM_LIT> ) >> <NUM_LIT> ;


<s> case FK_Data_1 : return <NUM_LIT> ; case FK_Data_2 : return <NUM_LIT> ; case FK_Data_4 : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; }


<s> default : llvm_unreachable ( <STR_LIT> ) ; case FK_NONE : return <NUM_LIT> ; case FK_Data_1 : return <NUM_LIT> ; case FK_Data_2 : return <NUM_LIT> ; case FK_Data_4 : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> :


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_4 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> :


<s> } if ( Sym && Sym -> isELF ( ) ) { unsigned Type = cast < MCSymbolELF > ( Sym ) -> getType ( ) ; if ( ( Type == ELF :: STT_FUNC || Type == ELF :: STT_GNU_IFUNC ) ) { if ( Asm . isThumbFunc ( Sym ) && ( FixupKind == <STR_LIT> ) ) return true ; if ( ! Asm . isThumbFunc ( Sym ) && ( FixupKind == <STR_LIT> || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> ) ) return true ; } } if ( A && ( FixupKind == <STR_LIT> || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> || FixupKind == <STR_LIT> ) ) return true ; return false ;


<s> switch ( TheTriple . getObjectFormat ( ) ) { default : llvm_unreachable ( <STR_LIT> ) ; case Triple :: MachO : { MachO :: CPUSubType<ISA_LIT> CS = StringSwitch < MachO :: CPUSubType<ISA_LIT> > ( TheTriple . getArchName ( ) ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V4T ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V5TEJ ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6 ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7EM ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7K ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7S ) . Default ( MachO :: CPU_SUBTYPE_<ISA_LIT>_V7 ) ; return new <ISA_LIT>AsmBackendDarwin ( T , TT , CS ) ; } case Triple :: COFF : assert ( TheTriple . isOSWindows ( ) && <STR_LIT> ) ; return new <ISA_LIT>AsmBackendWinCOFF ( T , TT ) ; case Triple :: ELF : assert ( TheTriple . isOSBinFormatELF ( ) && <STR_LIT> ) ; uint8_t OSABI = MCELFObjectTargetWriter :: getOSABI ( Triple ( TT ) . getOS ( ) ) ;

return new <ISA_LIT>AsmBackendELF ( T , TT , OSABI , isLittle ) ;


<s> if ( ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> ) { if ( A ) { const MCSymbol & Sym = A -> getSymbol ( ) . AliasedSymbol ( ) ; if ( Asm . isThumbFunc ( & Sym ) ) Value |= <NUM_LIT> ; } } if ( A && ( ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) ) IsResolved = false ;


<s> void processFixupValue ( const MCAssembler & Asm , const MCAsmLayout & Layout , const MCFixup & Fixup , const MCFragment * DF , MCValue & Target , uint64_t & Value , bool & IsResolved ) { const MCSymbolRefExpr * A = Target . getSymA ( ) ; if ( ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> ) {


<s> object :: mach :: CPUSubtype<ISA_LIT> CS = StringSwitch < object :: mach :: CPUSubtype<ISA_LIT> > ( TheTriple . getArchName ( ) ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V4T ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V5TEJ ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V6 ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V6M ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V7EM ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V7F ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V7K ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V7M ) . Cases ( <STR_LIT> , <STR_LIT> , object :: mach :: CS<ISA_LIT>_V7S ) . Default ( object :: mach :: CS<ISA_LIT>_V7 ) ; return new Darwin<ISA_LIT>AsmBackend ( T , TT , CS ) ; }

if ( TheTriple . isOSWindows ( ) ) assert ( <NUM_LIT> && <STR_LIT> ) ;


<s> else if ( Offset > <NUM_LIT> || Offset < <NUM_LIT> ) return <STR_LIT> ; break ; } case <STR_LIT> : { int64_t Offset = ( Value & ~ <NUM_LIT> ) ; if ( Offset == <NUM_LIT> ) return <STR_LIT> ; break ; } case <STR_LIT> : return checkPCRelOffset ( Value , <NUM_LIT> , <NUM_LIT> ) ; case <STR_LIT> : return checkPCRelOffset ( Value , - <NUM_LIT> , + <NUM_LIT> ) ; case <STR_LIT> : return checkPCRelOffset ( Value , - <NUM_LIT> , + <NUM_LIT> ) ; case <STR_LIT> : return checkPCRelOffset ( Value , - <NUM_LIT> , + <NUM_LIT> ) ;


<s> break ; } case <STR_LIT> : case <STR_LIT> : { int64_t Offset = int64_t ( Value ) - <NUM_LIT> ; if ( Offset & <NUM_LIT> ) return <STR_LIT> ; else if ( Offset > <NUM_LIT> || Offset < <NUM_LIT> ) return <STR_LIT> ; break ; } case <STR_LIT> : { int64_t Offset = ( Value & ~ <NUM_LIT> ) ; if ( Offset == <NUM_LIT> ) return <STR_LIT> ; break ; } case <STR_LIT> : return checkPCRelOffset ( Value , <NUM_LIT> , <NUM_LIT> ) ; case <STR_LIT> : return checkPCRelOffset ( Value , - <NUM_LIT> , + <NUM_LIT> ) ; case <STR_LIT> : return checkPCRelOffset ( Value , - <NUM_LIT> , + <NUM_LIT> ) ; case <STR_LIT> :


<s> const MCSymbolRefExpr * A = Target . getSymA ( ) ; const MCSymbol * Sym = A ? & A -> getSymbol ( ) : nullptr ; if ( ( unsigned ) Fixup . getKind ( ) == FK_Data_4 || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) { if ( Sym ) { if ( Asm . isThumbFunc ( Sym ) ) Value |= <NUM_LIT> ; } } if ( IsResolved && ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) { assert ( Sym && <STR_LIT> ) ; if ( Sym -> isExternal ( ) || Value >= <NUM_LIT> ) IsResolved = false ; } if ( A && ( ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> || ( unsigned ) Fixup . getKind ( ) == <STR_LIT> ) ) IsResolved = false ;


<s> switch ( Op ) { default : return Op ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; }


<s> if ( TheTriple . isOSDarwin ( ) ) { MachO :: CPUSubType<ISA_LIT> CS = StringSwitch < MachO :: CPUSubType<ISA_LIT> > ( TheTriple . getArchName ( ) ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V4T ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V5TEJ ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6 ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7EM ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7F ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7K ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7S ) . Default ( MachO :: CPU_SUBTYPE_<ISA_LIT>_V7 ) ; return new Darwin<ISA_LIT>AsmBackend ( T , TT , CS ) ;


<s> MCObjectWriter * createObjectWriter ( raw_ostream & OS ) const {

return create<ISA_LIT>MachObjectWriter ( OS , false , MachO :: CPU_TYPE_<ISA_LIT> , Subtype ) ;


<s> if ( ( int64_t ) Value < <NUM_LIT> ) { Value = - Value ; opc = <NUM_LIT> ; } uint32_t out = ( opc << <NUM_LIT> ) ; out |= ( Value & <NUM_LIT> ) << <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) << <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) ; uint64_t swapped = ( out & <NUM_LIT> ) >> <NUM_LIT> ; swapped |= ( out & <NUM_LIT> ) << <NUM_LIT> ; return swapped ; } case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> & ( ( Value - <NUM_LIT> ) >> <NUM_LIT> ) ; case <STR_LIT> : { Value = Value - <NUM_LIT> ; Value >>= <NUM_LIT> ; uint32_t out = <NUM_LIT> ; bool I = Value & <NUM_LIT> ; bool J1 = Value & <NUM_LIT> ; bool J2 = Value & <NUM_LIT> ; J1 ^= I ; J2 ^= I ; out |= I << <NUM_LIT> ; out |= ! J1 << <NUM_LIT> ; out |= ! J2 << <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) << <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) ; uint64_t swapped = ( out & <NUM_LIT> ) >> <NUM_LIT> ; swapped |= ( out & <NUM_LIT> ) << <NUM_LIT> ; return swapped ; } case <STR_LIT> : { Value = Value - <NUM_LIT> ; Value >>= <NUM_LIT> ; uint64_t out = <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) << <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) >> <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) >> <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) << <NUM_LIT> ; out |= ( Value & <NUM_LIT> ) ; uint32_t swapped = ( out & <NUM_LIT> ) >> <NUM_LIT> ; swapped |= ( out & <NUM_LIT> ) << <NUM_LIT> ; return swapped ; } case <STR_LIT> : { unsigned isNeg = ( int64_t ( Value - <NUM_LIT> ) < <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ; uint32_t Binary = <NUM_LIT> ; Value = <NUM_LIT> & ( ( Value - <NUM_LIT> ) >> <NUM_LIT> ) ;

Binary = ( Value & <NUM_LIT> ) << <NUM_LIT> ;


<s> unsigned Offset = Fixup . getOffset ( ) ;

for ( unsigned i = <NUM_LIT> ; i != NumBytes ; ++ i ) Data [ Offset + i ] |= uint8_t ( ( Value >> ( i * <NUM_LIT> ) ) & <NUM_LIT> ) ;


<s> MCAsmBackend * llvm :: create<ISA_LIT>AsmBackend ( const Target & T , StringRef TT ) { Triple TheTriple ( TT ) ; if ( TheTriple . isOSDarwin ( ) ) {

if ( TheTriple . getArchName ( ) == <STR_LIT> || TheTriple . getArchName ( ) == <STR_LIT> ) return new Darwin<ISA_LIT>AsmBackend ( T , TT , object :: mach :: CS<ISA_LIT>_V4T ) ;


<s> if ( TheTriple . isOSDarwin ( ) ) { if ( TheTriple . getArchName ( ) == <STR_LIT> || TheTriple . getArchName ( ) == <STR_LIT> ) return new Darwin<ISA_LIT>AsmBackend ( T , TT , object :: mach :: CS<ISA_LIT>_V4T ) ; else if ( TheTriple . getArchName ( ) == <STR_LIT> || TheTriple . getArchName ( ) == <STR_LIT> ) return new Darwin<ISA_LIT>AsmBackend ( T , TT , object :: mach :: CS<ISA_LIT>_V5TEJ ) ; else if ( TheTriple . getArchName ( ) == <STR_LIT> || TheTriple . getArchName ( ) == <STR_LIT> ) return new Darwin<ISA_LIT>AsmBackend ( T , TT , object :: mach :: CS<ISA_LIT>_V6 ) ;

return new Darwin<ISA_LIT>AsmBackend ( T , TT , object :: mach :: CS<ISA_LIT>_V7 ) ;


<s> ELF<ISA_LIT>AsmBackend ( const Target & T , const StringRef TT , Triple :: OSType _OSType ) : <ISA_LIT>AsmBackend ( T , TT ) , OSType ( _OSType ) {


<s> const static MCFixupKindInfo Infos [ <STR_LIT> ] = { { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , } ; if ( Kind < FirstTargetFixupKind ) return MCAsmBackend :: getFixupKindInfo ( Kind ) ;

assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && <STR_LIT> ) ;


<s> { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , } ; if ( Kind < FirstTargetFixupKind ) return MCAsmBackend :: getFixupKindInfo ( Kind ) ; assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && <STR_LIT> ) ; return Infos [ Kind - FirstTargetFixupKind ] ;


<s> return true ; } const uint32_t nopEncoding = hasNOP ( ) ? <ISA_LIT>v6T2_NopEncoding : <ISA_LIT>v4_NopEncoding ; uint64_t NumNops = Count / <NUM_LIT> ; for ( uint64_t i = <NUM_LIT> ; i != NumNops ; ++ i ) OW -> Write32 ( nopEncoding ) ; switch ( Count % <NUM_LIT> ) { default : break ; case <NUM_LIT> : OW -> Write8 ( <NUM_LIT> ) ; break ; case <NUM_LIT> : OW -> Write16 ( <NUM_LIT> ) ; break ; case <NUM_LIT> : OW -> Write16 ( <NUM_LIT> ) ; OW -> Write8 ( <NUM_LIT> ) ; break ; } return true ;


<s> uint64_t NumNops = Count / <NUM_LIT> ; for ( uint64_t i = <NUM_LIT> ; i != NumNops ; ++ i ) OW -> Write16 ( nopEncoding ) ; if ( Count & <NUM_LIT> ) OW -> Write8 ( <NUM_LIT> ) ; return true ; } const uint32_t nopEncoding = hasNOP ( ) ? <ISA_LIT>v6T2_NopEncoding : <ISA_LIT>v4_NopEncoding ; uint64_t NumNops = Count / <NUM_LIT> ; for ( uint64_t i = <NUM_LIT> ; i != NumNops ; ++ i ) OW -> Write32 ( nopEncoding ) ;


<s> if ( Offset > <NUM_LIT> || Offset < - <NUM_LIT> ) return <STR_LIT> ; break ; } case <STR_LIT> : case <STR_LIT> : { int64_t Offset = int64_t ( Value ) - <NUM_LIT> ; if ( Offset & <NUM_LIT> ) return <STR_LIT> ; else if ( Offset > <NUM_LIT> || Offset < <NUM_LIT> ) return <STR_LIT> ; break ; }


<s> MCAsmBackend * llvm :: create<ISA_LIT>AsmBackend ( const Target & T , const MCRegisterInfo & MRI , StringRef TT , StringRef CPU ) { Triple TheTriple ( TT ) ; if ( TheTriple . isOSDarwin ( ) ) { MachO :: CPUSubType<ISA_LIT> CS = StringSwitch < MachO :: CPUSubType<ISA_LIT> > ( TheTriple . getArchName ( ) ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V4T ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V5TEJ ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6 ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7EM ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7F ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7K ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7S ) . Default ( MachO :: CPU_SUBTYPE_<ISA_LIT>_V7 ) ; return new Darwin<ISA_LIT>AsmBackend ( T , TT , CS ) ; } if ( TheTriple . isOSBinFormatCOFF ( ) ) assert ( <NUM_LIT> && <STR_LIT> ) ;

uint8_t OSABI = MCELFObjectTargetWriter :: getOSABI ( Triple ( TT ) . getOS ( ) ) ;


<s> NaCl<ISA_LIT>AsmBackend ( const Target & T , const StringRef TT , uint8_t _OSABI ) : ELF<ISA_LIT>AsmBackend ( T , TT , _OSABI ) { State . SaveCount = <NUM_LIT> ;


<s> MCAsmBackend * llvm :: create<ISA_LIT>AsmBackend ( const Target & T , const MCRegisterInfo & MRI , StringRef TT , StringRef CPU , bool isLittle ) { Triple TheTriple ( TT ) ; switch ( TheTriple . getObjectFormat ( ) ) { default : llvm_unreachable ( <STR_LIT> ) ; case Triple :: MachO : { MachO :: CPUSubType<ISA_LIT> CS = StringSwitch < MachO :: CPUSubType<ISA_LIT> > ( TheTriple . getArchName ( ) ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V4T ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V5TEJ ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6 ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V6M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7EM ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7K ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7M ) . Cases ( <STR_LIT> , <STR_LIT> , MachO :: CPU_SUBTYPE_<ISA_LIT>_V7S ) . Default ( MachO :: CPU_SUBTYPE_<ISA_LIT>_V7 ) ; return new Darwin<ISA_LIT>AsmBackend ( T , TT , CS ) ; }


<s> bool CustomExpandInst ( const MCInst & Inst , MCStreamer & Out ) { return CustomExpandInstNaCl<ISA_LIT> ( * STI , Inst , Out , State ) ;


<s> NaCl<ISA_LIT>AsmBackend ( const Target & T , const StringRef TT , uint8_t _OSABI , bool isLittle ) : ELF<ISA_LIT>AsmBackend ( T , TT , _OSABI , isLittle ) , STI ( <ISA_LIT>_MC :: create<ISA_LIT>MCSubtargetInfo ( TT , <STR_LIT> , <STR_LIT> ) ) { assert ( isLittle && <STR_LIT> ) ; State . SaveCount = <NUM_LIT> ;


<s> assert ( isLittle && <STR_LIT> ) ; State . SaveCount = <NUM_LIT> ; State . I = <NUM_LIT> ; State . RecursiveCall = false ;


<s> ~ NaCl<ISA_LIT>AsmBackend ( ) override {


<s> <ISA_LIT>WinCOFFAsmBackend ( const Target & T , StringRef Triple ) : <ISA_LIT>AsmBackend ( T , Triple , true ) {


<s> Darwin<ISA_LIT>AsmBackend ( const Target & T , StringRef TT , MachO :: CPUSubType<ISA_LIT> st ) : <ISA_LIT>AsmBackend ( T , TT , true ) , Subtype ( st ) { HasDataInCodeSupport = true ;


<s> ELF<ISA_LIT>AsmBackend ( const Target & T , StringRef TT , uint8_t OSABI , bool IsLittle ) : <ISA_LIT>AsmBackend ( T , TT , IsLittle ) , OSABI ( OSABI ) {


<s> const MCFixupKindInfo & getFixupKindInfo ( MCFixupKind Kind ) const { const static MCFixupKindInfo Infos [ <STR_LIT> ] = { { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , } ; if ( Kind < FirstTargetFixupKind ) return MCAsmBackend :: getFixupKindInfo ( Kind ) ; assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && <STR_LIT> ) ;

return Infos [ Kind - FirstTargetFixupKind ] ;


<s> const uint32_t <ISA_LIT>v6T2_NopEncoding = <NUM_LIT> ; if ( isThumb ( ) ) { const uint16_t nopEncoding = hasNOP ( ) ? Thumb2_16bitNopEncoding : Thumb1_16bitNopEncoding ; uint64_t NumNops = Count / <NUM_LIT> ; for ( uint64_t i = <NUM_LIT> ; i != NumNops ; ++ i ) OW -> Write16 ( nopEncoding ) ; if ( Count & <NUM_LIT> ) OW -> Write8 ( <NUM_LIT> ) ; return true ; } const uint32_t nopEncoding = hasNOP ( ) ? <ISA_LIT>v6T2_NopEncoding : <ISA_LIT>v4_NopEncoding ; uint64_t NumNops = Count / <NUM_LIT> ; for ( uint64_t i = <NUM_LIT> ; i != NumNops ; ++ i ) OW -> Write32 ( nopEncoding ) ; switch ( Count % <NUM_LIT> ) { default : break ;

case <NUM_LIT> : OW -> Write8 ( <NUM_LIT> ) ; break ;


<s> const MCFixupKindInfo & getFixupKindInfo ( MCFixupKind Kind ) const { const static MCFixupKindInfo Infos [ <STR_LIT> ] = { { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel | MCFixupKindInfo :: FKF_IsAlignedDownTo32Bits } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , { <STR_LIT> , <NUM_LIT> , <NUM_LIT> , MCFixupKindInfo :: FKF_IsPCRel } , } ; if ( Kind < FirstTargetFixupKind ) return MCAsmBackend :: getFixupKindInfo ( Kind ) ; assert ( unsigned ( Kind - FirstTargetFixupKind ) < getNumFixupKinds ( ) && <STR_LIT> ) ; return Infos [ Kind - FirstTargetFixupKind ] ;


<s> case <STR_LIT> : return <NUM_LIT> ; case FK_Data_2 : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return <NUM_LIT> ; case FK_Data_4 : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> :


<s> const MCSymbolRefExpr * A = Target . getSymA ( ) ; if ( ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> && ( unsigned ) Fixup . getKind ( ) != <STR_LIT> ) { if ( A ) { const MCSymbol & Sym = A -> getSymbol ( ) . AliasedSymbol ( ) ;

if ( Asm . isThumbFunc ( & Sym ) ) Value |= <NUM_LIT> ;


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , const Triple & TT , const MCRegisterInfo & MRI , MachO :: CPUSubType<ISA_LIT> st ) : <ISA_LIT>AsmBackend ( T , TT , true ) , MRI ( MRI ) , Subtype ( st ) {


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , const MCSubtargetInfo & STI , const MCRegisterInfo & MRI , MachO :: CPUSubType<ISA_LIT> st ) : <ISA_LIT>AsmBackend ( T , STI , <STR_LIT> ) , MRI ( MRI ) , Subtype ( st ) {


<s> std :: unique_ptr < MCObjectTargetWriter > createObjectTargetWriter ( ) const override {

return create<ISA_LIT>MachObjectWriter ( false , MachO :: CPU_TYPE_<ISA_LIT> , Subtype ) ;


<s> return create<ISA_LIT>MachObjectWriter ( false , MachO :: CPU_TYPE_<ISA_LIT> , Subtype ) ;


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , StringRef TT , MachO :: CPUSubType<ISA_LIT> st ) : <ISA_LIT>AsmBackend ( T , TT , true ) , Subtype ( st ) {


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , const MCSubtargetInfo & STI , const MCRegisterInfo & MRI ) : <ISA_LIT>AsmBackend ( T , STI . getTargetTriple ( ) . isThumb ( ) , <STR_LIT> ) , MRI ( MRI ) , TT ( STI . getTargetTriple ( ) ) , Subtype ( ( MachO :: CPUSubType<ISA_LIT> ) cantFail ( MachO :: getCPUSubType ( STI . getTargetTriple ( ) ) ) ) {


<s> return create<ISA_LIT>MachObjectWriter ( false , cantFail ( MachO :: getCPUType ( TT ) ) , Subtype ) ;


return create<ISA_LIT>MachObjectWriter ( false , cantFail ( MachO :: getCPUType ( TT ) ) , Subtype ) ;


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , const MCSubtargetInfo & STI , const MCRegisterInfo & MRI , MachO :: CPUSubType<ISA_LIT> st ) : <ISA_LIT>AsmBackend ( T , STI , true ) , MRI ( MRI ) , Subtype ( st ) {


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , const MCSubtargetInfo & STI , const MCRegisterInfo & MRI ) : <ISA_LIT>AsmBackend ( T , STI , <STR_LIT> ) , MRI ( MRI ) , TT ( STI . getTargetTriple ( ) ) , Subtype ( ( MachO :: CPUSubType<ISA_LIT> ) cantFail ( MachO :: getCPUSubType ( STI . getTargetTriple ( ) ) ) ) {


<s> <ISA_LIT>AsmBackendDarwin ( const Target & T , const Triple & TT , MachO :: CPUSubType<ISA_LIT> st ) : <ISA_LIT>AsmBackend ( T , TT , true ) , Subtype ( st ) {


<s> return create<ISA_LIT>MachObjectWriter ( OS , false , MachO :: CPU_TYPE_<ISA_LIT> , Subtype ) ;


<s> <ISA_LIT>AsmBackendELF ( const Target & T , const Triple & TT , uint8_t OSABI , bool IsLittle ) : <ISA_LIT>AsmBackend ( T , TT , IsLittle ) , OSABI ( OSABI ) {


<s> return create<ISA_LIT>ELFObjectWriter ( OS , OSABI , isLittle ( ) ) ;


<s> <ISA_LIT>AsmBackendELF ( const Target & T , StringRef TT , uint8_t OSABI , bool IsLittle ) : <ISA_LIT>AsmBackend ( T , TT , IsLittle ) , OSABI ( OSABI ) {


<s> <ISA_LIT>AsmBackendELF ( const Target & T , bool isThumb , uint8_t OSABI , <STR_LIT> Endian ) : <ISA_LIT>AsmBackend ( T , isThumb , Endian ) , OSABI ( OSABI ) {


<s> <ISA_LIT>AsmBackendELF ( const Target & T , const MCSubtargetInfo & STI , uint8_t OSABI , bool IsLittle ) : <ISA_LIT>AsmBackend ( T , STI , IsLittle ) , OSABI ( OSABI ) {


<s> std :: unique_ptr < MCObjectWriter > createObjectWriter ( raw_pwrite_stream & OS ) const override { return create<ISA_LIT>ELFObjectWriter ( OS , OSABI , isLittle ( ) ) ;


<s> <ISA_LIT>AsmBackendELF ( const Target & T , const MCSubtargetInfo & STI , uint8_t OSABI , <STR_LIT> Endian ) : <ISA_LIT>AsmBackend ( T , STI , Endian ) , OSABI ( OSABI ) {


<s> <ISA_LIT>AsmBackendNaClELF ( const Target & T , const StringRef TT , uint8_t _OSABI , bool isLittle ) : <ISA_LIT>AsmBackendELF ( T , TT , _OSABI , isLittle ) , STI ( <ISA_LIT>_MC :: create<ISA_LIT>MCSubtargetInfo ( TT , <STR_LIT> , <STR_LIT> ) ) { assert ( isLittle && <STR_LIT> ) ; State . SaveCount = <NUM_LIT> ; State . I = <NUM_LIT> ; State . RecursiveCall = false ;


<s> assert ( isLittle && <STR_LIT> ) ; State . SaveCount = <NUM_LIT> ; State . I = <NUM_LIT> ; State . RecursiveCall = false ;


<s> bool CustomExpandInst ( const MCInst & Inst , MCStreamer & Out ) override { return CustomExpandInstNaCl<ISA_LIT> ( * STI , Inst , Out , State ) ;


<s> ~ <ISA_LIT>AsmBackendNaClELF ( ) override {


<s> std :: unique_ptr < MCObjectWriter > createObjectWriter ( raw_pwrite_stream & OS ) const override {

return create<ISA_LIT>WinCOFFObjectWriter ( OS , false ) ;


<s> return create<ISA_LIT>WinCOFFObjectWriter ( OS , false ) ;


<s> <ISA_LIT>AsmBackendWinCOFF ( const Target & T , const MCSubtargetInfo & STI ) : <ISA_LIT>AsmBackend ( T , STI , <STR_LIT> ) {


<s> return create<ISA_LIT>WinCOFFObjectWriter ( ) ;


<s> <ISA_LIT>AsmBackendWinCOFF ( const Target & T , StringRef Triple ) : <ISA_LIT>AsmBackend ( T , Triple , true ) {


<s> <ISA_LIT>AsmBackendWinCOFF ( const Target & T , bool isThumb ) : <ISA_LIT>AsmBackend ( T , isThumb , <STR_LIT> ) {


<s> <ISA_LIT>AsmBackendWinCOFF ( const Target & T , const MCSubtargetInfo & STI ) : <ISA_LIT>AsmBackend ( T , STI , true ) {


<s> return create<ISA_LIT>WinCOFFObjectWriter ( false ) ;


<s> <ISA_LIT>AsmBackendWinCOFF ( const Target & T , const Triple & TheTriple ) : <ISA_LIT>AsmBackend ( T , TheTriple , true ) {


<s> MCObjectWriter * createObjectWriter ( raw_pwrite_stream & OS ) const override {


<s> <ISA_LIT>AsmBackend ( const Target & T , const Triple & TT , bool IsLittle ) : MCAsmBackend ( ) , STI ( <ISA_LIT>_MC :: create<ISA_LIT>MCSubtargetInfo ( TT , <STR_LIT> , <STR_LIT> ) ) , isThumbMode ( TT . getArchName ( ) . startswith ( <STR_LIT> ) ) , IsLittleEndian ( IsLittle ) {


<s> return STI -> getFeatureBits ( ) [ <STR_LIT> ] ;


<s> ~ <ISA_LIT>AsmBackend ( ) override {


<s> OwningPtr < const TargetMachine > targetMachine ( T . createTargetMachine ( tripleString , featureString ) ) ; InitRegisterMap ( targetMachine -> getRegisterInfo ( ) ) ;


<s> <ISA_LIT>BaseAsmLexer ( const Target & T , const MCAsmInfo & MAI ) : TargetAsmLexer ( T ) , AsmInfo ( MAI ) {


<s> unsigned numRegs = info -> getNumRegs ( ) ; for ( unsigned i = <NUM_LIT> ; i < numRegs ; ++ i ) {

const char * regName = info -> getName ( i ) ;


<s> void LLVMInitialize<ISA_LIT>AsmLexer ( ) { RegisterAsmLexer < <ISA_LIT>AsmLexer > X ( The<ISA_LIT>Target ) ;

RegisterAsmLexer < ThumbAsmLexer > Y ( TheThumbTarget ) ;


<s> std :: string tripleString ( <STR_LIT> ) ; std :: string featureString ; OwningPtr < const TargetMachine > targetMachine ( T . createTargetMachine ( tripleString , featureString ) ) ;

InitRegisterMap ( targetMachine -> getRegisterInfo ( ) ) ;


<s> std :: string tripleString ( <STR_LIT> ) ; std :: string featureString ; OwningPtr < const TargetMachine > targetMachine ( T . createTargetMachine ( tripleString , featureString ) ) ; InitRegisterMap ( targetMachine -> getRegisterInfo ( ) ) ;


<s> unsigned regID = MatchRegisterName ( lowerRef ) ; if ( regID ) { return AsmToken ( AsmToken :: Register , lexedToken . getString ( ) , static_cast < int64_t > ( regID ) ) ; } else { return AsmToken ( lexedToken ) ; }


<s> return AsmToken ( lexedToken ) ; case AsmToken :: Identifier : { std :: string upperCase = lexedToken . getString ( ) . str ( ) ; std :: string lowerCase = LowercaseString ( upperCase ) ; StringRef lowerRef ( lowerCase ) ; unsigned regID = MatchRegisterName ( lowerRef ) ; if ( regID ) { return AsmToken ( AsmToken :: Register , lexedToken . getString ( ) , static_cast < int64_t > ( regID ) ) ; } else { return AsmToken ( lexedToken ) ; } }


<s> const AsmToken & lexedToken = lexDefinite ( ) ; switch ( lexedToken . getKind ( ) ) { default : break ; case AsmToken :: Error : SetError ( Lexer -> getErrLoc ( ) , Lexer -> getErr ( ) ) ; break ; case AsmToken :: Identifier : { std :: string lowerCase = lexedToken . getString ( ) . lower ( ) ; unsigned regID = MatchRegisterName ( lowerCase ) ; if ( ! regID ) { regID = StringSwitch < unsigned > ( lowerCase ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( <NUM_LIT> ) ; } if ( regID ) return AsmToken ( AsmToken :: Register , lexedToken . getString ( ) , static_cast < int64_t > ( regID ) ) ;


<s> <ISA_LIT>AsmLexer ( const Target & T , const MCRegisterInfo & MRI , const MCAsmInfo & MAI ) : <ISA_LIT>BaseAsmLexer ( T , MAI ) {


<s> <ISA_LIT>BaseAsmLexer ( const Target & T , const MCAsmInfo & MAI ) : MCTargetAsmLexer ( T ) , AsmInfo ( MAI ) {


<s> const char * regName = info -> getName ( i ) ; if ( regName ) RegisterMap [ regName ] = i ;


<s> for ( unsigned i = <NUM_LIT> ; i < numRegs ; ++ i ) { const char * regName = info -> getName ( i ) ; if ( regName ) RegisterMap [ regName ] = i ; }


<s> const AsmToken & lexDefinite ( ) { return getLexer ( ) -> Lex ( ) ;


<s> switch ( AsmInfo . getAssemblerDialect ( ) ) { default : SetError ( SMLoc ( ) , <STR_LIT> ) ;

return AsmToken ( AsmToken :: Error , <STR_LIT> , <NUM_LIT> ) ;


<s> AsmToken <STR_LIT> ( ) { const AsmToken & lexedToken = lexDefinite ( ) ; switch ( lexedToken . getKind ( ) ) { default : break ; case AsmToken :: Error : SetError ( Lexer -> getErrLoc ( ) , Lexer -> getErr ( ) ) ; break ; case AsmToken :: Identifier : { std :: string upperCase = lexedToken . getString ( ) . str ( ) ; std :: string lowerCase = LowercaseString ( upperCase ) ; StringRef lowerRef ( lowerCase ) ; unsigned regID = MatchRegisterName ( lowerRef ) ; if ( ! regID ) { regID = StringSwitch < unsigned > ( lowerCase ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( <NUM_LIT> ) ; } if ( regID ) return AsmToken ( AsmToken :: Register , lexedToken . getString ( ) , static_cast < int64_t > ( regID ) ) ;


<s> RegisterMCAsmLexer < <ISA_LIT>AsmLexer > X ( The<ISA_LIT>Target ) ; RegisterMCAsmLexer < ThumbAsmLexer > Y ( TheThumbTarget ) ;


<s> RegisterMCAsmLexer < ThumbAsmLexer > Y ( TheThumbTarget ) ;


<s> unsigned MatchRegisterName ( StringRef Name ) { rmap_ty :: iterator iter = RegisterMap . find ( Name . str ( ) ) ;

if ( iter != RegisterMap . end ( ) ) return iter -> second ;


<s> rmap_ty :: iterator iter = RegisterMap . find ( Name . str ( ) ) ; if ( iter != RegisterMap . end ( ) ) return iter -> second ;


<s> ThumbAsmLexer ( const Target & T , const MCRegisterInfo & MRI , const MCAsmInfo & MAI ) : <ISA_LIT>BaseAsmLexer ( T , MAI ) { InitRegisterMap ( & MRI ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; int32_t Imm = Memory . OffsetImm -> getValue ( ) ;

if ( Imm == INT32_MIN ) Imm = <NUM_LIT> ;


<s> int32_t Imm = Memory . OffsetImm -> getValue ( ) ; if ( Imm == INT32_MIN ) Imm = <NUM_LIT> ;

Inst . addOperand ( MCOperand :: CreateImm ( Imm ) ) ;


<s> assert ( isRegShiftedImm ( ) && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: CreateReg ( RegShiftedImm . SrcReg ) ) ; unsigned Imm = ( RegShiftedImm . ShiftImm == <NUM_LIT> ? <NUM_LIT> : RegShiftedImm . ShiftImm ) ; Inst . addOperand ( MCOperand :: CreateImm ( <STR_LIT> ( RegShiftedImm . ShiftTy , Imm ) ) ) ;


<s> assert ( isRegShiftedImm ( ) && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: CreateReg ( RegShiftedImm . SrcReg ) ) ;

unsigned Imm = ( RegShiftedImm . ShiftImm == <NUM_LIT> ? <NUM_LIT> : RegShiftedImm . ShiftImm ) ;


<s> Inst . addOperand ( MCOperand :: CreateReg ( RegShiftedReg . ShiftReg ) ) ; Inst . addOperand ( MCOperand :: CreateImm ( <STR_LIT> ( RegShiftedReg . ShiftTy , RegShiftedReg . ShiftImm ) ) ) ;


<s> setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; ITState . CurPosition = ~ <NUM_LIT> ; if ( MCELFStreamer * MES = dyn_cast < MCELFStreamer > ( & Parser . getStreamer ( ) ) ) MES -> getAssembler ( ) . setELFHeaderEFlags ( ELF :: EF_<ISA_LIT>_EABI_VER5 ) ;


<s> <ISA_LIT>AsmParser ( MCSubtargetInfo & _STI , MCAsmParser & _Parser ) : MCTargetAsmParser ( ) , STI ( _STI ) , Parser ( _Parser ) , FPReg ( - <NUM_LIT> ) { MCAsmParserExtension :: Initialize ( _Parser ) ; MRI = getContext ( ) . getRegisterInfo ( ) ;

setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ;


<s> else if ( Opc == <STR_LIT> && isThumbOne ( ) && is<ISA_LIT>LowRegister ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) && is<ISA_LIT>LowRegister ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ) return Match_RequiresThumb2 ; else if ( Opc == <STR_LIT> && isThumbOne ( ) && ! hasV6Ops ( ) && is<ISA_LIT>LowRegister ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) && is<ISA_LIT>LowRegister ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ) return Match_RequiresV6 ; return Match_Success ;


<s> static const MCInstrDesc & getInstDesc ( unsigned Opcode ) {


<s> if ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || ( ! isThumb ( ) && ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) ) ) { CanAcceptCarrySet = true ; } else CanAcceptCarrySet = false ; if ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) {


<s> assert ( ( Kind == k_Register || Kind == k_CCOut ) && <STR_LIT> ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ;


<s> int64_t Value = CE -> getValue ( ) ;

return Value >= <NUM_LIT> && Value < <NUM_LIT> ;


<s> int64_t Value = CE -> getValue ( ) ; return <STR_LIT> ( ~ Value ) != - <NUM_LIT> ;


const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;


<s> Val = CE -> getValue ( ) ; } else if ( isMem ( ) ) { if ( ! Memory . OffsetImm || Memory . OffsetRegNum ) return false ; if ( Memory . BaseRegNum != <STR_LIT> ) return false ;

Val = Memory . OffsetImm -> getValue ( ) ;


<s> if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Imm . Val ) ) { int64_t Val = CE -> getValue ( ) ; int64_t Align = <NUM_LIT> << scale ; int64_t Max = Align * ( ( <NUM_LIT> << width ) - <NUM_LIT> ) ; return ( ( Val % Align ) == <NUM_LIT> ) && ( Val >= <NUM_LIT> ) && ( Val <= Max ) ;


<s> if ( ! isImm ( ) ) return false ; if ( dyn_cast < MCSymbolRefExpr > ( Imm . Val ) ) return true ; if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Imm . Val ) ) { int64_t Val = CE -> getValue ( ) ; int64_t Align = <NUM_LIT> << scale ;

int64_t Max = Align * ( ( <NUM_LIT> << width ) - <NUM_LIT> ) ;


<s> forwardITPosition ( ) ; if ( Inst . getOpcode ( ) == <STR_LIT> ) return false ; Inst . setLoc ( IDLoc ) ; Out . EmitInstruction ( Inst ) ; return false ; case Match_MissingFeature : { assert ( ErrorInfo && <STR_LIT> ) ; std :: string Msg = <STR_LIT> ; unsigned Mask = <NUM_LIT> ; for ( unsigned i = <NUM_LIT> ; i < ( sizeof ( ErrorInfo ) * <NUM_LIT> - <NUM_LIT> ) ; ++ i ) { if ( ErrorInfo & Mask ) { Msg += <STR_LIT> ; Msg += getSubtargetFeatureName ( ErrorInfo & Mask ) ; } Mask <<= <NUM_LIT> ; } return Error ( IDLoc , Msg ) ; } case Match_InvalidOperand : { SMLoc ErrorLoc = IDLoc ; if ( ErrorInfo != ~ <NUM_LIT> ) { if ( ErrorInfo >= Operands . size ( ) ) return Error ( IDLoc , <STR_LIT> ) ; ErrorLoc = ( ( <ISA_LIT>Operand * ) Operands [ ErrorInfo ] ) -> getStartLoc ( ) ; if ( ErrorLoc == SMLoc ( ) ) ErrorLoc = IDLoc ; } return Error ( ErrorLoc , <STR_LIT> ) ; } case Match_MnemonicFail : return Error ( IDLoc , <STR_LIT> , ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getLocRange ( ) ) ; case Match_RequiresNotITBlock : return Error ( IDLoc , <STR_LIT> ) ; case Match_RequiresITBlock : return Error ( IDLoc , <STR_LIT> ) ; case Match_RequiresV6 : return Error ( IDLoc , <STR_LIT> ) ; case Match_RequiresThumb2 : return Error ( IDLoc , <STR_LIT> ) ; case Match_ImmRange0_4 : { SMLoc ErrorLoc = ( ( <ISA_LIT>Operand * ) Operands [ ErrorInfo ] ) -> getStartLoc ( ) ; if ( ErrorLoc == SMLoc ( ) ) ErrorLoc = IDLoc ; return Error ( ErrorLoc , <STR_LIT> ) ; } case Match_ImmRange0_15 : { SMLoc ErrorLoc = ( ( <ISA_LIT>Operand * ) Operands [ ErrorInfo ] ) -> getStartLoc ( ) ; if ( ErrorLoc == SMLoc ( ) ) ErrorLoc = IDLoc ; return Error ( ErrorLoc , <STR_LIT> ) ; }


<s> case '6' : return <NUM_LIT> ; case '7' : return <NUM_LIT> ; case '8' : return <NUM_LIT> ; case '9' : return <NUM_LIT> ; } case <NUM_LIT> : if ( Name [ <NUM_LIT> ] != CoprocOp || Name [ <NUM_LIT> ] != '1' ) return - <NUM_LIT> ; switch ( Name [ <NUM_LIT> ] ) { default : return - <NUM_LIT> ;


<s> else if ( IDVal == <STR_LIT> ) return parseDirectiveThumb ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirective<ISA_LIT> ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveThumbFunc ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveCode ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveSyntax ( DirectiveID . getLoc ( ) ) ;

else if ( IDVal == <STR_LIT> ) return parseDirectiveUnreq ( DirectiveID . getLoc ( ) ) ;


<s> bool <ISA_LIT>AsmParser :: ParseDirective ( AsmToken DirectiveID ) { StringRef IDVal = DirectiveID . getIdentifier ( ) ; if ( IDVal == <STR_LIT> ) return parseDirectiveWord ( <NUM_LIT> , DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveThumb ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirective<ISA_LIT> ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveThumbFunc ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveCode ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveSyntax ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveUnreq ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveArch ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveEabiAttr ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) return parseDirectiveFnStart ( DirectiveID . getLoc ( ) ) ;

else if ( IDVal == <STR_LIT> ) return parseDirectiveFnEnd ( DirectiveID . getLoc ( ) ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveArch ( SMLoc L ) {


<s> if ( isThumb ( ) ) SwitchMode ( ) ; getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( MCAF_Code32 ) ;


<s> Parser . Lex ( ) ; if ( ! has<ISA_LIT> ( ) ) return Error ( L , <STR_LIT> ) ; if ( isThumb ( ) ) SwitchMode ( ) ; getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( MCAF_Code32 ) ;


<s> Error ( HandlerDataLoc , <STR_LIT> ) ; return true ; } if ( PersonalityLoc . isValid ( ) ) { Error ( L , <STR_LIT> ) ; Error ( PersonalityLoc , <STR_LIT> ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveCantUnwind ( SMLoc L ) { CantUnwindLoc = L ; if ( ! FnStartLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; if ( HandlerDataLoc . isValid ( ) ) { Error ( L , <STR_LIT> ) ; Error ( HandlerDataLoc , <STR_LIT> ) ; return true ; } if ( PersonalityLoc . isValid ( ) ) { Error ( L , <STR_LIT> ) ;


<s> if ( Tok . isNot ( AsmToken :: Integer ) ) return Error ( L , <STR_LIT> ) ; int64_t Val = Parser . getTok ( ) . getIntVal ( ) ; if ( Val == <NUM_LIT> ) Parser . Lex ( ) ; else if ( Val == <NUM_LIT> ) Parser . Lex ( ) ; else return Error ( L , <STR_LIT> ) ;

if ( getLexer ( ) . isNot ( AsmToken :: EndOfStatement ) ) return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveEabiAttr ( SMLoc L ) { return true ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveFnEnd ( SMLoc L ) { if ( ! FnStartLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ;


<s> if ( ! FnStartLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; resetUnwindDirectiveParserState ( ) ;

getParser ( ) . getStreamer ( ) . EmitFnEnd ( ) ;


<s> FnStartLoc = L ; getParser ( ) . getStreamer ( ) . EmitFnStart ( ) ;


<s> } FnStartLoc = L ; getParser ( ) . getStreamer ( ) . EmitFnStart ( ) ; return false ;


<s> if ( ! FnStartLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ;


<s> if ( ! FnStartLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; if ( HandlerDataLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: Hash ) && Parser . getTok ( ) . isNot ( AsmToken :: Dollar ) ) { return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; } Parser . Lex ( ) ; const MCExpr * OffsetExpr ; SMLoc ExLoc = Parser . getTok ( ) . getLoc ( ) ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( OffsetExpr , EndLoc ) ) return Error ( ExLoc , <STR_LIT> ) ;

const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( OffsetExpr ) ;


<s> if ( HandlerDataLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: Hash ) && Parser . getTok ( ) . isNot ( AsmToken :: Dollar ) ) { return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; } Parser . Lex ( ) ; const MCExpr * OffsetExpr ; SMLoc ExLoc = Parser . getTok ( ) . getLoc ( ) ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( OffsetExpr , EndLoc ) ) return Error ( ExLoc , <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( OffsetExpr ) ; if ( ! CE ) return Error ( ExLoc , <STR_LIT> ) ;

getParser ( ) . getStreamer ( ) . EmitPad ( CE -> getValue ( ) ) ;


<s> Error ( L , <STR_LIT> ) ; Error ( CantUnwindLoc , <STR_LIT> ) ; return true ; } if ( HandlerDataLoc . isValid ( ) ) { Error ( L , <STR_LIT> ) ; Error ( HandlerDataLoc , <STR_LIT> ) ; return true ; } if ( Parser . getTok ( ) . isNot ( AsmToken :: Identifier ) ) { Parser . eatToEndOfStatement ( ) ;


<s> <ISA_LIT>Operand * Op = ( <ISA_LIT>Operand * ) CO . Operands [ <NUM_LIT> ] ; if ( ! IsVector && ! Op -> isRegList ( ) ) return Error ( L , <STR_LIT> ) ; if ( IsVector && ! Op -> isDPRRegList ( ) ) return Error ( L , <STR_LIT> ) ; getParser ( ) . getStreamer ( ) . EmitRegSave ( Op -> getRegList ( ) , IsVector ) ; return false ;


<s> if ( HandlerDataLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; struct CleanupObject { SmallVector < MCParsedAsmOperand * , <NUM_LIT> > Operands ; ~ CleanupObject ( ) {

for ( unsigned I = <NUM_LIT> , E = Operands . size ( ) ; I != E ; ++ I ) delete Operands [ I ] ;


<s> if ( ParseRegister ( Reg , SRegLoc , ERegLoc ) ) { Parser . eatToEndOfStatement ( ) ; return Error ( SRegLoc , <STR_LIT> ) ; } if ( Parser . getTok ( ) . isNot ( AsmToken :: EndOfStatement ) ) { Parser . eatToEndOfStatement ( ) ; return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; } Parser . Lex ( ) ; if ( RegisterReqs . GetOrCreateValue ( Name , Reg ) . getValue ( ) != Reg ) return Error ( SRegLoc , <STR_LIT> + Name + <STR_LIT> ) ;


<s> if ( HandlerDataLoc . isValid ( ) ) return Error ( L , <STR_LIT> ) ; SMLoc NewFPRegLoc = Parser . getTok ( ) . getLoc ( ) ; int NewFPReg = tryParseRegister ( ) ; if ( NewFPReg == - <NUM_LIT> ) return Error ( NewFPRegLoc , <STR_LIT> ) ; if ( ! Parser . getTok ( ) . is ( AsmToken :: Comma ) ) return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; Parser . Lex ( ) ; SMLoc NewSPRegLoc = Parser . getTok ( ) . getLoc ( ) ; int NewSPReg = tryParseRegister ( ) ; if ( NewSPReg == - <NUM_LIT> ) return Error ( NewSPRegLoc , <STR_LIT> ) ; if ( NewSPReg != <STR_LIT> && NewSPReg != FPReg ) return Error ( NewSPRegLoc , <STR_LIT> ) ; FPReg = NewFPReg ; int64_t Offset = <NUM_LIT> ; if ( Parser . getTok ( ) . is ( AsmToken :: Comma ) ) { Parser . Lex ( ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: Hash ) && Parser . getTok ( ) . isNot ( AsmToken :: Dollar ) ) { return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; } Parser . Lex ( ) ; const MCExpr * OffsetExpr ; SMLoc ExLoc = Parser . getTok ( ) . getLoc ( ) ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( OffsetExpr , EndLoc ) ) return Error ( ExLoc , <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( OffsetExpr ) ; if ( ! CE ) return Error ( ExLoc , <STR_LIT> ) ; Offset = CE -> getValue ( ) ; }

getParser ( ) . getStreamer ( ) . EmitSetFP ( static_cast < unsigned > ( NewFPReg ) , static_cast < unsigned > ( NewSPReg ) , Offset ) ;


<s> const AsmToken & Tok = Parser . getTok ( ) ; if ( Tok . isNot ( AsmToken :: Identifier ) ) return Error ( L , <STR_LIT> ) ; StringRef Mode = Tok . getString ( ) ; if ( Mode == <STR_LIT> || Mode == <STR_LIT> ) Parser . Lex ( ) ; else if ( Mode == <STR_LIT> || Mode == <STR_LIT> ) return Error ( L , <STR_LIT> ) ; else return Error ( L , <STR_LIT> ) ; if ( getLexer ( ) . isNot ( AsmToken :: EndOfStatement ) ) return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; Parser . Lex ( ) ;


<s> if ( getLexer ( ) . isNot ( AsmToken :: EndOfStatement ) ) return Error ( L , <STR_LIT> ) ; Parser . Lex ( ) ;

if ( ! hasThumb ( ) ) return Error ( L , <STR_LIT> ) ;


<s> if ( getParser ( ) . parseExpression ( Value ) ) return true ; getParser ( ) . getStreamer ( ) . EmitValue ( Value , Size ) ; if ( getLexer ( ) . is ( AsmToken :: EndOfStatement ) ) break ; if ( getLexer ( ) . isNot ( AsmToken :: Comma ) ) return Error ( L , <STR_LIT> ) ; Parser . Lex ( ) ;


<s> Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( MCConstantExpr :: Create ( IntVal , getContext ( ) ) , S , Parser . getTok ( ) . getLoc ( ) ) ) ; return MatchOperand_Success ; } if ( Tok . is ( AsmToken :: Integer ) ) { int64_t Val = Tok . getIntVal ( ) ; Parser . Lex ( ) ; if ( Val > <NUM_LIT> || Val < <NUM_LIT> ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } double RealVal = <STR_LIT> ( Val ) ; Val = APFloat ( APFloat :: IEEEdouble , RealVal ) . bitcastToAPInt ( ) . getZExtValue ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( MCConstantExpr :: Create ( Val , getContext ( ) ) , S , Parser . getTok ( ) . getLoc ( ) ) ) ; return MatchOperand_Success ; } Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ;


<s> bool isNegative = false ; if ( Parser . getTok ( ) . is ( AsmToken :: Minus ) ) { isNegative = true ; Parser . Lex ( ) ; } const AsmToken & Tok = Parser . getTok ( ) ; SMLoc Loc = Tok . getLoc ( ) ; if ( Tok . is ( AsmToken :: Real ) ) { APFloat RealVal ( APFloat :: IEEEsingle , Tok . getString ( ) ) ; uint64_t IntVal = RealVal . bitcastToAPInt ( ) . getZExtValue ( ) ; IntVal ^= ( uint64_t ) isNegative << <NUM_LIT> ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( MCConstantExpr :: Create ( IntVal , getContext ( ) ) , S , Parser . getTok ( ) . getLoc ( ) ) ) ; return MatchOperand_Success ; } if ( Tok . is ( AsmToken :: Integer ) ) { int64_t Val = Tok . getIntVal ( ) ; Parser . Lex ( ) ; if ( Val > <NUM_LIT> || Val < <NUM_LIT> ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } double RealVal = <STR_LIT> ( Val ) ; Val = APFloat ( APFloat :: IEEEdouble , RealVal ) . bitcastToAPInt ( ) . getZExtValue ( ) ;

Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( MCConstantExpr :: Create ( Val , getContext ( ) ) , S , Parser . getTok ( ) . getLoc ( ) ) ) ;


<s> StringRef OptStr = Tok . getString ( ) ; Opt = StringSwitch < unsigned > ( OptStr . slice ( <NUM_LIT> , OptStr . size ( ) ) . lower ( ) ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( Opt == ~ <NUM_LIT> ) return MatchOperand_NoMatch ; Parser . Lex ( ) ; } else if ( Tok . is ( AsmToken :: Hash ) || Tok . is ( AsmToken :: Dollar ) || Tok . is ( AsmToken :: Integer ) ) { if ( Parser . getTok ( ) . isNot ( AsmToken :: Integer ) ) Parser . Lex ( ) ; SMLoc Loc = Parser . getTok ( ) . getLoc ( ) ; const MCExpr * MemBarrierID ; if ( getParser ( ) . parseExpression ( MemBarrierID ) ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( MemBarrierID ) ; if ( ! CE ) { Error ( Loc , <STR_LIT> ) ;


<s> return false ; } case AsmToken :: LBrac : return parseMemory ( Operands ) ; case AsmToken :: LCurly : return parseRegisterList ( Operands ) ; case AsmToken :: Dollar : case AsmToken :: Hash : { S = Parser . getTok ( ) . getLoc ( ) ; Parser . Lex ( ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: Colon ) ) { bool isNegative = Parser . getTok ( ) . is ( AsmToken :: Minus ) ; const MCExpr * ImmVal ; if ( getParser ( ) . parseExpression ( ImmVal ) ) return true ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ImmVal ) ; if ( CE ) { int32_t Val = CE -> getValue ( ) ; if ( isNegative && Val == <NUM_LIT> ) ImmVal = MCConstantExpr :: Create ( INT32_MIN , getContext ( ) ) ; } E = SMLoc :: getFromPointer ( Parser . getTok ( ) . getLoc ( ) . getPointer ( ) - <NUM_LIT> ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( ImmVal , S , E ) ) ; if ( Parser . getTok ( ) . is ( AsmToken :: Exclaim ) ) { Operands . push_back ( <ISA_LIT>Operand :: CreateToken ( Parser . getTok ( ) . getString ( ) , Parser . getTok ( ) . getLoc ( ) ) ) ; Parser . Lex ( ) ; } return false ; } } case AsmToken :: Colon : { <ISA_LIT>MCExpr :: VariantKind RefKind ; if ( parsePrefix ( RefKind ) ) return true ; const MCExpr * SubExprVal ; if ( getParser ( ) . parseExpression ( SubExprVal ) ) return true ; const MCExpr * ExprVal = <ISA_LIT>MCExpr :: Create ( RefKind , SubExprVal , getContext ( ) ) ; E = SMLoc :: getFromPointer ( Parser . getTok ( ) . getLoc ( ) . getPointer ( ) - <NUM_LIT> ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( ExprVal , S , E ) ) ; return false ; }


<s> if ( getLexer ( ) . isNot ( AsmToken :: Identifier ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; } StringRef IDVal = Parser . getTok ( ) . getIdentifier ( ) ; if ( IDVal == <STR_LIT> ) { RefKind = <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO16 ; } else if ( IDVal == <STR_LIT> ) {

RefKind = <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HI16 ;


<s> if ( getLexer ( ) . isNot ( AsmToken :: Identifier ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; } StringRef IDVal = Parser . getTok ( ) . getIdentifier ( ) ; if ( IDVal == <STR_LIT> ) { RefKind = <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO16 ; } else if ( IDVal == <STR_LIT> ) { RefKind = <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HI16 ; } else { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; } Parser . Lex ( ) ;

if ( getLexer ( ) . isNot ( AsmToken :: Colon ) ) {


<s> break ; case k_PostIndexRegister : OS << <STR_LIT> << ( PostIdxReg . isAdd ? <STR_LIT> : <STR_LIT> ) << PostIdxReg . RegNum ; if ( PostIdxReg . ShiftTy != <STR_LIT> ) OS << <STR_LIT> ( PostIdxReg . ShiftTy ) << <STR_LIT> << PostIdxReg . ShiftImm ; OS << <STR_LIT> ; break ; case k_ProcIFlags : { OS << <STR_LIT> ; unsigned IFlags = getProcIFlags ( ) ; for ( int i = <NUM_LIT> ; i >= <NUM_LIT> ; -- i ) if ( IFlags & ( <NUM_LIT> << i ) ) OS << <STR_LIT> ( <NUM_LIT> << i ) ; OS << <STR_LIT> ; break ; } case k_Register : OS << <STR_LIT> << getReg ( ) << <STR_LIT> ; break ; case k_ShifterImmediate : OS << <STR_LIT> << ( ShifterImm . isASR ? <STR_LIT> : <STR_LIT> ) << <STR_LIT> << ShifterImm . Imm << <STR_LIT> ; break ; case k_ShiftedRegister : OS << <STR_LIT> << RegShiftedReg . SrcReg << <STR_LIT> << <STR_LIT> ( RegShiftedReg . ShiftTy ) << <STR_LIT> << RegShiftedReg . ShiftReg << <STR_LIT> ; break ; case k_ShiftedImmediate : OS << <STR_LIT> << RegShiftedImm . SrcReg << <STR_LIT> << <STR_LIT> ( RegShiftedImm . ShiftTy ) << <STR_LIT> << RegShiftedImm . ShiftImm << <STR_LIT> ; break ; case k_RotateImmediate : OS << <STR_LIT> << <STR_LIT> << ( RotImm . Imm * <NUM_LIT> ) << <STR_LIT> ; break ; case k_BitfieldDescriptor : OS << <STR_LIT> << <STR_LIT> << Bitfield . LSB << <STR_LIT> << Bitfield . Width << <STR_LIT> ;


<s> OS << <STR_LIT> << getCoproc ( ) << <STR_LIT> ; break ; case k_CoprocOption : OS << <STR_LIT> << CoprocOption . Val << <STR_LIT> ; break ; case k_MSRMask : OS << <STR_LIT> << getMSRMask ( ) << <STR_LIT> ; break ; case k_Immediate : getImm ( ) -> print ( OS ) ; break ; case k_MemBarrierOpt : OS << <STR_LIT> << MemBOptToString ( getMemBarrierOpt ( ) ) << <STR_LIT> ; break ; case k_InstSyncBarrierOpt : OS << <STR_LIT> << InstSyncBOptToString ( getInstSyncBarrierOpt ( ) ) << <STR_LIT> ; break ; case k_Memory : OS << <STR_LIT> << <STR_LIT> << Memory . BaseRegNum ; OS << <STR_LIT> ; break ; case k_PostIndexRegister : OS << <STR_LIT> << ( PostIdxReg . isAdd ? <STR_LIT> : <STR_LIT> ) << PostIdxReg . RegNum ; if ( PostIdxReg . ShiftTy != <STR_LIT> ) OS << <STR_LIT> ( PostIdxReg . ShiftTy ) << <STR_LIT> << PostIdxReg . ShiftImm ; OS << <STR_LIT> ; break ; case k_ProcIFlags : { OS << <STR_LIT> ; unsigned IFlags = getProcIFlags ( ) ; for ( int i = <NUM_LIT> ; i >= <NUM_LIT> ; -- i ) if ( IFlags & ( <NUM_LIT> << i ) ) OS << <STR_LIT> ( <NUM_LIT> << i ) ; OS << <STR_LIT> ; break ; } case k_Register : OS << <STR_LIT> << getReg ( ) << <STR_LIT> ; break ; case k_ShifterImmediate : OS << <STR_LIT> << ( ShifterImm . isASR ? <STR_LIT> : <STR_LIT> ) << <STR_LIT> << ShifterImm . Imm << <STR_LIT> ; break ; case k_ShiftedRegister : OS << <STR_LIT> << RegShiftedReg . SrcReg << <STR_LIT> << <STR_LIT> ( RegShiftedReg . ShiftTy ) << <STR_LIT> << RegShiftedReg . ShiftReg << <STR_LIT> ; break ; case k_ShiftedImmediate : OS << <STR_LIT> << RegShiftedImm . SrcReg << <STR_LIT> << <STR_LIT> ( RegShiftedImm . ShiftTy ) << <STR_LIT> << RegShiftedImm . ShiftImm << <STR_LIT> ;


<s> HandlerDataLoc = SMLoc ( ) ; FPReg = - <NUM_LIT> ;


<s> void resetUnwindDirectiveParserState ( ) { FnStartLoc = SMLoc ( ) ; CantUnwindLoc = SMLoc ( ) ; PersonalityLoc = SMLoc ( ) ; HandlerDataLoc = SMLoc ( ) ;


<s> SMLoc ImmLoc = Parser . getTok ( ) . getLoc ( ) ; const MCExpr * ShiftExpr = <NUM_LIT> ; if ( getParser ( ) . parseExpression ( ShiftExpr , EndLoc ) ) { Error ( ImmLoc , <STR_LIT> ) ; return - <NUM_LIT> ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ShiftExpr ) ; if ( ! CE ) { Error ( ImmLoc , <STR_LIT> ) ; return - <NUM_LIT> ; } Imm = CE -> getValue ( ) ; if ( Imm < <NUM_LIT> || ( ( ShiftTy == <STR_LIT> || ShiftTy == <STR_LIT> ) && Imm > <NUM_LIT> ) || ( ( ShiftTy == <STR_LIT> || ShiftTy == <STR_LIT> ) && Imm > <NUM_LIT> ) ) { Error ( ImmLoc , <STR_LIT> ) ; return - <NUM_LIT> ; } if ( Imm == <NUM_LIT> ) ShiftTy = <STR_LIT> ; } else if ( Parser . getTok ( ) . is ( AsmToken :: Identifier ) ) {

SMLoc L = Parser . getTok ( ) . getLoc ( ) ;


<s> unsigned Rn = Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ; bool hasWritebackToken = ( static_cast < <ISA_LIT>Operand * > ( Operands [ <NUM_LIT> ] ) -> isToken ( ) && static_cast < <ISA_LIT>Operand * > ( Operands [ <NUM_LIT> ] ) -> getToken ( ) == <STR_LIT> ) ; bool listContainsBase ; if ( checkLowRegisterList ( Inst , <NUM_LIT> , Rn , <NUM_LIT> , listContainsBase ) && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> + hasWritebackToken ] -> getStartLoc ( ) , <STR_LIT> ) ; if ( ! listContainsBase && ! hasWritebackToken && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; if ( listContainsBase && hasWritebackToken ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> <STR_LIT> ) ; break ; } case <STR_LIT> : { if ( listContainsReg ( Inst , <NUM_LIT> , Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> <STR_LIT> ) ; break ; } case <STR_LIT> : { if ( Operands . size ( ) == <NUM_LIT> && ( ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) != ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) ) && ( ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) != ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) ) ) { return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; } break ; } case <STR_LIT> : { bool listContainsBase ; if ( checkLowRegisterList ( Inst , <NUM_LIT> , <NUM_LIT> , <STR_LIT> , listContainsBase ) && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; break ; } case <STR_LIT> : { bool listContainsBase ; if ( checkLowRegisterList ( Inst , <NUM_LIT> , <NUM_LIT> , <STR_LIT> , listContainsBase ) && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; break ; } case <STR_LIT> : { bool listContainsBase ; if ( checkLowRegisterList ( Inst , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , listContainsBase ) && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; break ; } case <STR_LIT> : { if ( ! isThumbTwo ( ) && Inst . getOperand ( <NUM_LIT> ) . getReg ( ) != Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) { return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; } break ;


<s> case <STR_LIT> : { unsigned Rt = MRI -> getEncodingValue ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ; unsigned Rt2 = MRI -> getEncodingValue ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ; if ( Rt2 != Rt + <NUM_LIT> ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; return false ; } case <STR_LIT> : case <STR_LIT> : { unsigned lsb = Inst . getOperand ( <NUM_LIT> ) . getImm ( ) ; unsigned widthm1 = Inst . getOperand ( <NUM_LIT> ) . getImm ( ) ; if ( widthm1 >= <NUM_LIT> - lsb ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; return false ; } case <STR_LIT> : { unsigned Rn = Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ; bool hasWritebackToken = ( static_cast < <ISA_LIT>Operand * > ( Operands [ <NUM_LIT> ] ) -> isToken ( ) && static_cast < <ISA_LIT>Operand * > ( Operands [ <NUM_LIT> ] ) -> getToken ( ) == <STR_LIT> ) ; bool listContainsBase ; if ( checkLowRegisterList ( Inst , <NUM_LIT> , Rn , <NUM_LIT> , listContainsBase ) && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> + hasWritebackToken ] -> getStartLoc ( ) , <STR_LIT> ) ; if ( ! listContainsBase && ! hasWritebackToken && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; if ( listContainsBase && hasWritebackToken ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> <STR_LIT> ) ; break ; } case <STR_LIT> : { if ( listContainsReg ( Inst , <NUM_LIT> , Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> <STR_LIT> ) ; break ; } case <STR_LIT> : { if ( Operands . size ( ) == <NUM_LIT> && ( ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) != ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) ) && ( ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) != ( ( <ISA_LIT>Operand * ) Operands [ <NUM_LIT> ] ) -> getReg ( ) ) ) { return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; } break ; } case <STR_LIT> : { bool listContainsBase ; if ( checkLowRegisterList ( Inst , <NUM_LIT> , <NUM_LIT> , <STR_LIT> , listContainsBase ) && ! isThumbTwo ( ) ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; break ; } case <STR_LIT> : { bool listContainsBase ;


<s> <ISA_LIT>Operand * Op = static_cast < <ISA_LIT>Operand * > ( AsmOp ) ; if ( Kind == MCK__35_0 && Op -> isImm ( ) ) { const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op -> getImm ( ) ) ; if ( ! CE ) return Match_InvalidOperand ; if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ;


<s> unsigned <ISA_LIT>AsmParser :: validateTargetOperandClass ( MCParsedAsmOperand * AsmOp , unsigned Kind ) { <ISA_LIT>Operand * Op = static_cast < <ISA_LIT>Operand * > ( AsmOp ) ; if ( Kind == MCK__35_0 && Op -> isImm ( ) ) { const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op -> getImm ( ) ) ; if ( ! CE ) return Match_InvalidOperand ; if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ;


<s> Val = <STR_LIT> ( AddSub , Val , <STR_LIT> ) ; } else { Val = <STR_LIT> ( Memory . isNegative ? <STR_LIT> : <STR_LIT> , Memory . ShiftImm , Memory . ShiftType ) ; } Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;

Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( <NUM_LIT> ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ; } int32_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; if ( ! Memory . OffsetRegNum ) { <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ; if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ; if ( Val < <NUM_LIT> ) Val = - Val ; Val = <STR_LIT> ( AddSub , Val ) ; } else { Val = <STR_LIT> ( Memory . isNegative ? <STR_LIT> : <STR_LIT> , <NUM_LIT> ) ;


<s> Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; Inst . addOperand ( MCOperand :: createReg ( <NUM_LIT> ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ; } int32_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; if ( ! Memory . OffsetRegNum ) { <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ; if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ; if ( Val < <NUM_LIT> ) Val = - Val ; Val = <STR_LIT> ( AddSub , Val ) ; } else {

Val = <STR_LIT> ( Memory . isNegative ? <STR_LIT> : <STR_LIT> , <NUM_LIT> ) ;


<s> if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ; if ( Val < <NUM_LIT> ) Val = - Val ; Val = <STR_LIT> ( AddSub , Val ) ;

Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> int32_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) / <NUM_LIT> : <NUM_LIT> ; <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ; if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ; if ( Val < <NUM_LIT> ) Val = - Val ; Val = <STR_LIT> ( AddSub , Val ) ;


<s> if ( ! isa < MCConstantExpr > ( getImm ( ) ) ) { Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; return ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; int Val = CE -> getValue ( ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; int Val = CE -> getValue ( ) ;

Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> void addAlignedMemory16Operands ( MCInst & Inst , unsigned N ) const {


<s> void addAlignedMemory32Operands ( MCInst & Inst , unsigned N ) const {


<s> void addAlignedMemory64Operands ( MCInst & Inst , unsigned N ) const { addAlignedMemoryOperands ( Inst , N ) ;


<s> void addAlignedMemory64Operands ( MCInst & Inst , unsigned N ) const {


<s> void addAlignedMemory64or128Operands ( MCInst & Inst , unsigned N ) const {


<s> void addAlignedMemory64or128Operands ( MCInst & Inst , unsigned N ) const { addAlignedMemoryOperands ( Inst , N ) ;


<s> addAlignedMemoryOperands ( Inst , N ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Memory . Alignment ) ) ;


<s> void addAlignedMemoryOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ;


<s> void addAM2OffsetImmOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; assert ( CE && <STR_LIT> ) ; int32_t Val = CE -> getValue ( ) ; <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ; if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; assert ( CE && <STR_LIT> ) ; int32_t Val = CE -> getValue ( ) ; <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ; if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ; if ( Val < <NUM_LIT> ) Val = - Val ; Val = <STR_LIT> ( AddSub , Val , <STR_LIT> ) ;

Inst . addOperand ( MCOperand :: createReg ( <NUM_LIT> ) ) ;


<s> <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ; if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ; if ( Val < <NUM_LIT> ) Val = - Val ; Val = <STR_LIT> ( AddSub , Val ) ;


<s> Inst . addOperand ( MCOperand :: createImm ( unsigned ( getBankedReg ( ) ) ) ) ;


<s> unsigned width = Bitfield . Width ; uint32_t Mask = ~ ( ( ( uint32_t ) <NUM_LIT> >> lsb ) << ( <NUM_LIT> - width ) >> ( <NUM_LIT> - ( lsb + width ) ) ) ; Inst . addOperand ( MCOperand :: createImm ( Mask ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; unsigned lsb = Bitfield . LSB ; unsigned width = Bitfield . Width ; uint32_t Mask = ~ ( ( ( uint32_t ) <NUM_LIT> >> lsb ) << ( <NUM_LIT> - width ) >> ( <NUM_LIT> - ( lsb + width ) ) ) ; Inst . addOperand ( MCOperand :: createImm ( Mask ) ) ;


<s> void addCCOutOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createReg ( getReg ( ) ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;

Inst . addOperand ( MCOperand :: createImm ( ( CE -> getValue ( ) - <NUM_LIT> ) / <NUM_LIT> ) ) ;


<s> void addComplexRotationOddOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( ( CE -> getValue ( ) - <NUM_LIT> ) / <NUM_LIT> ) ) ;


<s> unsigned RegNum = getCondCode ( ) == <STR_LIT> ? <NUM_LIT> : <STR_LIT> ; Inst . addOperand ( MCOperand :: createReg ( RegNum ) ) ;


<s> void addCondCodeOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( unsigned ( getCondCode ( ) ) ) ) ; unsigned RegNum = getCondCode ( ) == <STR_LIT> ? <NUM_LIT> : <STR_LIT> ;

Inst . addOperand ( MCOperand :: createReg ( RegNum ) ) ;


<s> void addConstPoolAsmImmOperands ( MCInst & Inst , unsigned N ) const {

assert ( N == <NUM_LIT> && <STR_LIT> ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( getCoproc ( ) ) ) ;


<s> Inst . addOperand ( MCOperand :: createImm ( getCoproc ( ) ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( CoprocOption . Val ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ;

Inst . addOperand ( MCOperand :: createImm ( CoprocOption . Val ) ) ;


<s> void addDupAlignedMemory16Operands ( MCInst & Inst , unsigned N ) const {


<s> addAlignedMemoryOperands ( Inst , N ) ;


<s> void addDupAlignedMemory32Operands ( MCInst & Inst , unsigned N ) const { addAlignedMemoryOperands ( Inst , N ) ;


<s> void addDupAlignedMemory64or128Operands ( MCInst & Inst , unsigned N ) const {


<s> if ( ! Expr ) Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; else if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Expr ) ) Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) ) ) ; else Inst . addOperand ( MCOperand :: createExpr ( Expr ) ) ;


<s> void addExpr ( MCInst & Inst , const MCExpr * Expr ) const {

if ( ! Expr ) Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> - CE -> getValue ( ) ) ) ;


<s> Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> - CE -> getValue ( ) ) ) ;


<s> void addFBits32Operands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> - CE -> getValue ( ) ) ) ;


<s> int Val = <STR_LIT> ( APInt ( <NUM_LIT> , CE -> getValue ( ) ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) / <NUM_LIT> ) ) ;


<s> void addImm0_1020s4Operands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) / <NUM_LIT> ) ) ;


<s> void addImm0_4095NegOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ;

const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;

Inst . addOperand ( MCOperand :: createImm ( - CE -> getValue ( ) ) ) ;


<s> void addImm0_508s4NegOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ;


<s> void addImm0_508s4NegOperands ( MCInst & Inst , unsigned N ) const {


<s> Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) / <NUM_LIT> ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;

Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) - <NUM_LIT> ) ) ;


<s> void addImm1_16Operands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) - <NUM_LIT> ) ) ;


<s> Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) - <NUM_LIT> ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) ) ) ;


<s> void addImmThumbSROperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; unsigned Imm = CE -> getValue ( ) ; Inst . addOperand ( MCOperand :: createImm ( ( Imm == <NUM_LIT> ? <NUM_LIT> : Imm ) ) ) ;


<s> Inst . addOperand ( MCOperand :: createImm ( unsigned ( getInstSyncBarrierOpt ( ) ) ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ;

Inst . addOperand ( MCOperand :: createImm ( unsigned ( getCondCode ( ) ) ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( unsigned ( getCondCode ( ) ) ) ) ;


<s> void addITMaskOperands ( MCInst & Inst , unsigned N ) const {


<s> void addMemBarrierOptOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( unsigned ( getMemBarrierOpt ( ) ) ) ) ;


<s> void addMemImm0_1020s4OffsetOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; int32_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) / <NUM_LIT> : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; int32_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) / <NUM_LIT> : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> int64_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; int64_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ;


<s> int64_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> } int64_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> void addMemNoOffsetOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ;


<s> void addMemPCRelImm12Operands ( MCInst & Inst , unsigned N ) const {


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; int32_t Imm = Memory . OffsetImm -> getValue ( ) ; Inst . addOperand ( MCOperand :: createImm ( Imm ) ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


unsigned Val = <STR_LIT> ( Memory . isNegative ? <STR_LIT> : <STR_LIT> , Memory . ShiftImm , Memory . ShiftType ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ;


<s> void addMemTBHOperands ( MCInst & Inst , unsigned N ) const {


<s> Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> int64_t Val = Memory . OffsetImm ? ( Memory . OffsetImm -> getValue ( ) ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; int64_t Val = Memory . OffsetImm ? ( Memory . OffsetImm -> getValue ( ) / <NUM_LIT> ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> int64_t Val = Memory . OffsetImm ? ( Memory . OffsetImm -> getValue ( ) / <NUM_LIT> ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ;

int64_t Val = Memory . OffsetImm ? ( Memory . OffsetImm -> getValue ( ) / <NUM_LIT> ) : <NUM_LIT> ;


<s> void addMemThumbSPIOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; int64_t Val = Memory . OffsetImm ? ( Memory . OffsetImm -> getValue ( ) / <NUM_LIT> ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ;


<s> return ; } int64_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> } int64_t Val = Memory . OffsetImm ? Memory . OffsetImm -> getValue ( ) : <NUM_LIT> ; Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; uint32_t Enc = <STR_LIT> ( - CE -> getValue ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( Enc ) ) ;


<s> uint32_t Enc = <STR_LIT> ( - CE -> getValue ( ) ) ;

Inst . addOperand ( MCOperand :: createImm ( Enc ) ) ;


<s> void addModImmNotOperands ( MCInst & Inst , unsigned N ) const {


<s> uint32_t Enc = <STR_LIT> ( ~ CE -> getValue ( ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; if ( isImm ( ) ) return addImmOperands ( Inst , N ) ;

Inst . addOperand ( MCOperand :: createImm ( ModImm . Bits | ( ModImm . Rot << <NUM_LIT> ) ) ) ;


if ( isImm ( ) ) return addImmOperands ( Inst , N ) ;


<s> Inst . addOperand ( MCOperand :: createImm ( unsigned ( getMSRMask ( ) ) ) ) ;


<s> Value = <STR_LIT> ( ~ Value & <NUM_LIT> ) ;

Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


<s> void addNEONi16splatOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; unsigned Value = CE -> getValue ( ) ; Value = <STR_LIT> ( Value ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; unsigned Value = CE -> getValue ( ) ; Value = <STR_LIT> ( Value ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ;


<s> if ( Value >= <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ;

else if ( Value > <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ;


<s> unsigned Value = ~ CE -> getValue ( ) ; if ( Value >= <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ; else if ( Value > <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ; else if ( Value > <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | <NUM_LIT> ; Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; unsigned Value = CE -> getValue ( ) ; if ( Value >= <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ; else if ( Value > <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ; else if ( Value > <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | <NUM_LIT> ; Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


<s> for ( unsigned i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i , Value >>= <NUM_LIT> ) { Imm |= ( Value & <NUM_LIT> ) << i ; } Inst . addOperand ( MCOperand :: createImm ( Imm | <NUM_LIT> ) ) ;


<s> unsigned Imm = <NUM_LIT> ; for ( unsigned i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i , Value >>= <NUM_LIT> ) { Imm |= ( Value & <NUM_LIT> ) << i ; }

Inst . addOperand ( MCOperand :: createImm ( Imm | <NUM_LIT> ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) | <NUM_LIT> ) ) ;


<s> unsigned Value = CE -> getValue ( ) ; assert ( ( Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> ) && <STR_LIT> <STR_LIT> ) ; unsigned B = ( ( ~ Value ) & <NUM_LIT> ) ; B |= <NUM_LIT> ; Inst . addOperand ( MCOperand :: createImm ( B ) ) ;


<s> assert ( ( Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> ) && <STR_LIT> <STR_LIT> ) ;

unsigned B = ( ( ~ Value ) & <NUM_LIT> ) ;


<s> assert ( ( Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> ) && <STR_LIT> <STR_LIT> ) ; unsigned B = Value & <NUM_LIT> ;