<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; 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> void addPKHASRImmOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; int Val = CE -> getValue ( ) ; Inst . addOperand ( MCOperand :: createImm ( Val == <NUM_LIT> ? <NUM_LIT> : Val ) ) ;


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

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


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; assert ( CE && <STR_LIT> ) ; int Imm = CE -> getValue ( ) ;


<s> if ( Imm == std :: numeric_limits < int32_t > :: min ( ) ) Imm = <NUM_LIT> ;

Imm = ( ( Imm < <NUM_LIT> ? - Imm : Imm ) / <NUM_LIT> ) | ( int ) isAdd << <NUM_LIT> ;


<s> void addPostIdxRegOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createReg ( PostIdxReg . RegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( PostIdxReg . isAdd ) ) ;


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

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


<s> unsigned Imm = <STR_LIT> ( opc , PostIdxReg . ShiftImm , PostIdxReg . ShiftTy ) ;

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


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

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


<s> const SmallVectorImpl < unsigned > & RegList = getRegList ( ) ; for ( SmallVectorImpl < unsigned > :: const_iterator I = RegList . begin ( ) , E = RegList . end ( ) ; I != E ; ++ I ) Inst . addOperand ( MCOperand :: createReg ( * I ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const SmallVectorImpl < unsigned > & RegList = getRegList ( ) ; for ( SmallVectorImpl < unsigned > :: const_iterator I = RegList . begin ( ) , E = RegList . end ( ) ; I != E ; ++ I ) Inst . addOperand ( MCOperand :: createReg ( * I ) ) ;


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

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


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


<s> Inst . addOperand ( MCOperand :: createReg ( RegShiftedImm . SrcReg ) ) ;

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


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; assert ( isRegShiftedReg ( ) && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createReg ( RegShiftedReg . SrcReg ) ) ; Inst . addOperand ( MCOperand :: createReg ( RegShiftedReg . ShiftReg ) ) ;

Inst . addOperand ( MCOperand :: createImm ( <STR_LIT> ( RegShiftedReg . ShiftTy , RegShiftedReg . ShiftImm ) ) ) ;


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


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


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


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

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


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


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

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


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


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


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


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


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; addExpr ( Inst , getImm ( ) ) ;


<s> return ; } assert ( isMem ( ) && <STR_LIT> ) ; assert ( isa < MCConstantExpr > ( Memory . OffsetImm ) && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( Memory . OffsetImm -> getValue ( ) ) ) ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( CE ) { Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) ) ) ; return ; } const MCSymbolRefExpr * SR = dyn_cast < MCSymbolRefExpr > ( Imm . Val ) ; assert ( SR && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createExpr ( SR ) ) ; return ; }


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


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


<s> } const MCSymbolRefExpr * SR = dyn_cast < MCSymbolRefExpr > ( Imm . Val ) ; assert ( SR && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createExpr ( SR ) ) ;


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


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; Inst . addOperand ( MCOperand :: createReg ( VectorList . RegNum ) ) ; Inst . addOperand ( MCOperand :: createImm ( VectorList . LaneIndex ) ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( VectorList . RegNum ) ) ;


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


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

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


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


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


<s> <ISA_LIT>AsmParser ( const MCSubtargetInfo & STI , MCAsmParser & Parser , const MCInstrInfo & MII , const MCTargetOptions & Options ) : MCTargetAsmParser ( Options , STI , MII ) , UC ( Parser ) { MCAsmParserExtension :: Initialize ( Parser ) ;

MRI = getContext ( ) . getRegisterInfo ( ) ;


<s> setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; if ( AddBuildAttributes ) getTargetStreamer ( ) . emitTargetAttributes ( STI ) ; ITState . CurPosition = ~ <NUM_LIT> ;


<s> static bool checkLowRegisterList ( const MCInst & Inst , unsigned OpNo , unsigned Reg , unsigned HiReg , bool & containsReg ) { containsReg = false ; for ( unsigned i = OpNo ; i < Inst . getNumOperands ( ) ; ++ i ) { unsigned OpReg = Inst . getOperand ( i ) . getReg ( ) ; if ( OpReg == Reg ) containsReg = true ;

if ( ! is<ISA_LIT>LowRegister ( OpReg ) && ( ! HiReg || OpReg != HiReg ) ) return true ;


<s> if ( Opc == <STR_LIT> && ! hasV6MOps ( ) && 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> && ! hasV6Ops ( ) && is<ISA_LIT>LowRegister ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) && is<ISA_LIT>LowRegister ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) ) ) return Match_RequiresV6 ; } if ( Opc == <STR_LIT> && ! hasV8Ops ( ) ) { if ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> && Inst . getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> ) return Match_RequiresV8 ;

if ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> && ( Inst . getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> || Inst . getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> ) ) return Match_RequiresV8 ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_BankedReg ) ; Op -> BankedReg . Val = Reg ; Op -> StartLoc = S ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateBitfield ( unsigned LSB , unsigned Width , SMLoc S , SMLoc E ) { auto Op = make_unique < <ISA_LIT>Operand > ( k_BitfieldDescriptor ) ; Op -> Bitfield . LSB = LSB ; Op -> Bitfield . Width = Width ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> Op -> Bitfield . Width = Width ; Op -> StartLoc = S ; Op -> EndLoc = E ; return Op ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_CCOut ) ; Op -> Reg . RegNum = RegNum ; Op -> StartLoc = S ; Op -> EndLoc = S ; return Op ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_CCOut ) ;


<s> Op -> StartLoc = S ; Op -> EndLoc = S ; return Op ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_ConstantPoolImmediate ) ; Op -> Imm . Val = Val ; Op -> StartLoc = S ; Op -> EndLoc = E ; return Op ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateCoprocOption ( unsigned Val , SMLoc S , SMLoc E ) {

auto Op = make_unique < <ISA_LIT>Operand > ( k_CoprocOption ) ;


<s> Op -> Cop . Val = Val ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateImm ( const MCExpr * Val , SMLoc S , SMLoc E ) { auto Op = make_unique < <ISA_LIT>Operand > ( k_Immediate ) ; Op -> Imm . Val = Val ; Op -> StartLoc = S ;


<s> Op -> ISBOpt . Val = Opt ; Op -> StartLoc = S ; Op -> EndLoc = S ; return Op ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateITMask ( unsigned Mask , SMLoc S ) { auto Op = make_unique < <ISA_LIT>Operand > ( k_ITCondMask ) ; Op -> ITMask . Mask = Mask ; Op -> StartLoc = S ; Op -> EndLoc = S ;


<s> Op -> Memory . BaseRegNum = BaseRegNum ; Op -> Memory . OffsetImm = OffsetImm ; Op -> Memory . OffsetRegNum = OffsetRegNum ; Op -> Memory . ShiftType = ShiftType ; Op -> Memory . ShiftImm = ShiftImm ; Op -> Memory . Alignment = Alignment ; Op -> Memory . isNegative = isNegative ; Op -> StartLoc = S ; Op -> EndLoc = E ; Op -> AlignmentLoc = AlignmentLoc ; return Op ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateMemBarrierOpt ( <STR_LIT> Opt , SMLoc S ) {

auto Op = make_unique < <ISA_LIT>Operand > ( k_MemBarrierOpt ) ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_MemBarrierOpt ) ; Op -> MBOpt . Val = Opt ; Op -> StartLoc = S ; Op -> EndLoc = S ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateModImm ( unsigned Bits , unsigned Rot , SMLoc S , SMLoc E ) { auto Op = make_unique < <ISA_LIT>Operand > ( k_ModifiedImmediate ) ;


<s> Op -> ModImm . Rot = Rot ; Op -> StartLoc = S ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateMSRMask ( unsigned MMask , SMLoc S ) { auto Op = make_unique < <ISA_LIT>Operand > ( k_MSRMask ) ; Op -> MMask . Val = MMask ; Op -> StartLoc = S ;


<s> Op -> PostIdxReg . isAdd = isAdd ; Op -> PostIdxReg . ShiftTy = ShiftTy ; Op -> PostIdxReg . ShiftImm = ShiftImm ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_ProcIFlags ) ; Op -> IFlags . Val = IFlags ; Op -> StartLoc = S ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_ProcIFlags ) ; Op -> IFlags . Val = IFlags ; Op -> StartLoc = S ; Op -> EndLoc = S ; return Op ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_Register ) ; Op -> Reg . RegNum = RegNum ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( Kind ) ; for ( SmallVectorImpl < std :: pair < unsigned , unsigned >> :: const_iterator I = Regs . begin ( ) , E = Regs . end ( ) ; I != E ; ++ I ) Op -> Registers . push_back ( I -> second ) ; Op -> StartLoc = StartLoc ; Op -> EndLoc = EndLoc ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateRotImm ( unsigned Imm , SMLoc S , SMLoc E ) {

auto Op = make_unique < <ISA_LIT>Operand > ( k_RotateImmediate ) ;


<s> Op -> RotImm . Imm = Imm ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> Op -> RegShiftedImm . SrcReg = SrcReg ; Op -> RegShiftedImm . ShiftImm = ShiftImm ; Op -> StartLoc = S ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_ShiftedImmediate ) ; Op -> RegShiftedImm . ShiftTy = ShTy ; Op -> RegShiftedImm . SrcReg = SrcReg ;

Op -> RegShiftedImm . ShiftImm = ShiftImm ;


<s> Op -> RegShiftedReg . ShiftTy = ShTy ; Op -> RegShiftedReg . SrcReg = SrcReg ; Op -> RegShiftedReg . ShiftReg = ShiftReg ; Op -> RegShiftedReg . ShiftImm = ShiftImm ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_ShifterImmediate ) ; Op -> ShifterImm . isASR = isASR ; Op -> ShifterImm . Imm = Imm ; Op -> StartLoc = S ;


<s> Op -> ShifterImm . Imm = Imm ; Op -> StartLoc = S ; Op -> EndLoc = E ; return Op ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_Token ) ; Op -> Tok . Data = Str . data ( ) ; Op -> Tok . Length = Str . size ( ) ; Op -> StartLoc = S ; Op -> EndLoc = S ;


<s> Op -> VectorList . RegNum = RegNum ; Op -> VectorList . Count = Count ; Op -> VectorList . isDoubleSpaced = isDoubleSpaced ; Op -> StartLoc = S ;


<s> Op -> VectorList . isDoubleSpaced = isDoubleSpaced ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> auto Op = make_unique < <ISA_LIT>Operand > ( k_VectorListIndexed ) ; Op -> VectorList . RegNum = RegNum ; Op -> VectorList . Count = Count ; Op -> VectorList . LaneIndex = Index ; Op -> VectorList . isDoubleSpaced = isDoubleSpaced ; Op -> StartLoc = S ;


<s> else MaskBit = ( ITState . Mask >> ( <NUM_LIT> - ITState . CurPosition ) ) & <NUM_LIT> ; return MaskBit ? ITState . Cond : <STR_LIT> ( ITState . Cond ) ;


<s> switch ( Inst . getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : CondOp = <NUM_LIT> ; ImmOp = <NUM_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : CondOp = <NUM_LIT> ; ImmOp = <NUM_LIT> ; break ; default : llvm_unreachable ( <STR_LIT> ) ; } if ( inITBlock ( ) ) { switch ( Inst . getOpcode ( ) ) { case <STR_LIT> : Inst . setOpcode ( <STR_LIT> ) ; break ; case <STR_LIT> : Inst . setOpcode ( <STR_LIT> ) ; break ; } } else { unsigned Cond = static_cast < <ISA_LIT>Operand & > ( * Operands [ CondOp ] ) . getCondCode ( ) ; switch ( Inst . getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : Inst . setOpcode ( Cond == <STR_LIT> ? <STR_LIT> : <STR_LIT> ) ; break ; case <STR_LIT> : case <STR_LIT> : Inst . setOpcode ( Cond == <STR_LIT> ? <STR_LIT> : <STR_LIT> ) ; break ;


if ( Operands . size ( ) == <NUM_LIT> && ( ( <ISA_LIT>Operand & ) * Operands [ <NUM_LIT> ] ) . getReg ( ) == ( ( <ISA_LIT>Operand & ) * Operands [ <NUM_LIT> ] ) . getReg ( ) ) RegOp = <NUM_LIT> ;


<s> ( ( <ISA_LIT>Operand & ) * Operands [ RegOp ] ) . addRegOperands ( Inst , <NUM_LIT> ) ; Inst . addOperand ( Inst . getOperand ( <NUM_LIT> ) ) ; ( ( <ISA_LIT>Operand & ) * Operands [ <NUM_LIT> ] ) . addCondCodeOperands ( Inst , <NUM_LIT> ) ;


<s> assert ( ITState . CurPosition == <NUM_LIT> ) ;


<s> assert ( inImplicitITBlock ( ) ) ; assert ( ! isITBlockFull ( ) ) ; assert ( Cond == ITState . Cond || Cond == <STR_LIT> ( ITState . Cond ) ) ; unsigned TZ = countTrailingZeros ( ITState . Mask ) ;


<s> if ( WasThumb != isThumb ( ) ) { if ( WasThumb && hasThumb ( ) ) { SwitchMode ( ) ; } else if ( ! WasThumb && has<ISA_LIT> ( ) ) { SwitchMode ( ) ; } else { getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( isThumb ( ) ? MCAF_Code16 : MCAF_Code32 ) ; Warning ( Loc , Twine ( <STR_LIT> ) + ( WasThumb ? <STR_LIT> : <STR_LIT> ) + <STR_LIT> + ( ! WasThumb ? <STR_LIT> : <STR_LIT> ) + <STR_LIT> ) ; }


<s> getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( isThumb ( ) ? MCAF_Code16 : MCAF_Code32 ) ; Warning ( Loc , Twine ( <STR_LIT> ) + ( WasThumb ? <STR_LIT> : <STR_LIT> ) + <STR_LIT> + ( ! WasThumb ? <STR_LIT> : <STR_LIT> ) + <STR_LIT> ) ; }


<s> if ( Mnemonic != <STR_LIT> && Mnemonic != <STR_LIT> ) return ; if ( Operands . size ( ) < <NUM_LIT> ) return ; <ISA_LIT>Operand & Op2 = static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) ; <ISA_LIT>Operand & Op3 = static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) ; if ( ! Op2 . isReg ( ) ) return ; if ( ! Op3 . isMem ( ) ) return ; const MCRegisterClass & GPR = MRI -> getRegClass ( <STR_LIT> ) ;

if ( ! GPR . contains ( Op2 . getReg ( ) ) ) return ;


<s> assert ( Kind == k_Memory && <STR_LIT> ) ;


assert ( Kind == k_Memory && <STR_LIT> ) ;


assert ( Kind == k_BankedReg && <STR_LIT> ) ;


<s> unsigned getBankedReg ( ) const { assert ( Kind == k_BankedReg && <STR_LIT> ) ; return BankedReg . Val ;


<s> const MCExpr * getConstantPoolImm ( ) const { assert ( isConstantPoolImm ( ) && <STR_LIT> ) ;


<s> unsigned getITMaskEncoding ( ) { assert ( inITBlock ( ) ) ; unsigned Mask = ITState . Mask ;

unsigned TZ = countTrailingZeros ( Mask ) ;


<s> void <ISA_LIT>AsmParser :: getMnemonicAcceptInfo ( StringRef Mnemonic , StringRef FullInst , bool & CanAcceptCarrySet , bool & CanAcceptPredicationCode ) { CanAcceptCarrySet = 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> ) ) ; 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 . startswith ( <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> || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || ( FullInst . startswith ( <STR_LIT> ) && FullInst . endswith ( <STR_LIT> ) ) || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) {


<s> void <ISA_LIT>AsmParser :: getMnemonicAcceptInfo ( StringRef Mnemonic , StringRef FullInst , bool & CanAcceptCarrySet , bool & CanAcceptPredicationCode ) {

CanAcceptCarrySet = 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> ) ) ;


<s> bool has8MSecExt ( ) const { return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> return ! getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> bool hasThumb ( ) const { return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> bool hasThumb2 ( ) const { return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> bool hasV6MOps ( ) const { return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> bool hasV8Ops ( ) const { return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> bool inExplicitITBlock ( ) { return inITBlock ( ) && ITState . IsExplicit ;


<s> return inITBlock ( ) && ITState . IsExplicit ;


<s> bool inImplicitITBlock ( ) { return inITBlock ( ) && ! ITState . IsExplicit ;


<s> ITState . Cond = <STR_LIT> ( ITState . Cond ) ; } else {

ITState . Mask ^= <NUM_LIT> << ( <NUM_LIT> - ITState . CurPosition ) ;


<s> ITState . Cond = <STR_LIT> ( ITState . Cond ) ;


<s> if ( ! isMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . ShiftType != <STR_LIT> ) return false ;

if ( Memory . OffsetRegNum ) return true ;


<s> if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . OffsetRegNum ) return false ; if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ; return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> && ( ( Val & <NUM_LIT> ) == <NUM_LIT> ) ) || Val == std :: numeric_limits < int32_t > :: min ( ) ;


<s> bool isAddrMode5 ( ) const { if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . OffsetRegNum ) return false ; if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ; return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> && ( ( Val & <NUM_LIT> ) == <NUM_LIT> ) ) || Val == std :: numeric_limits < int32_t > :: min ( ) ;


<s> if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . OffsetRegNum ) return false ; if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ;

return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> && ( ( Val & <NUM_LIT> ) == <NUM_LIT> ) ) || Val == std :: numeric_limits < int32_t > :: min ( ) ;


<s> if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . OffsetRegNum ) return false ;

if ( ! Memory . OffsetImm ) return true ;


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

return ( <STR_LIT> ( Value ) != - <NUM_LIT> || <STR_LIT> ( - Value ) != - <NUM_LIT> ) ;


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


<s> if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ;

return isMemNoOffset ( false , <NUM_LIT> ) ;


<s> bool isAlignedMemory16 ( ) const { if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ; return isMemNoOffset ( false , <NUM_LIT> ) ;


<s> bool isAlignedMemory32 ( ) const { if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ;


<s> return isMemNoOffset ( false , <NUM_LIT> ) ;


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


return ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) || Val == std :: numeric_limits < int32_t > :: min ( ) ;


<s> if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ) return CE -> getValue ( ) % <NUM_LIT> == <NUM_LIT> ; return true ;


<s> bool isBankedReg ( ) const { return Kind == k_BankedReg ;


<s> if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; uint64_t Value = CE -> getValue ( ) ; return ( Value % Angle == Remainder && Value <= <NUM_LIT> ) ;


<s> bool isConstantPoolImm ( ) const { return Kind == k_ConstantPoolImmediate ;


<s> if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ; if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ;


<s> bool isDupAlignedMemory64or128 ( ) const { if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ; if ( isMemNoOffset ( false , <NUM_LIT> ) ) return true ;


return isImmediate < <NUM_LIT> , <NUM_LIT> > ( ) ;


return isImmediateS4 < <NUM_LIT> , <NUM_LIT> > ( ) ;


<s> return isImmediateS4 < <NUM_LIT> , <NUM_LIT> > ( ) ;


<s> bool isImm1_32 ( ) const { return isImmediate < <NUM_LIT> , <NUM_LIT> > ( ) ;


<s> bool isImm24bit ( ) const { return isImmediate < <NUM_LIT> , <NUM_LIT> + <NUM_LIT> > ( ) ;


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


<s> bool isImmediateS4 ( ) const { if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; int64_t Value = CE -> getValue ( ) ; return ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) && Value >= N && Value <= M ;


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

return ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) && Value >= N && Value <= M ;


<s> return isImmediate < <NUM_LIT> , <NUM_LIT> > ( ) ;


return inITBlock ( ) && ( ITState . Mask & <NUM_LIT> ) ;


<s> bool isITBlockFull ( ) { return inITBlock ( ) && ( ITState . Mask & <NUM_LIT> ) ;


<s> int64_t Val = Memory . OffsetImm -> getValue ( ) ;

return ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) || ( Val == std :: numeric_limits < int32_t > :: min ( ) ) ;


<s> if ( ! isMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ;


<s> return ( Val == std :: numeric_limits < int32_t > :: min ( ) ) || ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) ;


<s> if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ;


<s> if ( ! isMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ;

int64_t Val = Memory . OffsetImm -> getValue ( ) ;


<s> bool isMemNegImm8Offset ( ) const { if ( ! isMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . BaseRegNum == <STR_LIT> ) return false ;

if ( ! Memory . OffsetImm ) return false ;


return ( Val == std :: numeric_limits < int32_t > :: min ( ) ) || ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) ;


return Memory . OffsetRegNum == <NUM_LIT> && Memory . OffsetImm == nullptr && ( alignOK || Memory . Alignment == Alignment ) ;


<s> int64_t Val = Memory . OffsetImm -> getValue ( ) ; return ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) || ( Val == std :: numeric_limits < int32_t > :: min ( ) ) ;


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


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


<s> if ( ! Value ) return false ; unsigned char B = Value & <NUM_LIT> ; for ( unsigned i = <NUM_LIT> ; i < NumBytes ; ++ i ) { Value >>= <NUM_LIT> ; if ( ( Value & <NUM_LIT> ) != B ) return false ; }


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


<s> bool isNEONi16ByteReplicate ( ) const {

return isNEONByteReplicate ( <NUM_LIT> ) ;


<s> if ( isNEONByteReplicate ( <NUM_LIT> ) ) return false ; if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; unsigned Value = CE -> getValue ( ) ;


<s> if ( isNEONByteReplicate ( <NUM_LIT> ) ) return false ; if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; unsigned Value = CE -> getValue ( ) ; return <STR_LIT> ( Value ) ;


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


<s> return isNEONByteReplicate ( <NUM_LIT> ) ;


<s> bool isNEONi32splat ( ) const { if ( isNEONByteReplicate ( <NUM_LIT> ) ) return false ; if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; unsigned Value = CE -> getValue ( ) ;


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


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


<s> bool isNEONi32vmov ( ) const { if ( isNEONByteReplicate ( <NUM_LIT> ) ) return false ; if ( ! isImm ( ) ) return false ;


<s> bool isPKHASRImm ( ) const { return isImmediate < <NUM_LIT> , <NUM_LIT> > ( ) ;


<s> return isImmediate < <NUM_LIT> , <NUM_LIT> > ( ) ;


<s> bool isPostIdxImm8 ( ) const { if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; int64_t Val = CE -> getValue ( ) ;


<s> bool isPostIdxImm8s4 ( ) const { if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; int64_t Val = CE -> getValue ( ) ; return ( ( Val & <NUM_LIT> ) == <NUM_LIT> && Val >= - <NUM_LIT> && Val <= <NUM_LIT> ) || ( Val == std :: numeric_limits < int32_t > :: min ( ) ) ;


<s> if ( Memory . ShiftType == <STR_LIT> ) return true ;

if ( Memory . ShiftType != <STR_LIT> || Memory . ShiftImm > <NUM_LIT> ) return false ;


<s> bool isT2SOImm ( ) const { if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) { const <ISA_LIT>MCExpr * <ISA_LIT>16Expr = dyn_cast < <ISA_LIT>MCExpr > ( getImm ( ) ) ;

return ( ! <ISA_LIT>16Expr || ( <ISA_LIT>16Expr -> getKind ( ) != <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HI16 && <ISA_LIT>16Expr -> getKind ( ) != <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO16 ) ) ;


<s> if ( ! isImm ( ) ) return false ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( ! CE ) return false ; int64_t Value = CE -> getValue ( ) ;

return <STR_LIT> ( Value ) != - <NUM_LIT> ;


<s> return getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ) return CE -> getValue ( ) % <NUM_LIT> == <NUM_LIT> ;


<s> if ( ! isImm ( ) ) return false ; if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ) return CE -> getValue ( ) % <NUM_LIT> == <NUM_LIT> ; return true ;


<s> int32_t Value = - ( int32_t ) CE -> getValue ( ) ; return <NUM_LIT> < Value && Value < <NUM_LIT> ;


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


<s> return isThumb ( ) && ! getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> bool isThumbTwo ( ) const { return isThumb ( ) && getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> return isThumb ( ) && getSTI ( ) . getFeatureBits ( ) [ <STR_LIT> ] ;


<s> if ( Kind != k_VectorList ) return false ; if ( isSingleSpacedVectorList ( ) ) return false ; return ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( VectorList . RegNum ) ) ;


<s> bool isVecListDPairSpaced ( ) const { if ( Kind != k_VectorList ) return false ; if ( isSingleSpacedVectorList ( ) ) return false ;

return ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( VectorList . RegNum ) ) ;


<s> return VectorIndex . Val < <NUM_LIT> ;


<s> bool lastInITBlock ( ) { return ITState . CurPosition == <NUM_LIT> - countTrailingZeros ( ITState . Mask ) ;


return ITState . CurPosition == <NUM_LIT> - countTrailingZeros ( ITState . Mask ) ;


<s> static bool listContainsReg ( const MCInst & Inst , unsigned OpNo , unsigned Reg ) { for ( unsigned i = OpNo , e = Inst . getNumOperands ( ) ; i < e ; ++ i ) { unsigned OpReg = Inst . getOperand ( i ) . getReg ( ) ;


<s> for ( unsigned i = OpNo , e = Inst . getNumOperands ( ) ; i < e ; ++ i ) { unsigned OpReg = Inst . getOperand ( i ) . getReg ( ) ; if ( OpReg == Reg ) return true ;


<s> RegisterMCAsmParser < <ISA_LIT>AsmParser > A ( getTheThumbLETarget ( ) ) ; RegisterMCAsmParser < <ISA_LIT>AsmParser > B ( getTheThumbBETarget ( ) ) ;


<s> } { bool wasInITBlock = inITBlock ( ) ; while ( processInstruction ( Inst , Operands , Out ) ) ; if ( wasInITBlock && hasV8Ops ( ) && isThumb ( ) && ! isV8EligibleForIT ( & Inst ) ) { Warning ( IDLoc , <STR_LIT> ) ; } } forwardITPosition ( ) ; if ( Inst . getOpcode ( ) == <STR_LIT> ) return false ; Inst . setLoc ( IDLoc ) ; if ( PendConditionalInstruction ) { PendingConditionalInsts . push_back ( Inst ) ; if ( isITBlockFull ( ) || isITBlockTerminator ( Inst ) ) flushPendingInstructions ( Out ) ; } else { Out . EmitInstruction ( Inst , getSTI ( ) ) ; } return false ; case Match_NearMisses : ReportNearMisses ( NearMisses , IDLoc , Operands ) ; return true ; case Match_MnemonicFail : { uint64_t FBS = ComputeAvailableFeatures ( getSTI ( ) . getFeatureBits ( ) ) ; std :: string Suggestion = <ISA_LIT>MnemonicSpellCheck ( ( ( <ISA_LIT>Operand & ) * Operands [ <NUM_LIT> ] ) . getToken ( ) , FBS ) ; return Error ( IDLoc , <STR_LIT> + Suggestion , ( ( <ISA_LIT>Operand & ) * Operands [ <NUM_LIT> ] ) . getLocRange ( ) ) ; } } llvm_unreachable ( <STR_LIT> ) ;


<s> if ( validateInstruction ( Inst , Operands ) ) { forwardITPosition ( ) ; return true ; } { bool wasInITBlock = inITBlock ( ) ; while ( processInstruction ( Inst , Operands , Out ) ) ; if ( wasInITBlock && hasV8Ops ( ) && isThumb ( ) && ! isV8EligibleForIT ( & Inst ) ) { Warning ( IDLoc , <STR_LIT> ) ; } } forwardITPosition ( ) ; if ( Inst . getOpcode ( ) == <STR_LIT> ) return false ; Inst . setLoc ( IDLoc ) ; if ( PendConditionalInstruction ) { PendingConditionalInsts . push_back ( Inst ) ; if ( isITBlockFull ( ) || isITBlockTerminator ( Inst ) ) flushPendingInstructions ( Out ) ;


<s> Name = ( Name [ <NUM_LIT> ] == 'r' ) ? Name . drop_front ( <NUM_LIT> ) : Name . drop_front ( ) ; switch ( Name . size ( ) ) { default : return - <NUM_LIT> ; case <NUM_LIT> : switch ( Name [ <NUM_LIT> ] ) { default : return - <NUM_LIT> ; case '0' : return <NUM_LIT> ; case '1' : return <NUM_LIT> ; case '2' : return <NUM_LIT> ; case '3' : return <NUM_LIT> ; case '4' : return <NUM_LIT> ; case '5' : return <NUM_LIT> ; 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> ] != '1' ) return - <NUM_LIT> ;


<s> extendImplicitITBlock ( ITState . Cond ) ; if ( MatchInstructionImpl ( Operands , Inst , nullptr , MatchingInlineAsm ) == Match_Success ) { const MCInstrDesc & MCID = MII . get ( Inst . getOpcode ( ) ) ; if ( MCID . isPredicable ( ) ) { <STR_LIT> InstCond = ( <STR_LIT> ) Inst . getOperand ( MCID . findFirstPredOperandIdx ( ) ) . getImm ( ) ; <STR_LIT> ITCond = currentITCond ( ) ; if ( InstCond == ITCond ) { EmitInITBlock = true ; return Match_Success ; } else if ( InstCond == <STR_LIT> ( ITCond ) ) { invertCurrentITCondition ( ) ; EmitInITBlock = true ; return Match_Success ; } } } rewindImplicitITPosition ( ) ; } flushPendingInstructions ( Out ) ; unsigned PlainMatchResult = MatchInstructionImpl ( Operands , Inst , & NearMisses , MatchingInlineAsm ) ; if ( PlainMatchResult == Match_Success ) { const MCInstrDesc & MCID = MII . get ( Inst . getOpcode ( ) ) ; if ( MCID . isPredicable ( ) ) { <STR_LIT> InstCond = ( <STR_LIT> ) Inst . getOperand ( MCID . findFirstPredOperandIdx ( ) ) . getImm ( ) ; if ( Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> ) { EmitInITBlock = false ; return Match_Success ; } if ( InstCond == <STR_LIT> ) { EmitInITBlock = false ; return Match_Success ; } } else { EmitInITBlock = false ; return Match_Success ;


<s> void Note ( SMLoc L , const Twine & Msg , SMRange Range = None ) {

return getParser ( ) . Note ( L , Msg , Range ) ;


<s> if ( NextSymbolIsThumb ) { getParser ( ) . getStreamer ( ) . EmitThumbFunc ( Symbol ) ;


<s> return MatchOperand_Success ; } bool haveEaten = false ; bool isAdd = true ; if ( Tok . is ( AsmToken :: Plus ) ) { Parser . Lex ( ) ; haveEaten = true ; } else if ( Tok . is ( AsmToken :: Minus ) ) { Parser . Lex ( ) ; isAdd = false ; haveEaten = true ; } Tok = Parser . getTok ( ) ; int Reg = tryParseRegister ( ) ; if ( Reg == - <NUM_LIT> ) { if ( ! haveEaten ) return MatchOperand_NoMatch ; Error ( Tok . getLoc ( ) , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Operands . push_back ( <ISA_LIT>Operand :: CreatePostIdxReg ( Reg , isAdd , <STR_LIT> , <NUM_LIT> , S , Tok . getEndLoc ( ) ) ) ; return MatchOperand_Success ;


<s> auto TheReg = <STR_LIT> ( RegName . lower ( ) ) ; if ( ! TheReg ) return MatchOperand_NoMatch ; unsigned Encoding = TheReg -> Encoding ; Parser . Lex ( ) ;

Operands . push_back ( <ISA_LIT>Operand :: CreateBankedReg ( Encoding , S ) ) ;


<s> Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Parser . Lex ( ) ; const MCExpr * WidthExpr ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( WidthExpr , EndLoc ) ) { Error ( E , <STR_LIT> ) ; return MatchOperand_ParseFail ; } CE = dyn_cast < MCConstantExpr > ( WidthExpr ) ; if ( ! CE ) { Error ( E , <STR_LIT> ) ; return MatchOperand_ParseFail ; } int64_t Width = CE -> getValue ( ) ; if ( Width < <NUM_LIT> || Width > <NUM_LIT> - LSB ) { Error ( E , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Operands . push_back ( <ISA_LIT>Operand :: CreateBitfield ( LSB , Width , S , EndLoc ) ) ;


<s> if ( Tok . isNot ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ; int Num = MatchCoprocessorOperandName ( Tok . getString ( ) , 'p' ) ; if ( Num == - <NUM_LIT> ) return MatchOperand_NoMatch ; if ( ( hasV7Ops ( ) || hasV8Ops ( ) ) && ( Num == <NUM_LIT> || Num == <NUM_LIT> ) ) return MatchOperand_NoMatch ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateCoprocNum ( Num , S ) ) ;


<s> return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Expr ) ; if ( ! CE || CE -> getValue ( ) < <NUM_LIT> || CE -> getValue ( ) > <NUM_LIT> ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } int Val = CE -> getValue ( ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: RCurly ) ) return MatchOperand_ParseFail ; SMLoc E = Parser . getTok ( ) . getEndLoc ( ) ; Parser . Lex ( ) ;

Operands . push_back ( <ISA_LIT>Operand :: CreateCoprocOption ( Val , S , E ) ) ;


<s> OperandMatchResultTy <ISA_LIT>AsmParser :: parseCoprocRegOperand ( OperandVector & Operands ) { MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; if ( Tok . isNot ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ; int Reg = MatchCoprocessorOperandName ( Tok . getString ( ) , 'c' ) ; if ( Reg == - <NUM_LIT> ) return MatchOperand_NoMatch ; Parser . Lex ( ) ;

Operands . push_back ( <ISA_LIT>Operand :: CreateCoprocReg ( Reg , S ) ) ;


<s> else if ( IDVal == <STR_LIT> ) parseDirectiveUnreq ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveFnEnd ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveCantUnwind ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectivePersonality ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveHandlerData ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSetFP ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectivePad ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveRegSave ( DirectiveID . getLoc ( ) , false ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveRegSave ( DirectiveID . getLoc ( ) , true ) ; else if ( IDVal == <STR_LIT> || IDVal == <STR_LIT> ) parseDirectiveLtorg ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveEven ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectivePersonalityIndex ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveUnwindRaw ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveMovSP ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveArchExtension ( DirectiveID . getLoc ( ) ) ;

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


<s> if ( parseOptionalToken ( AsmToken :: EndOfStatement ) ) { const MCSection * Section = getStreamer ( ) . getCurrentSectionOnly ( ) ;


<s> const MCSection * Section = getStreamer ( ) . getCurrentSectionOnly ( ) ; assert ( Section && <STR_LIT> ) ; if ( Section -> UseCodeAlign ( ) ) getStreamer ( ) . EmitCodeAlignment ( <NUM_LIT> , <NUM_LIT> ) ;

else getStreamer ( ) . EmitValueToAlignment ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) ;


<s> STI . setDefaultFeatures ( <STR_LIT> , ( <STR_LIT> + <STR_LIT> ( ID ) ) . str ( ) ) ; setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; FixModeAfterArchChange ( WasThumb , L ) ;

getTargetStreamer ( ) . emitArch ( ID ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveArch ( SMLoc L ) { StringRef Arch = getParser ( ) . parseStringToEndOfStatement ( ) . trim ( ) ; <STR_LIT> ID = <STR_LIT> ( Arch ) ; if ( ID == <STR_LIT> :: INVALID ) return Error ( L , <STR_LIT> ) ; bool WasThumb = isThumb ( ) ; Triple T ; MCSubtargetInfo & STI = copySTI ( ) ; STI . setDefaultFeatures ( <STR_LIT> , ( <STR_LIT> + <STR_LIT> ( ID ) ) . str ( ) ) ; setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; FixModeAfterArchChange ( WasThumb , L ) ; getTargetStreamer ( ) . emitArch ( ID ) ; return false ;


<s> if ( getLexer ( ) . isNot ( AsmToken :: Identifier ) ) return Error ( getLexer ( ) . getLoc ( ) , <STR_LIT> ) ; StringRef Name = Parser . getTok ( ) . getString ( ) ; SMLoc ExtLoc = Parser . getTok ( ) . getLoc ( ) ; Lex ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; bool EnableFeature = true ; if ( Name . startswith_lower ( <STR_LIT> ) ) { EnableFeature = false ; Name = Name . substr ( <NUM_LIT> ) ; } unsigned FeatureKind = <STR_LIT> ( Name ) ; if ( FeatureKind == <STR_LIT> ) return Error ( ExtLoc , <STR_LIT> + Name ) ; for ( const auto & Extension : Extensions ) { if ( Extension . Kind != FeatureKind ) continue ; if ( Extension . Features . none ( ) ) return Error ( ExtLoc , <STR_LIT> + Name ) ; if ( ( getAvailableFeatures ( ) & Extension . ArchCheck ) != Extension . ArchCheck ) return Error ( ExtLoc , <STR_LIT> + Name + <STR_LIT> <STR_LIT> ) ; MCSubtargetInfo & STI = copySTI ( ) ; FeatureBitset ToggleFeatures = EnableFeature ? ( ~ STI . getFeatureBits ( ) & Extension . Features ) : ( STI . getFeatureBits ( ) & Extension . Features ) ; uint64_t Features = ComputeAvailableFeatures ( STI . ToggleFeature ( ToggleFeatures ) ) ; setAvailableFeatures ( Features ) ; return false ; }


<s> if ( ( getAvailableFeatures ( ) & Extension . ArchCheck ) != Extension . ArchCheck ) return Error ( ExtLoc , <STR_LIT> + Name + <STR_LIT> <STR_LIT> ) ; MCSubtargetInfo & STI = copySTI ( ) ; FeatureBitset ToggleFeatures = EnableFeature ? ( ~ STI . getFeatureBits ( ) & Extension . Features ) : ( STI . getFeatureBits ( ) & Extension . Features ) ; uint64_t Features = ComputeAvailableFeatures ( STI . ToggleFeature ( ToggleFeatures ) ) ; setAvailableFeatures ( Features ) ;


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


<s> bool <ISA_LIT>AsmParser :: parseDirective<ISA_LIT> ( SMLoc L ) { if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) || check ( ! has<ISA_LIT> ( ) , L , <STR_LIT> ) ) return true ; if ( isThumb ( ) ) SwitchMode ( ) ;

getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( MCAF_Code32 ) ;


<s> if ( Val != <NUM_LIT> && Val != <NUM_LIT> ) { Error ( L , <STR_LIT> ) ; return false ; } Parser . Lex ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( Val == <NUM_LIT> ) { if ( ! hasThumb ( ) ) return Error ( L , <STR_LIT> ) ;


<s> Parser . Lex ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( Val == <NUM_LIT> ) { if ( ! hasThumb ( ) ) return Error ( L , <STR_LIT> ) ; if ( ! isThumb ( ) ) SwitchMode ( ) ; getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( MCAF_Code16 ) ; } else { if ( ! has<ISA_LIT> ( ) ) return Error ( L , <STR_LIT> ) ;


<s> if ( ! getSTI ( ) . isCPUStringValid ( CPU ) ) return Error ( L , <STR_LIT> ) ; bool WasThumb = isThumb ( ) ; MCSubtargetInfo & STI = copySTI ( ) ; STI . setDefaultFeatures ( CPU , <STR_LIT> ) ;

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


<s> return false ; } Parser . Lex ( ) ; } else { const MCExpr * AttrExpr ; TagLoc = Parser . getTok ( ) . getLoc ( ) ; if ( Parser . parseExpression ( AttrExpr ) ) return true ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( AttrExpr ) ; if ( check ( ! CE , TagLoc , <STR_LIT> ) ) return true ; Tag = CE -> getValue ( ) ; } if ( Parser . parseToken ( AsmToken :: Comma , <STR_LIT> ) ) return true ; StringRef StringValue = <STR_LIT> ; bool IsStringValue = false ; int64_t IntegerValue = <NUM_LIT> ; bool IsIntegerValue = false ; if ( Tag == <STR_LIT> || Tag == <STR_LIT> ) IsStringValue = true ; else if ( Tag == <STR_LIT> ) { IsStringValue = true ; IsIntegerValue = true ; } else if ( Tag < <NUM_LIT> || Tag % <NUM_LIT> == <NUM_LIT> ) IsIntegerValue = true ; else if ( Tag % <NUM_LIT> == <NUM_LIT> ) IsStringValue = true ; else llvm_unreachable ( <STR_LIT> ) ; if ( IsIntegerValue ) { const MCExpr * ValueExpr ; SMLoc ValueExprLoc = Parser . getTok ( ) . getLoc ( ) ; if ( Parser . parseExpression ( ValueExpr ) ) return true ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ValueExpr ) ; if ( ! CE ) return Error ( ValueExprLoc , <STR_LIT> ) ; IntegerValue = CE -> getValue ( ) ; } if ( Tag == <STR_LIT> ) { if ( Parser . parseToken ( AsmToken :: Comma , <STR_LIT> ) ) return true ;


<s> StringRef StringValue = <STR_LIT> ; bool IsStringValue = false ; int64_t IntegerValue = <NUM_LIT> ; bool IsIntegerValue = false ; if ( Tag == <STR_LIT> || Tag == <STR_LIT> ) IsStringValue = true ; else if ( Tag == <STR_LIT> ) { IsStringValue = true ; IsIntegerValue = true ; } else if ( Tag < <NUM_LIT> || Tag % <NUM_LIT> == <NUM_LIT> ) IsIntegerValue = true ; else if ( Tag % <NUM_LIT> == <NUM_LIT> ) IsStringValue = true ; else llvm_unreachable ( <STR_LIT> ) ; if ( IsIntegerValue ) { const MCExpr * ValueExpr ; SMLoc ValueExprLoc = Parser . getTok ( ) . getLoc ( ) ; if ( Parser . parseExpression ( ValueExpr ) ) return true ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ValueExpr ) ; if ( ! CE ) return Error ( ValueExprLoc , <STR_LIT> ) ; IntegerValue = CE -> getValue ( ) ; } if ( Tag == <STR_LIT> ) { if ( Parser . parseToken ( AsmToken :: Comma , <STR_LIT> ) ) return true ;


<s> Section = getStreamer ( ) . getCurrentSectionOnly ( ) ; } assert ( Section && <STR_LIT> ) ; if ( Section -> UseCodeAlign ( ) ) getStreamer ( ) . EmitCodeAlignment ( <NUM_LIT> ) ; else getStreamer ( ) . EmitValueToAlignment ( <NUM_LIT> ) ;


<s> Section = getStreamer ( ) . getCurrentSectionOnly ( ) ; } assert ( Section && <STR_LIT> ) ;

if ( Section -> UseCodeAlign ( ) ) getStreamer ( ) . EmitCodeAlignment ( <NUM_LIT> ) ;


<s> if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( UC . hasFnStart ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitFnStartLocNotes ( ) ; return true ;


<s> MCSubtargetInfo & STI = copySTI ( ) ; for ( auto Feature : Features ) STI . ApplyFeatureFlag ( Feature ) ; setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; getTargetStreamer ( ) . emitFPU ( ID ) ;


<s> UC . recordHandlerData ( L ) ; if ( ! UC . hasFnStart ( ) ) return Error ( L , <STR_LIT> ) ; if ( UC . cantUnwind ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitCantUnwindLocNotes ( ) ; return true ; } getTargetStreamer ( ) . emitHandlerData ( ) ;


<s> break ; case 'w' : break ; default : return Error ( Loc , <STR_LIT> <STR_LIT> ) ; } } else { if ( Suffix ) return Error ( Loc , <STR_LIT> ) ; } auto parseOne = [ & ] ( ) -> bool { const MCExpr * Expr ; if ( getParser ( ) . parseExpression ( Expr ) ) return true ; const MCConstantExpr * Value = dyn_cast_or_null < MCConstantExpr > ( Expr ) ; if ( ! Value ) { return Error ( Loc , <STR_LIT> ) ; } switch ( Width ) {


<s> if ( getParser ( ) . parseExpression ( Expr ) ) return true ; const MCConstantExpr * Value = dyn_cast_or_null < MCConstantExpr > ( Expr ) ; if ( ! Value ) { return Error ( Loc , <STR_LIT> ) ; } switch ( Width ) { case <NUM_LIT> : if ( Value -> getValue ( ) > <NUM_LIT> ) return Error ( Loc , <STR_LIT> ) ; break ; case <NUM_LIT> : if ( Value -> getValue ( ) > <NUM_LIT> ) return Error ( Loc , StringRef ( Suffix ? <STR_LIT> : <STR_LIT> ) + <STR_LIT> ) ; break ; default : llvm_unreachable ( <STR_LIT> ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveLtorg ( SMLoc L ) { if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ;

getTargetStreamer ( ) . emitCurrentConstantPool ( ) ;


<s> SMLoc OffsetLoc = Parser . getTok ( ) . getLoc ( ) ; if ( Parser . parseExpression ( OffsetExpr ) ) return Error ( OffsetLoc , <STR_LIT> ) ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( OffsetExpr ) ; if ( ! CE ) return Error ( OffsetLoc , <STR_LIT> ) ; Offset = CE -> getValue ( ) ; }

if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ;


<s> SMLoc ArchLoc = Parser . getTok ( ) . getLoc ( ) ; Lex ( ) ; <STR_LIT> ID = <STR_LIT> ( Arch ) ; if ( ID == <STR_LIT> :: INVALID ) return Error ( ArchLoc , <STR_LIT> + Arch + <STR_LIT> ) ;

if ( parseToken ( AsmToken :: EndOfStatement ) ) return true ;


<s> 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> ) ;


<s> 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> ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; getTargetStreamer ( ) . emitPad ( CE -> getValue ( ) ) ; return false ;


<s> if ( Parser . getTok ( ) . isNot ( AsmToken :: Identifier ) ) return Error ( L , <STR_LIT> ) ; StringRef Name ( Parser . getTok ( ) . getIdentifier ( ) ) ; Parser . Lex ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; UC . recordPersonality ( L ) ; if ( ! UC . hasFnStart ( ) ) return Error ( L , <STR_LIT> ) ; if ( UC . cantUnwind ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitCantUnwindLocNotes ( ) ; return true ; } if ( UC . hasHandlerData ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitHandlerDataLocNotes ( ) ; return true ; } if ( HasExistingPersonality ) { Error ( L , <STR_LIT> ) ; UC . emitPersonalityLocNotes ( ) ; return true ; } MCSymbol * PR = getParser ( ) . getContext ( ) . getOrCreateSymbol ( Name ) ; getTargetStreamer ( ) . emitPersonality ( PR ) ; return false ;


<s> MCAsmParser & Parser = getParser ( ) ; bool HasExistingPersonality = UC . hasPersonality ( ) ; const MCExpr * IndexExpression ; SMLoc IndexLoc = Parser . getTok ( ) . getLoc ( ) ; if ( Parser . parseExpression ( IndexExpression ) || parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) { return true ; } UC . recordPersonalityIndex ( L ) ; if ( ! UC . hasFnStart ( ) ) { return Error ( L , <STR_LIT> ) ; } if ( UC . cantUnwind ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitCantUnwindLocNotes ( ) ; return true ; } if ( UC . hasHandlerData ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitHandlerDataLocNotes ( ) ; return true ; } if ( HasExistingPersonality ) { Error ( L , <STR_LIT> ) ;


<s> if ( Parser . parseExpression ( IndexExpression ) || parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) { return true ; } UC . recordPersonalityIndex ( L ) ; if ( ! UC . hasFnStart ( ) ) { return Error ( L , <STR_LIT> ) ; } if ( UC . cantUnwind ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitCantUnwindLocNotes ( ) ; return true ; } if ( UC . hasHandlerData ( ) ) { Error ( L , <STR_LIT> ) ; UC . emitHandlerDataLocNotes ( ) ; return true ; } if ( HasExistingPersonality ) { Error ( L , <STR_LIT> ) ; UC . emitPersonalityLocNotes ( ) ; return true ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveRegSave ( SMLoc L , bool IsVector ) { if ( ! UC . hasFnStart ( ) ) return Error ( L , <STR_LIT> ) ; if ( UC . hasHandlerData ( ) ) return Error ( L , <STR_LIT> ) ; SmallVector < std :: unique_ptr < MCParsedAsmOperand > , <NUM_LIT> > Operands ; if ( parseRegisterList ( Operands ) || parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; <ISA_LIT>Operand & Op = ( <ISA_LIT>Operand & ) * Operands [ <NUM_LIT> ] ; if ( ! IsVector && ! Op . isRegList ( ) ) return Error ( L , <STR_LIT> ) ; if ( IsVector && ! Op . isDPRRegList ( ) ) return Error ( L , <STR_LIT> ) ;

getTargetStreamer ( ) . emitRegSave ( Op . getRegList ( ) , IsVector ) ;


<s> SMLoc SRegLoc , ERegLoc ; if ( check ( ParseRegister ( Reg , SRegLoc , ERegLoc ) , SRegLoc , <STR_LIT> ) || parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( RegisterReqs . insert ( std :: make_pair ( Name , Reg ) ) . first -> second != Reg ) return Error ( SRegLoc , <STR_LIT> + Name + <STR_LIT> ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveSetFP ( SMLoc L ) { MCAsmParser & Parser = getParser ( ) ; if ( check ( ! UC . hasFnStart ( ) , L , <STR_LIT> ) || check ( UC . hasHandlerData ( ) , L , <STR_LIT> ) ) return true ; SMLoc FPRegLoc = Parser . getTok ( ) . getLoc ( ) ; int FPReg = tryParseRegister ( ) ; if ( check ( FPReg == - <NUM_LIT> , FPRegLoc , <STR_LIT> ) || Parser . parseToken ( AsmToken :: Comma , <STR_LIT> ) ) return true ; SMLoc SPRegLoc = Parser . getTok ( ) . getLoc ( ) ; int SPReg = tryParseRegister ( ) ; if ( check ( SPReg == - <NUM_LIT> , SPRegLoc , <STR_LIT> ) || check ( SPReg != <STR_LIT> && SPReg != UC . getFPReg ( ) , SPRegLoc , <STR_LIT> ) ) return true ; UC . saveFPReg ( FPReg ) ; int64_t Offset = <NUM_LIT> ; if ( Parser . parseOptionalToken ( AsmToken :: Comma ) ) { 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 ( check ( ! CE , ExLoc , <STR_LIT> ) ) return true ;


if ( check ( Mode == <STR_LIT> || Mode == <STR_LIT> , L , <STR_LIT> ) || check ( Mode != <STR_LIT> && Mode != <STR_LIT> , L , <STR_LIT> ) || parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ;


<s> if ( ! isThumb ( ) ) SwitchMode ( ) ; getParser ( ) . getStreamer ( ) . EmitAssemblerFlag ( MCAF_Code16 ) ; return false ;


<s> MCSymbol * Func = getParser ( ) . getContext ( ) . getOrCreateSymbol ( Parser . getTok ( ) . getIdentifier ( ) ) ; getParser ( ) . getStreamer ( ) . EmitThumbFunc ( Func ) ; Parser . Lex ( ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveThumbSet ( SMLoc L ) { MCAsmParser & Parser = getParser ( ) ; StringRef Name ;

if ( check ( Parser . parseIdentifier ( Name ) , <STR_LIT> ) || parseToken ( AsmToken :: Comma , <STR_LIT> + Name + <STR_LIT> ) ) return true ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveTLSDescSeq ( SMLoc L ) { MCAsmParser & Parser = getParser ( ) ; if ( getLexer ( ) . isNot ( AsmToken :: Identifier ) ) return TokError ( <STR_LIT> ) ; const MCSymbolRefExpr * SRE = MCSymbolRefExpr :: create ( Parser . getTok ( ) . getIdentifier ( ) , MCSymbolRefExpr :: VK_<ISA_LIT>_TLSDESCSEQ , getContext ( ) ) ; Lex ( ) ;


<s> MCAsmParser & Parser = getParser ( ) ; if ( getLexer ( ) . isNot ( AsmToken :: Identifier ) ) return TokError ( <STR_LIT> ) ; const MCSymbolRefExpr * SRE = MCSymbolRefExpr :: create ( Parser . getTok ( ) . getIdentifier ( ) , MCSymbolRefExpr :: VK_<ISA_LIT>_TLSDESCSEQ , getContext ( ) ) ; Lex ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; getTargetStreamer ( ) . AnnotateTLSDescriptorSequence ( SRE ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveUnreq ( SMLoc L ) { MCAsmParser & Parser = getParser ( ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: Identifier ) ) return Error ( L , <STR_LIT> ) ; RegisterReqs . erase ( Parser . getTok ( ) . getIdentifier ( ) . lower ( ) ) ;


<s> const MCExpr * OE ; SMLoc OpcodeLoc = getLexer ( ) . getLoc ( ) ; if ( check ( getLexer ( ) . is ( AsmToken :: EndOfStatement ) || Parser . parseExpression ( OE ) , OpcodeLoc , <STR_LIT> ) ) return true ; const MCConstantExpr * OC = dyn_cast < MCConstantExpr > ( OE ) ; if ( ! OC ) return Error ( OpcodeLoc , <STR_LIT> ) ; const int64_t Opcode = OC -> getValue ( ) ; if ( Opcode & ~ <NUM_LIT> ) return Error ( OpcodeLoc , <STR_LIT> ) ; Opcodes . push_back ( uint8_t ( Opcode ) ) ; return false ; } ; SMLoc OpcodeLoc = getLexer ( ) . getLoc ( ) ; if ( parseOptionalToken ( AsmToken :: EndOfStatement ) ) return Error ( OpcodeLoc , <STR_LIT> ) ; if ( parseMany ( parseOne ) ) return true ; getTargetStreamer ( ) . emitUnwindRaw ( StackOffset , Opcodes ) ; return false ;


<s> if ( Tok . is ( AsmToken :: Real ) && isVmovf ) { 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 ) && isFconst ) { int64_t Val = Tok . getIntVal ( ) ; Parser . Lex ( ) ; if ( Val > <NUM_LIT> || Val < <NUM_LIT> ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } float RealVal = <STR_LIT> ( Val ) ;

Val = APFloat ( RealVal ) . bitcastToAPInt ( ) . getZExtValue ( ) ;


<s> Operands . push_back ( <ISA_LIT>Operand :: CreateToken ( ExtraToken , Loc ) ) ; } } if ( getLexer ( ) . isNot ( AsmToken :: EndOfStatement ) ) { if ( parseOperand ( Operands , Mnemonic ) ) { return true ; } while ( parseOptionalToken ( AsmToken :: Comma ) ) { if ( parseOperand ( Operands , Mnemonic ) ) { return true ; } } } if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; tryConvertingToTwoOperandForm ( Mnemonic , CarrySetting , Operands ) ; if ( ! CarrySetting && shouldOmitCCOutOperand ( Mnemonic , Operands ) ) Operands . erase ( Operands . begin ( ) + <NUM_LIT> ) ; if ( PredicationCode == <STR_LIT> && shouldOmitPredicateOperand ( Mnemonic , Operands ) ) Operands . erase ( Operands . begin ( ) + <NUM_LIT> ) ; if ( ! isThumb ( ) && Mnemonic == <STR_LIT> && Operands . size ( ) == <NUM_LIT> && static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) . isImm ( ) ) Operands . erase ( Operands . begin ( ) + <NUM_LIT> ) ; if ( ! isThumb ( ) && Operands . size ( ) > <NUM_LIT> && ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) ) { bool isLoad = ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) ; unsigned Idx = isLoad ? <NUM_LIT> : <NUM_LIT> ; <ISA_LIT>Operand & Op1 = static_cast < <ISA_LIT>Operand & > ( * Operands [ Idx ] ) ; <ISA_LIT>Operand & Op2 = static_cast < <ISA_LIT>Operand & > ( * Operands [ Idx + <NUM_LIT> ] ) ; const MCRegisterClass & MRC = MRI -> getRegClass ( <STR_LIT> ) ; if ( Op1 . isReg ( ) && Op2 . isReg ( ) && MRC . contains ( Op1 . getReg ( ) ) && MRC . contains ( Op2 . getReg ( ) ) ) { unsigned Reg1 = Op1 . getReg ( ) ; unsigned Reg2 = Op2 . getReg ( ) ; unsigned Rt = MRI -> getEncodingValue ( Reg1 ) ; unsigned Rt2 = MRI -> getEncodingValue ( Reg2 ) ; if ( Rt + <NUM_LIT> != Rt2 || ( Rt & <NUM_LIT> ) ) { return Error ( Op2 . getStartLoc ( ) , isLoad ? <STR_LIT> : <STR_LIT> ) ; } unsigned NewReg = MRI -> getMatchingSuperReg ( Reg1 , <STR_LIT> , & ( MRI -> getRegClass ( <STR_LIT> ) ) ) ; Operands [ Idx ] = <ISA_LIT>Operand :: CreateReg ( NewReg , Op1 . getStartLoc ( ) , Op2 . getEndLoc ( ) ) ;

Operands . erase ( Operands . begin ( ) + Idx + <NUM_LIT> ) ;


<s> if ( Tok . is ( AsmToken :: Identifier ) ) { StringRef OptStr = Tok . getString ( ) ; if ( OptStr . equals_lower ( <STR_LIT> ) ) Opt = <STR_LIT> ; else 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 * ISBarrierID ; if ( getParser ( ) . parseExpression ( ISBarrierID ) ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ISBarrierID ) ; if ( ! CE ) { Error ( Loc , <STR_LIT> ) ;


<s> OperandMatchResultTy <ISA_LIT>AsmParser :: parseITCondCode ( OperandVector & Operands ) { MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; if ( ! Tok . is ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ; unsigned CC = <ISA_LIT>CondCodeFromString ( Tok . getString ( ) ) ; if ( CC == ~ <NUM_LIT> ) return MatchOperand_NoMatch ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateCondCode ( <STR_LIT> ( CC ) , S ) ) ;


<s> if ( getParser ( ) . parseExpression ( Value ) ) return true ; getParser ( ) . getStreamer ( ) . EmitValue ( Value , Size , L ) ; return false ;


<s> auto parseOne = [ & ] ( ) -> bool { const MCExpr * Value ; if ( getParser ( ) . parseExpression ( Value ) ) return true ;

getParser ( ) . getStreamer ( ) . EmitValue ( Value , Size , L ) ;


<s> MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; unsigned Opt ; if ( Tok . is ( AsmToken :: Identifier ) ) { 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> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( ! hasV8Ops ( ) && ( Opt == <STR_LIT> || Opt == <STR_LIT> || Opt == <STR_LIT> || Opt == <STR_LIT> ) ) Opt = ~ <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> ) ; return MatchOperand_ParseFail ; } int Val = CE -> getValue ( ) ; if ( Val & ~ <NUM_LIT> ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Opt = <STR_LIT> + Val ; } else return MatchOperand_ParseFail ;

Operands . push_back ( <ISA_LIT>Operand :: CreateMemBarrierOpt ( ( <STR_LIT> ) Opt , S ) ) ;


<s> OperandMatchResultTy <ISA_LIT>AsmParser :: parseMemBarrierOptOperand ( OperandVector & Operands ) { MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; unsigned Opt ; if ( Tok . is ( AsmToken :: Identifier ) ) { 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> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( ! hasV8Ops ( ) && ( Opt == <STR_LIT> || Opt == <STR_LIT> || Opt == <STR_LIT> || Opt == <STR_LIT> ) ) Opt = ~ <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> ) ; return MatchOperand_ParseFail ; } int Val = CE -> getValue ( ) ; if ( Val & ~ <NUM_LIT> ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; }


<s> else if ( ShiftName == <STR_LIT> || ShiftName == <STR_LIT> ) St = <STR_LIT> ; else return Error ( Loc , <STR_LIT> ) ; Parser . Lex ( ) ; Amount = <NUM_LIT> ; if ( St != <STR_LIT> ) { Loc = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & HashTok = Parser . getTok ( ) ; if ( HashTok . isNot ( AsmToken :: Hash ) && HashTok . isNot ( AsmToken :: Dollar ) ) return Error ( HashTok . getLoc ( ) , <STR_LIT> ) ; Parser . Lex ( ) ; const MCExpr * Expr ; if ( getParser ( ) . parseExpression ( Expr ) ) return true ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Expr ) ; if ( ! CE ) return Error ( Loc , <STR_LIT> ) ; int64_t Imm = CE -> getValue ( ) ; if ( Imm < <NUM_LIT> || ( ( St == <STR_LIT> || St == <STR_LIT> ) && Imm > <NUM_LIT> ) || ( ( St == <STR_LIT> || St == <STR_LIT> ) && Imm > <NUM_LIT> ) ) return Error ( Loc , <STR_LIT> ) ; if ( Imm == <NUM_LIT> ) St = <STR_LIT> ; if ( Imm == <NUM_LIT> ) Imm = <NUM_LIT> ; Amount = Imm ; } return false ;


<s> Error ( Sx1 , <STR_LIT> ) ; return MatchOperand_ParseFail ; } if ( Imm1 & ~ <NUM_LIT> ) { Error ( Sx1 , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Parser . Lex ( ) ; SMLoc Sx2 , Ex2 ; Sx2 = Parser . getTok ( ) . getLoc ( ) ; if ( Parser . getTok ( ) . is ( AsmToken :: Hash ) || Parser . getTok ( ) . is ( AsmToken :: Dollar ) ) Parser . Lex ( ) ; const MCExpr * Imm2Exp ; if ( getParser ( ) . parseExpression ( Imm2Exp , Ex2 ) ) { Error ( Sx2 , <STR_LIT> ) ; return MatchOperand_ParseFail ; } CE = dyn_cast < MCConstantExpr > ( Imm2Exp ) ; if ( CE ) { Imm2 = CE -> getValue ( ) ; if ( ! ( Imm2 & ~ <NUM_LIT> ) ) { Operands . push_back ( <ISA_LIT>Operand :: CreateModImm ( Imm1 , Imm2 , S , Ex2 ) ) ; return MatchOperand_Success ; } Error ( Sx2 , <STR_LIT> ) ; return MatchOperand_ParseFail ; } else { Error ( Sx2 , <STR_LIT> ) ; return MatchOperand_ParseFail ; }


<s> Operands . push_back ( <ISA_LIT>Operand :: CreateMSRMask ( SYSmvalue , S ) ) ; return MatchOperand_Success ; } size_t Start = <NUM_LIT> , Next = Mask . find ( '_' ) ; StringRef Flags = <STR_LIT> ; std :: string SpecReg = Mask . slice ( Start , Next ) . lower ( ) ; if ( Next != StringRef :: npos ) Flags = Mask . slice ( Next + <NUM_LIT> , Mask . size ( ) ) ; unsigned FlagsVal = <NUM_LIT> ; if ( SpecReg == <STR_LIT> ) { FlagsVal = StringSwitch < unsigned > ( Flags ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( FlagsVal == ~ <NUM_LIT> ) { if ( ! Flags . empty ( ) ) return MatchOperand_NoMatch ; else FlagsVal = <NUM_LIT> ; } } else if ( SpecReg == <STR_LIT> || SpecReg == <STR_LIT> ) { if ( Flags == <STR_LIT> || Flags == <STR_LIT> ) Flags = <STR_LIT> ; for ( int i = <NUM_LIT> , e = Flags . size ( ) ; i != e ; ++ i ) { unsigned Flag = StringSwitch < unsigned > ( Flags . substr ( i , <NUM_LIT> ) ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( Flag == ~ <NUM_LIT> || ( FlagsVal & Flag ) ) return MatchOperand_NoMatch ; FlagsVal |= Flag ; } } else return MatchOperand_NoMatch ; if ( SpecReg == <STR_LIT> ) FlagsVal |= <NUM_LIT> ;


<s> Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateMSRMask ( SYSmvalue , S ) ) ; return MatchOperand_Success ; } size_t Start = <NUM_LIT> , Next = Mask . find ( '_' ) ; StringRef Flags = <STR_LIT> ; std :: string SpecReg = Mask . slice ( Start , Next ) . lower ( ) ; if ( Next != StringRef :: npos ) Flags = Mask . slice ( Next + <NUM_LIT> , Mask . size ( ) ) ; unsigned FlagsVal = <NUM_LIT> ; if ( SpecReg == <STR_LIT> ) {

FlagsVal = StringSwitch < unsigned > ( Flags ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Case ( <STR_LIT> , <NUM_LIT> ) . Default ( ~ <NUM_LIT> ) ;


<s> case AsmToken :: Integer : case AsmToken :: String : case AsmToken :: Dot : { const MCExpr * IdVal ; S = Parser . getTok ( ) . getLoc ( ) ; if ( getParser ( ) . parseExpression ( IdVal ) ) return true ; E = SMLoc :: getFromPointer ( Parser . getTok ( ) . getLoc ( ) . getPointer ( ) - <NUM_LIT> ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( IdVal , S , E ) ) ; 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 ( std :: numeric_limits < int32_t > :: 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 ; } LLVM_FALLTHROUGH ; case AsmToken :: Colon : { S = Parser . getTok ( ) . getLoc ( ) ; <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> default : Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; case AsmToken :: Identifier : { bool ExpectLabel = Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ; if ( ! ExpectLabel ) { if ( ! tryParseRegisterWithWriteBack ( Operands ) ) return false ; int Res = tryParseShiftRegister ( Operands ) ; if ( Res == <NUM_LIT> ) return false ; else if ( Res == - <NUM_LIT> ) return true ; if ( Mnemonic == <STR_LIT> && Parser . getTok ( ) . getString ( ) . equals_lower ( <STR_LIT> ) ) { S = Parser . getTok ( ) . getLoc ( ) ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateToken ( <STR_LIT> , S ) ) ; return false ; } } LLVM_FALLTHROUGH ; } case AsmToken :: LParen : case AsmToken :: Integer : case AsmToken :: String : case AsmToken :: Dot : { const MCExpr * IdVal ; S = Parser . getTok ( ) . getLoc ( ) ; if ( getParser ( ) . parseExpression ( IdVal ) ) return true ; E = SMLoc :: getFromPointer ( Parser . getTok ( ) . getLoc ( ) . getPointer ( ) - <NUM_LIT> ) ;

Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( IdVal , S , E ) ) ;


<s> OperandMatchResultTy parsePKHASRImm ( OperandVector & O ) {

return parsePKHImm ( O , <STR_LIT> , <NUM_LIT> , <NUM_LIT> ) ;


<s> return parsePKHImm ( O , <STR_LIT> , <NUM_LIT> , <NUM_LIT> ) ;


<s> SMLoc Loc = Parser . getTok ( ) . getLoc ( ) ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( ShiftAmount , EndLoc ) ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ShiftAmount ) ; if ( ! CE ) { Error ( Loc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } int Val = CE -> getValue ( ) ; if ( Val < Low || Val > High ) { Error ( Loc , <STR_LIT> ) ;


<s> if ( Tok . is ( AsmToken :: Plus ) ) { Parser . Lex ( ) ; haveEaten = true ; } else if ( Tok . is ( AsmToken :: Minus ) ) { Parser . Lex ( ) ; isAdd = false ; haveEaten = true ; } SMLoc E = Parser . getTok ( ) . getEndLoc ( ) ; int Reg = tryParseRegister ( ) ; if ( Reg == - <NUM_LIT> ) { if ( ! haveEaten ) return MatchOperand_NoMatch ; Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return MatchOperand_ParseFail ; } <STR_LIT> ShiftTy = <STR_LIT> ; unsigned ShiftImm = <NUM_LIT> ; if ( Parser . getTok ( ) . is ( AsmToken :: Comma ) ) { Parser . Lex ( ) ; if ( parseMemRegOffsetShift ( ShiftTy , ShiftImm ) ) return MatchOperand_ParseFail ; E = Parser . getTok ( ) . getLoc ( ) ;


<s> StringRef IFlagsStr = Tok . getString ( ) ; unsigned IFlags = <NUM_LIT> ; if ( IFlagsStr != <STR_LIT> ) { for ( int i = <NUM_LIT> , e = IFlagsStr . size ( ) ; i != e ; ++ i ) { unsigned Flag = StringSwitch < unsigned > ( IFlagsStr . substr ( i , <NUM_LIT> ) . lower ( ) ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( Flag == ~ <NUM_LIT> || ( IFlags & Flag ) ) return MatchOperand_NoMatch ;


<s> for ( int i = <NUM_LIT> , e = IFlagsStr . size ( ) ; i != e ; ++ i ) { unsigned Flag = StringSwitch < unsigned > ( IFlagsStr . substr ( i , <NUM_LIT> ) . lower ( ) ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ;

if ( Flag == ~ <NUM_LIT> || ( IFlags & Flag ) ) return MatchOperand_NoMatch ;


<s> bool <ISA_LIT>AsmParser :: ParseRegister ( unsigned & RegNo , SMLoc & StartLoc , SMLoc & EndLoc ) { const AsmToken & Tok = getParser ( ) . getTok ( ) ; StartLoc = Tok . getLoc ( ) ; EndLoc = Tok . getEndLoc ( ) ; RegNo = tryParseRegister ( ) ; return ( RegNo == ( unsigned ) - <NUM_LIT> ) ;


<s> if ( Reg == EndReg ) continue ; if ( ! RC -> contains ( EndReg ) ) return Error ( AfterMinusLoc , <STR_LIT> ) ; if ( MRI -> getEncodingValue ( Reg ) > MRI -> getEncodingValue ( EndReg ) ) return Error ( AfterMinusLoc , <STR_LIT> ) ; while ( Reg != EndReg ) { Reg = getNextRegister ( Reg ) ; EReg = MRI -> getEncodingValue ( Reg ) ; Registers . push_back ( std :: pair < unsigned , unsigned > ( EReg , Reg ) ) ; } continue ; } Parser . Lex ( ) ; RegLoc = Parser . getTok ( ) . getLoc ( ) ; int OldReg = Reg ; const AsmToken RegTok = Parser . getTok ( ) ; Reg = tryParseRegister ( ) ; if ( Reg == - <NUM_LIT> ) return Error ( RegLoc , <STR_LIT> ) ; bool isQReg = false ; if ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Reg ) ) { Reg = getDRegFromQReg ( Reg ) ; isQReg = true ; } if ( ! RC -> contains ( Reg ) ) return Error ( RegLoc , <STR_LIT> ) ; if ( MRI -> getEncodingValue ( Reg ) < MRI -> getEncodingValue ( OldReg ) ) { if ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Reg ) ) Warning ( RegLoc , <STR_LIT> ) ; else return Error ( RegLoc , <STR_LIT> ) ; } if ( MRI -> getEncodingValue ( Reg ) == MRI -> getEncodingValue ( OldReg ) ) { Warning ( RegLoc , <STR_LIT> + RegTok . getString ( ) + <STR_LIT> ) ; continue ;


<s> const MCExpr * ShiftAmount ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( ShiftAmount , EndLoc ) ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ShiftAmount ) ; if ( ! CE ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } int64_t Val = CE -> getValue ( ) ; if ( Val != <NUM_LIT> && Val != <NUM_LIT> && Val != <NUM_LIT> && Val != <NUM_LIT> ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Operands . push_back ( <ISA_LIT>Operand :: CreateRotImm ( Val , S , EndLoc ) ) ;


<s> if ( getParser ( ) . parseExpression ( ShiftAmount , EndLoc ) ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ShiftAmount ) ; if ( ! CE ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } int64_t Val = CE -> getValue ( ) ; if ( Val != <NUM_LIT> && Val != <NUM_LIT> && Val != <NUM_LIT> && Val != <NUM_LIT> ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Operands . push_back ( <ISA_LIT>Operand :: CreateRotImm ( Val , S , EndLoc ) ) ;


<s> if ( Val == - <NUM_LIT> ) { Error ( S , <STR_LIT> ) ; return MatchOperand_ParseFail ; }

Operands . push_back ( <ISA_LIT>Operand :: CreateImm ( MCConstantExpr :: create ( Val , getContext ( ) ) , S , Tok . getEndLoc ( ) ) ) ;


<s> if ( Tok . isNot ( AsmToken :: Identifier ) ) { Error ( S , <STR_LIT> ) ; return MatchOperand_ParseFail ; } StringRef ShiftName = Tok . getString ( ) ; bool isASR ; if ( ShiftName == <STR_LIT> || ShiftName == <STR_LIT> ) isASR = false ; else if ( ShiftName == <STR_LIT> || ShiftName == <STR_LIT> ) isASR = true ; else { Error ( S , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Parser . Lex ( ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: Hash ) && Parser . getTok ( ) . isNot ( AsmToken :: Dollar ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Parser . Lex ( ) ; SMLoc ExLoc = Parser . getTok ( ) . getLoc ( ) ; const MCExpr * ShiftAmount ; SMLoc EndLoc ; if ( getParser ( ) . parseExpression ( ShiftAmount , EndLoc ) ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( ShiftAmount ) ; if ( ! CE ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } int64_t Val = CE -> getValue ( ) ; if ( isASR ) { if ( Val < <NUM_LIT> || Val > <NUM_LIT> ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } if ( isThumb ( ) && Val == <NUM_LIT> ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } if ( Val == <NUM_LIT> ) Val = <NUM_LIT> ; } else { if ( Val < <NUM_LIT> || Val > <NUM_LIT> ) { Error ( ExLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } } Operands . push_back ( <ISA_LIT>Operand :: CreateShifterImm ( isASR , Val , S , EndLoc ) ) ;


<s> } if ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Reg ) ) { if ( ! Spacing ) Spacing = <NUM_LIT> ; else if ( Spacing == <NUM_LIT> ) { Error ( RegLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } Reg = getDRegFromQReg ( Reg ) ; if ( Reg != OldReg + <NUM_LIT> ) { Error ( RegLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } ++ Reg ; Count += <NUM_LIT> ; VectorLaneTy NextLaneKind ; unsigned NextLaneIndex ; SMLoc LaneLoc = Parser . getTok ( ) . getLoc ( ) ; if ( parseVectorLane ( NextLaneKind , NextLaneIndex , E ) != MatchOperand_Success ) return MatchOperand_ParseFail ; if ( NextLaneKind != LaneKind || LaneIndex != NextLaneIndex ) { Error ( LaneLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } continue ; } if ( ! Spacing ) Spacing = <NUM_LIT> + ( Reg == OldReg + <NUM_LIT> ) ; if ( Reg != OldReg + Spacing ) { Error ( RegLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } ++ Count ; VectorLaneTy NextLaneKind ; unsigned NextLaneIndex ; SMLoc EndLoc = Parser . getTok ( ) . getLoc ( ) ; if ( parseVectorLane ( NextLaneKind , NextLaneIndex , E ) != MatchOperand_Success ) return MatchOperand_ParseFail ; if ( NextLaneKind != LaneKind || LaneIndex != NextLaneIndex ) { Error ( EndLoc , <STR_LIT> ) ; return MatchOperand_ParseFail ; } } if ( Parser . getTok ( ) . isNot ( AsmToken :: RCurly ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return MatchOperand_ParseFail ; } E = Parser . getTok ( ) . getEndLoc ( ) ; Parser . Lex ( ) ; switch ( LaneKind ) { case NoLanes : if ( Count == <NUM_LIT> ) { const MCRegisterClass * RC = ( Spacing == <NUM_LIT> ) ? & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] : & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] ; FirstReg = MRI -> getMatchingSuperReg ( FirstReg , <STR_LIT> , RC ) ; } Operands . push_back ( <ISA_LIT>Operand :: CreateVectorList ( FirstReg , Count , ( Spacing == <NUM_LIT> ) , S , E ) ) ; break ; case AllLanes : if ( Count == <NUM_LIT> ) { const MCRegisterClass * RC = ( Spacing == <NUM_LIT> ) ? & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] : & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] ; FirstReg = MRI -> getMatchingSuperReg ( FirstReg , <STR_LIT> , RC ) ; } Operands . push_back ( <ISA_LIT>Operand :: CreateVectorListAllLanes ( FirstReg , Count , ( Spacing == <NUM_LIT> ) , S , E ) ) ;


<s> OS << <STR_LIT> << getReg ( ) << <STR_LIT> ; break ; case k_ITCondMask : { static const char * const MaskStr [ ] = { <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> } ; assert ( ( ITMask . Mask & <NUM_LIT> ) == ITMask . Mask ) ; OS << <STR_LIT> << MaskStr [ ITMask . Mask ] << <STR_LIT> ; break ; } case k_CoprocNum : OS << <STR_LIT> << getCoproc ( ) << <STR_LIT> ; break ; case k_CoprocReg : 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_BankedReg : OS << <STR_LIT> << getBankedReg ( ) << <STR_LIT> ; break ; case k_Immediate : OS << * getImm ( ) ; break ; case k_MemBarrierOpt : OS << <STR_LIT> << MemBOptToString ( getMemBarrierOpt ( ) , false ) << <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 ;


<s> 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_ModifiedImmediate : OS << <STR_LIT> << ModImm . Bits << <STR_LIT> << ModImm . Rot << <STR_LIT> ; break ; case k_ConstantPoolImmediate : OS << <STR_LIT> << * getConstantPoolImm ( ) ; break ; case k_BitfieldDescriptor : OS << <STR_LIT> << <STR_LIT> << Bitfield . LSB << <STR_LIT> << Bitfield . Width << <STR_LIT> ; break ; case k_RegisterList : case k_DPRRegisterList : case k_SPRRegisterList : { OS << <STR_LIT> ; const SmallVectorImpl < unsigned > & RegList = getRegList ( ) ; for ( SmallVectorImpl < unsigned > :: const_iterator I = RegList . begin ( ) , E = RegList . end ( ) ; I != E ; ) { OS << * I ; if ( ++ I < E ) OS << <STR_LIT> ; } OS << <STR_LIT> ; break ;


<s> void <ISA_LIT>AsmParser :: ReportNearMisses ( SmallVectorImpl < NearMissInfo > & NearMisses , SMLoc IDLoc , OperandVector & Operands ) { SmallVector < NearMissMessage , <NUM_LIT> > Messages ; FilterNearMisses ( NearMisses , Messages , IDLoc , Operands ) ; if ( Messages . size ( ) == <NUM_LIT> ) { Error ( IDLoc , <STR_LIT> ) ; } else if ( Messages . size ( ) == <NUM_LIT> ) { Error ( Messages [ <NUM_LIT> ] . Loc , Messages [ <NUM_LIT> ] . Message ) ; } else { Error ( IDLoc , <STR_LIT> ) ; for ( auto & M : Messages ) { Note ( M . Loc , M . Message ) ; }


<s> FilterNearMisses ( NearMisses , Messages , IDLoc , Operands ) ; if ( Messages . size ( ) == <NUM_LIT> ) { Error ( IDLoc , <STR_LIT> ) ; } else if ( Messages . size ( ) == <NUM_LIT> ) { Error ( Messages [ <NUM_LIT> ] . Loc , Messages [ <NUM_LIT> ] . Message ) ; } else { Error ( IDLoc , <STR_LIT> ) ; for ( auto & M : Messages ) { Note ( M . Loc , M . Message ) ; } }


<s> assert ( ITState . CurPosition > <NUM_LIT> ) ; ITState . CurPosition -- ;

unsigned TZ = countTrailingZeros ( ITState . Mask ) ;


<s> ITState . CurPosition -- ; unsigned TZ = countTrailingZeros ( ITState . Mask ) ;


<s> unsigned RegIdx = <NUM_LIT> ; if ( ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) && ( static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) . getToken ( ) == <STR_LIT> || static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) . getToken ( ) == <STR_LIT> ) ) { if ( static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) . isToken ( ) && ( static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) . getToken ( ) == <STR_LIT> || static_cast < <ISA_LIT>Operand & > ( * Operands [ <NUM_LIT> ] ) . getToken ( ) == <STR_LIT> ) ) RegIdx = <NUM_LIT> ; if ( static_cast < <ISA_LIT>Operand & > ( * Operands [ RegIdx ] ) . isReg ( ) && ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( static_cast < <ISA_LIT>Operand & > ( * Operands [ RegIdx ] ) . getReg ( ) ) || <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( static_cast < <ISA_LIT>Operand & > ( * Operands [ RegIdx ] ) . getReg ( ) ) ) ) return true ;


<s> if ( Mnemonic . endswith ( <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> || 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 = Mnemonic . slice ( <NUM_LIT> , Mnemonic . size ( ) - <NUM_LIT> ) ; CarrySetting = true ; } if ( Mnemonic . startswith ( <STR_LIT> ) ) { unsigned IMod = StringSwitch < unsigned > ( Mnemonic . substr ( Mnemonic . size ( ) - <NUM_LIT> , <NUM_LIT> ) ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ; if ( IMod != ~ <NUM_LIT> ) { Mnemonic = Mnemonic . slice ( <NUM_LIT> , Mnemonic . size ( ) - <NUM_LIT> ) ; ProcessorIMod = IMod ; } }


<s> void startExplicitITBlock ( <STR_LIT> Cond , unsigned Mask ) { assert ( ! inITBlock ( ) ) ; ITState . Cond = Cond ; ITState . Mask = Mask ; ITState . CurPosition = <NUM_LIT> ;


<s> ITState . CurPosition = <NUM_LIT> ; ITState . IsExplicit = false ;


<s> MCSubtargetInfo & STI = copySTI ( ) ; uint64_t FB = ComputeAvailableFeatures ( STI . ToggleFeature ( <STR_LIT> ) ) ;


<s> if ( Mnemonic != <STR_LIT> ) return ; bool TryTransform = Op3Reg == <STR_LIT> || Op4Reg == <STR_LIT> || ( Op5 . isReg ( ) && Op5 . getReg ( ) == <STR_LIT> ) ; if ( ! TryTransform ) { TryTransform = ( Op3Reg == <STR_LIT> || Op4Reg == <STR_LIT> || ( Op5 . isReg ( ) && Op5 . getReg ( ) == <STR_LIT> ) ) && ! ( Op3Reg == <STR_LIT> && Op4Reg == <STR_LIT> && Op5 . isImm ( ) && ! Op5 . isImm0_508s4 ( ) ) ; } if ( ! TryTransform ) return ; } else if ( ! isThumbOne ( ) ) return ; 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> ) ) return ; bool Transform = Op3Reg == Op4Reg ; const <ISA_LIT>Operand * LastOp = & Op5 ; bool Swap = false ; if ( ! Transform && Op5 . isReg ( ) && Op3Reg == Op5 . getReg ( ) && ( ( Mnemonic == <STR_LIT> && Op4Reg != <STR_LIT> ) || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) ) { Swap = true ; LastOp = & Op4 ; Transform = true ; } if ( Transform ) { if ( ( ( Mnemonic == <STR_LIT> && CarrySetting ) || Mnemonic == <STR_LIT> ) && LastOp -> isReg ( ) ) Transform = false ; if ( ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) && LastOp -> isImm0_7 ( ) ) Transform = false ; } if ( Transform ) { if ( Swap ) std :: swap ( Op4 , Op5 ) ; Operands . erase ( Operands . begin ( ) + <NUM_LIT> ) ;


<s> } else if ( ! isThumbOne ( ) ) return ; 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> ) ) return ; bool Transform = Op3Reg == Op4Reg ; const <ISA_LIT>Operand * LastOp = & Op5 ; bool Swap = false ; if ( ! Transform && Op5 . isReg ( ) && Op3Reg == Op5 . getReg ( ) && ( ( Mnemonic == <STR_LIT> && Op4Reg != <STR_LIT> ) || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) ) { Swap = true ; LastOp = & Op4 ; Transform = true ;


<s> if ( ! RegNum ) { RegNum = StringSwitch < unsigned > ( lowerCase ) . 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> ) . 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 ( ! RegNum ) { StringMap < unsigned > :: const_iterator Entry = RegisterReqs . find ( lowerCase ) ; if ( Entry == RegisterReqs . end ( ) ) return - <NUM_LIT> ; Parser . Lex ( ) ; return Entry -> getValue ( ) ;


<s> unsigned RegNum = MatchRegisterName ( lowerCase ) ; if ( ! RegNum ) { RegNum = StringSwitch < unsigned > ( lowerCase ) . 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> ) . 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 ( ! RegNum ) { StringMap < unsigned > :: const_iterator Entry = RegisterReqs . find ( lowerCase ) ; if ( Entry == RegisterReqs . end ( ) ) return - <NUM_LIT> ;


<s> if ( ExclaimTok . is ( AsmToken :: Exclaim ) ) { Operands . push_back ( <ISA_LIT>Operand :: CreateToken ( ExclaimTok . getString ( ) , ExclaimTok . getLoc ( ) ) ) ; Parser . Lex ( ) ; return false ; } if ( Parser . getTok ( ) . is ( AsmToken :: LBrac ) ) { SMLoc SIdx = Parser . getTok ( ) . getLoc ( ) ; Parser . Lex ( ) ; const MCExpr * ImmVal ; if ( getParser ( ) . parseExpression ( ImmVal ) ) return true ;

const MCConstantExpr * MCE = dyn_cast < MCConstantExpr > ( ImmVal ) ;


<s> Operands . push_back ( <ISA_LIT>Operand :: CreateReg ( RegNo , RegStartLoc , RegEndLoc ) ) ; const AsmToken & ExclaimTok = Parser . getTok ( ) ; if ( ExclaimTok . is ( AsmToken :: Exclaim ) ) { Operands . push_back ( <ISA_LIT>Operand :: CreateToken ( ExclaimTok . getString ( ) , ExclaimTok . getLoc ( ) ) ) ; Parser . Lex ( ) ; return false ; } if ( Parser . getTok ( ) . is ( AsmToken :: LBrac ) ) { SMLoc SIdx = Parser . getTok ( ) . getLoc ( ) ; Parser . Lex ( ) ; const MCExpr * ImmVal ; if ( getParser ( ) . parseExpression ( ImmVal ) ) return true ; const MCConstantExpr * MCE = dyn_cast < MCConstantExpr > ( ImmVal ) ; if ( ! MCE ) return TokError ( <STR_LIT> ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: RBrac ) ) return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; SMLoc E = Parser . getTok ( ) . getEndLoc ( ) ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateVectorIndex ( MCE -> getValue ( ) , SIdx , E , getContext ( ) ) ) ; } return false ;


<s> if ( Op . isImm ( ) ) { const MCExpr * SOExpr = Op . getImm ( ) ; int64_t Value ; if ( ! SOExpr -> evaluateAsAbsolute ( Value ) ) return Match_Success ; assert ( ( Value >= std :: numeric_limits < int32_t > :: min ( ) && Value <= std :: numeric_limits < uint32_t > :: max ( ) ) && <STR_LIT> ) ; } break ; case MCK_rGPR : if ( hasV8Ops ( ) && Op . isReg ( ) && Op . getReg ( ) == <STR_LIT> ) return Match_Success ; return Match_rGPR ; case MCK_GPRPair : if ( Op . isReg ( ) && MRI -> getRegClass ( <STR_LIT> ) . contains ( Op . getReg ( ) ) ) return Match_Success ; break ; }


<s> assert ( ( Value >= std :: numeric_limits < int32_t > :: min ( ) && Value <= std :: numeric_limits < uint32_t > :: max ( ) ) && <STR_LIT> ) ; } break ; case MCK_rGPR : if ( hasV8Ops ( ) && Op . isReg ( ) && Op . getReg ( ) == <STR_LIT> ) return Match_Success ; return Match_rGPR ; case MCK_GPRPair : if ( Op . isReg ( ) && MRI -> getRegClass ( <STR_LIT> ) . contains ( Op . getReg ( ) ) ) return Match_Success ; break ;


<s> bool <ISA_LIT>AsmParser :: validatetLDMRegList ( const MCInst & Inst , const OperandVector & Operands , unsigned ListNo , bool IsARPop ) { const <ISA_LIT>Operand & Op = static_cast < const <ISA_LIT>Operand & > ( * Operands [ ListNo ] ) ; bool HasWritebackToken = Op . isToken ( ) && Op . getToken ( ) == <STR_LIT> ;

bool ListContainsSP = listContainsReg ( Inst , ListNo , <STR_LIT> ) ;


<s> bool <ISA_LIT>AsmParser :: validatetSTMRegList ( const MCInst & Inst , const OperandVector & Operands , unsigned ListNo ) { const <ISA_LIT>Operand & Op = static_cast < const <ISA_LIT>Operand & > ( * Operands [ ListNo ] ) ;

bool HasWritebackToken = Op . isToken ( ) && Op . getToken ( ) == <STR_LIT> ;


<s> bool <ISA_LIT>AsmParser :: validatetSTMRegList ( const MCInst & Inst , const OperandVector & Operands , unsigned ListNo ) { const <ISA_LIT>Operand & Op = static_cast < const <ISA_LIT>Operand & > ( * Operands [ ListNo ] ) ; bool HasWritebackToken = Op . isToken ( ) && Op . getToken ( ) == <STR_LIT> ; bool ListContainsSP = listContainsReg ( Inst , ListNo , <STR_LIT> ) ; bool ListContainsPC = listContainsReg ( Inst , ListNo , <STR_LIT> ) ; if ( ListContainsSP && ListContainsPC ) return Error ( Operands [ ListNo + HasWritebackToken ] -> getStartLoc ( ) , <STR_LIT> ) ; else if ( ListContainsSP ) return Error ( Operands [ ListNo + HasWritebackToken ] -> getStartLoc ( ) , <STR_LIT> ) ; else if ( ListContainsPC ) return Error ( Operands [ ListNo + HasWritebackToken ] -> getStartLoc ( ) , <STR_LIT> ) ;


<s> return getParser ( ) . Warning ( L , Msg , Range ) ;


<s> bool Warning ( SMLoc L , const Twine & Msg , SMRange Range = None ) {

return getParser ( ) . Warning ( L , Msg , Range ) ;


<s> Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ; if ( ! Memory . OffsetRegNum ) { if ( ! Memory . OffsetImm ) Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; else if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { 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 :: createImm ( Val ) ) ;

} else Inst . addOperand ( MCOperand :: createExpr ( Memory . OffsetImm ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; if ( isImm ( ) ) { Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; Inst . addOperand ( MCOperand :: createReg ( <NUM_LIT> ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ; } Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ; if ( ! Memory . OffsetRegNum ) { if ( ! Memory . OffsetImm ) Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; else if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { 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 ) ; Inst . addOperand ( MCOperand :: createImm ( Val ) ) ; } else Inst . addOperand ( MCOperand :: createExpr ( Memory . OffsetImm ) ) ;


<s> return ; } Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; Inst . addOperand ( MCOperand :: createReg ( Memory . OffsetRegNum ) ) ; if ( ! Memory . OffsetRegNum ) { if ( ! Memory . OffsetImm ) Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; else if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { 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 ) ;

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


<s> } Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; if ( ! Memory . OffsetImm ) Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; else if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int32_t Val = CE -> getValue ( ) / <NUM_LIT> ; <STR_LIT> AddSub = Val < <NUM_LIT> ? <STR_LIT> : <STR_LIT> ;

if ( Val == std :: numeric_limits < int32_t > :: min ( ) ) Val = <NUM_LIT> ;