<s> if ( isImm ( ) ) { Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ; } 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 ) ) {


<s> Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; return ; }

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


<s> assert ( isImm ( ) && <STR_LIT> ) ; if ( ! isa < MCConstantExpr > ( getImm ( ) ) ) { Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; return ; }


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


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


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

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


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


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


<s> addExpr ( Inst , getConstantPoolImm ( ) ) ;


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


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


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


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


<s> void addFPImmOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = cast < MCConstantExpr > ( getImm ( ) ) ; int Val = <STR_LIT> ( APInt ( <NUM_LIT> , CE -> getValue ( ) ) ) ;

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


int Val = <STR_LIT> ( APInt ( <NUM_LIT> , CE -> getValue ( ) ) ) ;


<s> void addFPSRegListWithVPROperands ( MCInst & Inst , unsigned N ) const { addRegListOperands ( Inst , N ) ;


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


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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

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


<s> void addMemImm12OffsetOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; if ( isImm ( ) ) { addExpr ( Inst , getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ; } Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; addExpr ( Inst , Memory . OffsetImm ) ;


<s> if ( isImm ( ) ) { addExpr ( Inst , getImm ( ) ) ;

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


<s> if ( isImm ( ) ) { Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ;


<s> void addMemImm8s4OffsetOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; if ( isImm ( ) ) { Inst . addOperand ( MCOperand :: createExpr ( getImm ( ) ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ; } Inst . addOperand ( MCOperand :: createReg ( Memory . BaseRegNum ) ) ; addExpr ( Inst , Memory . OffsetImm ) ;


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


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

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


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


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

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


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


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


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


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


<s> void addMemThumbRIs2Operands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; 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 ) ) Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) / <NUM_LIT> ) ) ; else Inst . addOperand ( MCOperand :: createExpr ( Memory . OffsetImm ) ) ;


<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 ) ) Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) / <NUM_LIT> ) ) ;


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


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; 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 ) ) Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) / <NUM_LIT> ) ) ;


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


<s> if ( isImm ( ) ) { addExpr ( Inst , getImm ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return ;


<s> const MCConstantExpr * CE = cast < MCConstantExpr > ( getImm ( ) ) ; uint32_t Enc = <STR_LIT> ( - CE -> getValue ( ) ) ;

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


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


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


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


<s> const MCRegisterClass * RC_out = ( VectorList . Count == <NUM_LIT> ) ? & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] : & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] ; unsigned I , E = RC_out -> getNumRegs ( ) ; for ( I = <NUM_LIT> ; I < E ; I ++ ) if ( RC_in -> getRegister ( I ) == VectorList . RegNum ) break ; assert ( I < E && <STR_LIT> ) ;

Inst . addOperand ( MCOperand :: createReg ( RC_out -> getRegister ( I ) ) ) ;


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


<s> Value = <STR_LIT> ( ~ Value & <NUM_LIT> ) ; Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


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

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


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


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

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


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


<s> unsigned Value = CE -> getValue ( ) ; Value = <STR_LIT> ( Value ) ; Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


unsigned Value = encodeNeonVMOVImmediate ( ~ CE -> getValue ( ) ) ;


<s> unsigned Value = encodeNeonVMOVImmediate ( ~ CE -> getValue ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


<s> unsigned Value = encodeNeonVMOVImmediate ( CE -> getValue ( ) ) ; Inst . addOperand ( MCOperand :: createImm ( Value ) ) ;


<s> for ( unsigned i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i , Value >>= <NUM_LIT> ) {


<s> const MCConstantExpr * CE = cast < MCConstantExpr > ( getImm ( ) ) ; uint64_t Value = CE -> getValue ( ) ; unsigned Imm = <NUM_LIT> ; for ( unsigned i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i , Value >>= <NUM_LIT> ) { Imm |= ( Value & <NUM_LIT> ) << i ;


<s> assert ( ( Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> ) && <STR_LIT> <STR_LIT> ) ; unsigned Value = CE -> getValue ( ) ; if ( Inv ) Value = ~ Value ; unsigned B = Value & <NUM_LIT> ; B |= <NUM_LIT> ;

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


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


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

addNEONi8ReplicateOperands ( Inst , true ) ;


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


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


<s> void addNEONvmovi32ReplicateOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCConstantExpr * CE = cast < MCConstantExpr > ( getImm ( ) ) ; assert ( ( Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> || Inst . getOpcode ( ) == <STR_LIT> ) && <STR_LIT> <STR_LIT> ) ;


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


addNEONi8ReplicateOperands ( Inst , false ) ;


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


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


<s> for ( unsigned Reg : RegList ) Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ;


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; const SmallVectorImpl < unsigned > & RegList = getRegList ( ) ;

for ( unsigned Reg : RegList ) Inst . addOperand ( MCOperand :: createReg ( Reg ) ) ;


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


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


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

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


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


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


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


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

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


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


<s> void addUnsignedOffset_b8s2Operands ( MCInst & Inst , unsigned N ) const { if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ) { Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) >> <NUM_LIT> ) ) ; return ; } const MCSymbolRefExpr * SR = cast < MCSymbolRefExpr > ( Imm . Val ) ; Inst . addOperand ( MCOperand :: createExpr ( SR ) ) ;


<s> unsigned RegNum = getVPTPred ( ) == <STR_LIT> ? <NUM_LIT> : <STR_LIT> ;

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


<s> int TiedOp = MCID . getOperandConstraint ( NextOpIndex , MCOI :: TIED_TO ) ; assert ( TiedOp >= <NUM_LIT> && <STR_LIT> ) ; RegNum = Inst . getOperand ( TiedOp ) . getReg ( ) ; }


<s> assert ( N == <NUM_LIT> && <STR_LIT> ) ; addVPTPredNOperands ( Inst , N - <NUM_LIT> ) ; unsigned RegNum ; if ( getVPTPred ( ) == <STR_LIT> ) { RegNum = <NUM_LIT> ; } else {

unsigned NextOpIndex = Inst . getNumOperands ( ) ;


<s> MCAsmParserExtension :: Initialize ( Parser ) ; MRI = getContext ( ) . getRegisterInfo ( ) ; setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; if ( AddBuildAttributes ) getTargetStreamer ( ) . emitTargetAttributes ( STI ) ; ITState . CurPosition = ~ <NUM_LIT> ; VPTState . CurPosition = ~ <NUM_LIT> ;


<s> CDE . insert ( Mnemonic ) ; CDEWithVPTSuffix . insert ( Mnemonic ) ; CDEWithVPTSuffix . insert ( std :: string ( Mnemonic ) + <STR_LIT> ) ;


<s> <ISA_LIT>Operand ( KindTy K ) : Kind ( K ) {


<s> break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; } const MCParsedAsmOperand & Op3 = * Operands [ <NUM_LIT> + NumPredOps ] ; if ( ! Op3 . isReg ( ) || Op3 . getReg ( ) != RNext ) return Error ( Op3 . getStartLoc ( ) , <STR_LIT> ) ; Operands . erase ( Operands . begin ( ) + <NUM_LIT> + NumPredOps ) ;

Operands [ <NUM_LIT> + NumPredOps ] = <ISA_LIT>Operand :: CreateReg ( RPair , Op2 . getStartLoc ( ) , Op2 . getEndLoc ( ) ) ;


<s> case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; case <STR_LIT> : RNext = <STR_LIT> ; RPair = <STR_LIT> ; break ; } const MCParsedAsmOperand & Op3 = * Operands [ <NUM_LIT> + NumPredOps ] ; if ( ! Op3 . isReg ( ) || Op3 . getReg ( ) != RNext ) return Error ( Op3 . getStartLoc ( ) , <STR_LIT> ) ;

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


<s> static void checkNeonReplicateArgs ( unsigned FromW , unsigned ToW ) { assert ( ( FromW == <NUM_LIT> || FromW == <NUM_LIT> || FromW == <NUM_LIT> ) && <STR_LIT> ) ;

assert ( ( ToW == <NUM_LIT> || ToW == <NUM_LIT> || ToW == <NUM_LIT> ) && <STR_LIT> ) ;


<s> unsigned OpNo ; for ( OpNo = <NUM_LIT> ; ! MCID . OpInfo [ OpNo ] . isOptionalDef ( ) && OpNo < MCID . NumOperands ; ++ OpNo ) ; if ( isThumbOne ( ) && Inst . getOperand ( OpNo ) . getReg ( ) != <STR_LIT> ) return Match_RequiresFlagSetting ; if ( isThumbTwo ( ) && Inst . getOperand ( OpNo ) . getReg ( ) != <STR_LIT> && ! inITBlock ( ) ) return Match_RequiresITBlock ; if ( isThumbTwo ( ) && Inst . getOperand ( OpNo ) . getReg ( ) == <STR_LIT> && inITBlock ( ) ) return Match_RequiresNotITBlock ; if ( Opc == <STR_LIT> && Inst . getOperand ( <NUM_LIT> ) . getImm ( ) == <NUM_LIT> && inITBlock ( ) ) return Match_RequiresNotITBlock ; } else if ( isThumbOne ( ) ) { 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 ; } switch ( Inst . getOpcode ( ) ) {


<s> Op -> BankedReg . Val = Reg ; Op -> StartLoc = S ; Op -> EndLoc = S ; return Op ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateBankedReg ( unsigned Reg , SMLoc S ) {

auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_BankedReg ) ;


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


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


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


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateCondCode ( <STR_LIT> CC , SMLoc S ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_CondCode ) ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateCondCode ( <STR_LIT> CC , SMLoc S ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_CondCode ) ; Op -> CC . Val = CC ;


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


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateConstantPoolImm ( const MCExpr * Val , SMLoc S , SMLoc E ) { auto Op = std :: 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 > CreateCoprocNum ( unsigned CopVal , SMLoc S ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_CoprocNum ) ; Op -> Cop . Val = CopVal ; Op -> StartLoc = S ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateCoprocNum ( unsigned CopVal , SMLoc S ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_CoprocNum ) ; Op -> Cop . Val = CopVal ; Op -> StartLoc = S ; Op -> EndLoc = S ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateCoprocOption ( unsigned Val , SMLoc S , SMLoc E ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_CoprocOption ) ; Op -> Cop . Val = Val ; Op -> StartLoc = S ; Op -> EndLoc = E ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateCoprocReg ( unsigned CopVal , SMLoc S ) {

auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_CoprocReg ) ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateImm ( const MCExpr * Val , SMLoc S , SMLoc E ) {

auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_Immediate ) ;


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


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


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_ITCondMask ) ; Op -> ITMask . Mask = Mask ; Op -> StartLoc = S ; Op -> EndLoc = S ;


<s> Op -> Memory . ShiftImm = ShiftImm ; Op -> Memory . Alignment = Alignment ; Op -> Memory . isNegative = isNegative ; Op -> StartLoc = S ; Op -> EndLoc = E ; Op -> AlignmentLoc = AlignmentLoc ;


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_ModifiedImmediate ) ; Op -> ModImm . Bits = Bits ; Op -> ModImm . Rot = Rot ; Op -> StartLoc = S ; Op -> EndLoc = E ; return Op ;


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


<s> Op -> PostIdxReg . ShiftTy = ShiftTy ; Op -> PostIdxReg . ShiftImm = ShiftImm ; Op -> StartLoc = S ; Op -> EndLoc = E ; return Op ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateProcIFlags ( <STR_LIT> IFlags , SMLoc S ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_ProcIFlags ) ; Op -> IFlags . Val = IFlags ; Op -> StartLoc = S ; Op -> EndLoc = S ;


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_ProcIFlags ) ;


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_Register ) ;


<s> Op -> Reg . RegNum = RegNum ; Op -> StartLoc = S ;


<s> if ( Kind == k_RegisterList && Regs . back ( ) . second == <STR_LIT> ) Kind = k_RegisterListWithAPSR ; assert ( llvm :: is_sorted ( Regs ) && <STR_LIT> ) ; auto Op = std :: make_unique < <ISA_LIT>Operand > ( Kind ) ; for ( const auto & P : Regs ) Op -> Registers . push_back ( P . second ) ; Op -> StartLoc = StartLoc ;


<s> else Kind = k_SPRRegisterList ; } if ( Kind == k_RegisterList && Regs . back ( ) . second == <STR_LIT> ) Kind = k_RegisterListWithAPSR ; assert ( llvm :: is_sorted ( Regs ) && <STR_LIT> ) ; auto Op = std :: make_unique < <ISA_LIT>Operand > ( Kind ) ; for ( const auto & P : Regs ) Op -> Registers . push_back ( P . second ) ; Op -> StartLoc = StartLoc ; Op -> EndLoc = EndLoc ;


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


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


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

Op -> RegShiftedImm . ShiftImm = ShiftImm ;


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


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


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


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_ShifterImmediate ) ; Op -> ShifterImm . isASR = isASR ;


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


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateTraceSyncBarrierOpt ( <STR_LIT> Opt , SMLoc S ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_TraceSyncBarrierOpt ) ; Op -> TSBOpt . Val = Opt ;


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_VectorIndex ) ; Op -> VectorIndex . Val = Idx ; Op -> StartLoc = S ; Op -> EndLoc = E ; return Op ;


<s> static std :: unique_ptr < <ISA_LIT>Operand > CreateVectorList ( unsigned RegNum , unsigned Count , bool isDoubleSpaced , SMLoc S , SMLoc E ) { auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_VectorList ) ; Op -> VectorList . RegNum = RegNum ; Op -> VectorList . Count = Count ; Op -> VectorList . isDoubleSpaced = isDoubleSpaced ; Op -> StartLoc = S ;


<s> auto Op = std :: make_unique < <ISA_LIT>Operand > ( k_VectorListAllLanes ) ; Op -> VectorList . RegNum = RegNum ; Op -> VectorList . Count = Count ; Op -> VectorList . isDoubleSpaced = isDoubleSpaced ;


<s> Op -> VectorList . RegNum = RegNum ; Op -> VectorList . Count = Count ; Op -> VectorList . LaneIndex = Index ; Op -> VectorList . isDoubleSpaced = isDoubleSpaced ;


<s> Op -> VCC . Val = CC ; Op -> StartLoc = S ;


<s> flushPendingInstructions ( getStreamer ( ) ) ;


<s> void emitFnStartLocNotes ( ) const {

for ( const SMLoc & Loc : FnStartLocs ) Parser . Note ( Loc , <STR_LIT> ) ;


<s> void emitHandlerDataLocNotes ( ) const {

for ( const SMLoc & Loc : HandlerDataLocs ) Parser . Note ( Loc , <STR_LIT> ) ;


<s> static const struct { const uint64_t Kind ; const FeatureBitset ArchCheck ; const FeatureBitset Features ; } Extensions [ ] = { { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> , <STR_LIT> } } , { ( <STR_LIT> | <STR_LIT> ) , { Feature_HasV7Bit , Feature_IsNotMClassBit } , { <STR_LIT> , <STR_LIT> } } , { <STR_LIT> , { Feature_HasV7Bit , Feature_IsNotMClassBit } , { <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> , <STR_LIT> , <STR_LIT> } } , { <STR_LIT> , { Feature_HasV6KBit } , { <STR_LIT> } } , { <STR_LIT> , { Feature_HasV7Bit } , { <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8_2aBit } , { <STR_LIT> , <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8Bit } , { <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8_1MMainlineBit } , { <STR_LIT> } } , { <STR_LIT> , { Feature_HasV8_1MMainlineBit } , { <STR_LIT> } } , { <STR_LIT> , { } , { } } , { <STR_LIT> , { } , { } } , { <STR_LIT> , { } , { } } , { <STR_LIT> , { } , { } } , { <STR_LIT> , { } , { } } , } ; bool EnableFeature = true ; if ( Name . startswith_insensitive ( <STR_LIT> ) ) { EnableFeature = false ;


<s> static unsigned encodeNeonVMOVImmediate ( unsigned Value ) { if ( Value >= <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ; else if ( Value > <NUM_LIT> && Value <= <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | ( ( Value & <NUM_LIT> ) ? <NUM_LIT> : <NUM_LIT> ) ; else if ( Value > <NUM_LIT> ) Value = ( Value >> <NUM_LIT> ) | <NUM_LIT> ; return Value ;


<s> NewMask |= ITState . Mask & ( <NUM_LIT> << TZ ) ; NewMask |= ( Cond != ITState . Cond ) << TZ ; NewMask |= <NUM_LIT> << ( TZ - <NUM_LIT> ) ;


<s> unsigned TZ = countTrailingZeros ( ITState . Mask ) ; unsigned NewMask = <NUM_LIT> ; NewMask |= ITState . Mask & ( <NUM_LIT> << TZ ) ; NewMask |= ( Cond != ITState . Cond ) << TZ ; NewMask |= <NUM_LIT> << ( TZ - <NUM_LIT> ) ;


<s> return ( Mask >> ( <NUM_LIT> - Position ) & <NUM_LIT> ) ;


<s>
case
NearMissInfo
::
NearMissFeature
:
{
const
FeatureBitset
&
MissingFeatures
=
I
.
getFeatures
(
)
;
if
(
FeatureMissesSeen
.
count
(
MissingFeatures
)
)
break
;
FeatureMissesSeen
.
insert
(
MissingFeatures
)
;
if
(
MissingFeatures
.
test
(
Feature_Is<ISA_LIT>Bit
)
&&
!
has<ISA_LIT>
(
)
)
break
;
if
(
isThumb
(
)
&&
MissingFeatures
.
test
(
Feature_Is<ISA_LIT>Bit
)
&&
MissingFeatures
.
count
(
)
>
<NUM_LIT>
)
break
;
if
(
!
isThumb
(
)
&&
MissingFeatures
.
test
(
Feature_IsThumbBit
)
&&
MissingFeatures
.
count
(
)
>
<NUM_LIT>
)
break
;
if
(
!
isThumb
(
)
&&
MissingFeatures
.
test
(
Feature_IsThumb2Bit
)
&&
(
MissingFeatures
&
~
FeatureBitset
(
{
Feature_IsThumb2Bit
,
Feature_IsThumbBit
}
)
)
.
any
(
)
)
break
;
if
(
isMClass
(
)
&&
MissingFeatures
.
test
(
Feature_HasNEONBit
)
)
break
;
NearMissMessage
Message
;
Message
.
Loc
=
IDLoc
;
raw_svector_ostream
OS
(
Message
.
Message
)
;
OS
<<
<STR_LIT>
;
for
(
unsigned
i
=
<NUM_LIT>
,
e
=
MissingFeatures
.
size
(
)
;
i
!=
e
;
++
i
)
if
(
MissingFeatures
.
test
(
i
)
)
OS
<<
' '
<<
getSubtargetFeatureName
(
i
)
;
NearMissesOut
.
emplace_back
(
Message
)
;
break
;
}
case
NearMissInfo
::
NearMissPredicate
:
{
NearMissMessage
Message
;
Message
.
Loc
=
IDLoc
;
switch
(
I
.
getPredicateError
(
)
)
{
case
Match_RequiresNotITBlock
:
Message
.
Message
=
<STR_LIT>
;
break
;
case
Match_RequiresITBlock
:
Message
.
Message
=
<STR_LIT>
;
break
;
case
Match_RequiresV6
:
Message
.
Message
=
<STR_LIT>
;
break
;
case
Match_RequiresThumb2
:


<s> if ( <STR_LIT> ( MCID . OpInfo [ i ] . OperandType ) ) return i ;


<s> 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> } if ( Op2 . getReg ( ) == <STR_LIT> ) return ; unsigned PairedReg = GPR . getRegister ( RtEncoding + <NUM_LIT> ) ; if ( ! PairedReg || PairedReg == <STR_LIT> || ( PairedReg == <STR_LIT> && ! hasV8Ops ( ) ) ) return ;

Operands . insert ( Operands . begin ( ) + <NUM_LIT> , <ISA_LIT>Operand :: CreateReg ( PairedReg , Op2 . getStartLoc ( ) , Op2 . getEndLoc ( ) ) ) ;


<s> for ( const MCInst & Inst : PendingConditionalInsts ) { Out . emitInstruction ( Inst , getSTI ( ) ) ; } PendingConditionalInsts . clear ( ) ; ITState . Mask = <NUM_LIT> ;


<s> if ( ! inVPTBlock ( ) ) return ; unsigned TZ = countTrailingZeros ( VPTState . Mask ) ;

if ( ++ VPTState . CurPosition == <NUM_LIT> - TZ ) VPTState . CurPosition = ~ <NUM_LIT> ;


<s> const SmallVectorImpl < unsigned > & getRegList ( ) const { assert ( ( Kind == k_RegisterList || Kind == k_RegisterListWithAPSR || Kind == k_DPRRegisterList || Kind == k_SPRRegisterList || Kind == k_FPSRegisterListWithVPR || Kind == k_FPDRegisterListWithVPR ) && <STR_LIT> ) ;


<s> assert ( Kind == k_TraceSyncBarrierOpt && <STR_LIT> ) ; return TSBOpt . Val ;


<s> assert ( isVPTPred ( ) && <STR_LIT> ) ;


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


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


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


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


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


<s> static bool insertNoDuplicates ( SmallVectorImpl < std :: pair < unsigned , unsigned >> & Regs , unsigned Enc , unsigned Reg ) { Regs . emplace_back ( Enc , Reg ) ; for ( auto I = Regs . rbegin ( ) , J = I + <NUM_LIT> , E = Regs . rend ( ) ; J != E ; ++ I , ++ J ) { if ( J -> first == Enc ) { Regs . erase ( J . base ( ) ) ;


<s> bool inVPTBlock ( ) { return VPTState . CurPosition != ~ <NUM_LIT> ;


<s> if ( Memory . OffsetRegNum ) return true ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return Val > - <NUM_LIT> && Val < <NUM_LIT> ; }


<s> if ( ! isGPRMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . ShiftType != <STR_LIT> ) return false ; if ( Memory . OffsetRegNum ) return true ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) {


<s> if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> 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 ( ! isGPRMem ( ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . OffsetRegNum ) return false ;

if ( ! Memory . OffsetImm ) return true ;


<s> if ( Memory . OffsetRegNum ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ;

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


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


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


<s> bool isCDEDualRegInstr ( StringRef Mnemonic ) { if ( ! Mnemonic . startswith ( <STR_LIT> ) ) return false ;

return Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ;


<s> bool isCDEInstr ( StringRef Mnemonic ) { if ( ! Mnemonic . startswith ( <STR_LIT> ) && ! Mnemonic . startswith ( <STR_LIT> ) ) return false ; return CDE . count ( Mnemonic ) ;


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


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

return isExpImmValue < shift > ( CE -> getValue ( ) ) ;


<s> if ( ( Value & mask ) != <NUM_LIT> || ( Value >> shift ) > <NUM_LIT> ) return false ;


<s> bool isFPDRegListWithVPR ( ) const { return Kind == k_FPDRegisterListWithVPR ;


<s> bool isFPSRegListWithVPR ( ) const { return Kind == k_FPSRegisterListWithVPR ;


<s> if ( Memory . BaseRegNum && ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;

if ( Memory . OffsetRegNum && ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . OffsetRegNum ) ) return false ;


<s> if ( ( CE -> getValue ( ) >> <NUM_LIT> ) > <NUM_LIT> ) return false ; uint32_t Value = - static_cast < uint32_t > ( CE -> getValue ( ) ) ; return Value > <NUM_LIT> && Value < <NUM_LIT> ;


<s> bool isImm0_4095Neg ( ) const { if ( ! isImm ( ) ) return false ;

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


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


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


<s> bool isImm7s4 ( ) const { return isImmediateS4 < - <NUM_LIT> , <NUM_LIT> > ( ) ;


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


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


<s> return isImmediateS2 < - <NUM_LIT> , <NUM_LIT> > ( ) ;


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


<s> uint64_t OriginalValue = CE -> getValue ( ) ;

uint64_t InvertedValue = OriginalValue ^ ( ( ( uint64_t ) <NUM_LIT> << size ) - <NUM_LIT> ) ;


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


<s> bool <ISA_LIT>AsmParser :: isITBlockTerminator ( MCInst & Inst ) const { const MCInstrDesc & MCID = MII . get ( Inst . getOpcode ( ) ) ;

if ( MCID . isTerminator ( ) || ( MCID . isCall ( ) && Inst . getOpcode ( ) != <STR_LIT> ) || MCID . isReturn ( ) || MCID . isBranch ( ) || MCID . isIndirectBranch ( ) ) return true ;


<s> <STR_LIT> CC = getCondCode ( ) ; return CC != <STR_LIT> ;


<s> if ( ! isITCondCode ( ) ) return false ; <STR_LIT> CC = getCondCode ( ) ; return CC != <STR_LIT> ;


<s> if ( ! isITCondCode ( ) ) return false ; <STR_LIT> CC = getCondCode ( ) ;

return CC == <STR_LIT> || CC == <STR_LIT> || CC == <STR_LIT> || CC == <STR_LIT> || CC == <STR_LIT> || CC == <STR_LIT> ;


<s> bool isITCondCodeRestrictedFP ( ) const { if ( ! isITCondCode ( ) ) return false ; <STR_LIT> CC = getCondCode ( ) ;


return CC == <STR_LIT> || CC == <STR_LIT> ;


<s> return CC == <STR_LIT> || CC == <STR_LIT> || CC == <STR_LIT> || CC == <STR_LIT> ;


<s> <STR_LIT> CC = getCondCode ( ) ; return CC == <STR_LIT> || CC == <STR_LIT> ;


<s> bool isITPredicableCDEInstr ( StringRef Mnemonic ) { if ( ! Mnemonic . startswith ( <STR_LIT> ) ) return false ; return Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) ;


<s> if ( isa < MCSymbolRefExpr > ( Imm . Val ) ) return true ; if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Imm . Val ) ) { int64_t Val = CE -> getValue ( ) ; return Val < <NUM_LIT> && Val >= - <NUM_LIT> && ( Val & <NUM_LIT> ) == <NUM_LIT> ; } return false ;


<s> bool isMemImm0_1020s4Offset ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) {


<s> bool isMemImm0_1020s4Offset ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return Val >= <NUM_LIT> && Val <= <NUM_LIT> && ( Val & <NUM_LIT> ) == <NUM_LIT> ; } return false ;


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


<s> if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) || ( Val == std :: numeric_limits < int32_t > :: min ( ) ) ;


<s> if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> || ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ;

return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> && ( Val & <NUM_LIT> ) == <NUM_LIT> ) || Val == INT32_MIN ;


<s> bool isMemImm7s4Offset ( ) const { if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> || ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> && ( Val & <NUM_LIT> ) == <NUM_LIT> ) || Val == INT32_MIN ;


<s> bool isMemImm7ShiftedOffset ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> || ! <ISA_LIT>MCRegisterClasses [ RegClassID ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) {


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


<s> if ( Memory . BaseRegNum == <STR_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return ( Val == std :: numeric_limits < int32_t > :: min ( ) ) || ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) ; }


<s> if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ;

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


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

if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) {


<s> if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . BaseRegNum == <STR_LIT> ) return false ; if ( ! Memory . OffsetImm ) return false ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ;

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


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


<s> if ( ! isGPRMem ( ) ) return false ;

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


<s> if ( ! isGPRMem ( ) ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;


<s> bool isMemNoOffsetT ( bool alignOK = false , unsigned Alignment = <NUM_LIT> ) const { if ( ! isGPRMem ( ) ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;


<s> bool isMemNoOffsetT2 ( bool alignOK = false , unsigned Alignment = <NUM_LIT> ) const { if ( ! isGPRMem ( ) ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;


<s> if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;


<s> bool isMemNoOffsetT2NoSp ( bool alignOK = false , unsigned Alignment = <NUM_LIT> ) const { if ( ! isGPRMem ( ) ) return false ;

if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;


<s> bool isMemNoOffsetT2NoSp ( bool alignOK = false , unsigned Alignment = <NUM_LIT> ) const { if ( ! isGPRMem ( ) ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ; return Memory . OffsetRegNum == <NUM_LIT> && Memory . OffsetImm == nullptr && ( alignOK || Memory . Alignment == Alignment ) ;


<s> bool isMemPCRelImm12 ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . BaseRegNum != <STR_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) {


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


<s> if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return Val >= <NUM_LIT> && Val < <NUM_LIT> ; }


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


<s> if ( ( Val & ( ( <NUM_LIT> << shift ) - <NUM_LIT> ) ) != <NUM_LIT> ) return false ; int64_t Range = ( <NUM_LIT> << ( <NUM_LIT> + shift ) ) - <NUM_LIT> ; return ( Val == INT32_MIN ) || ( Val > - Range && Val < Range ) ; } return false ;


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


<s> if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . OffsetRegNum ) ) return false ; if ( shift == <NUM_LIT> && Memory . ShiftType != <STR_LIT> ) return false ; if ( shift > <NUM_LIT> && ( Memory . ShiftType != <STR_LIT> || Memory . ShiftImm != shift ) ) return false ;


<s> if ( ! isGPRMem ( ) || ! Memory . OffsetRegNum || Memory . isNegative || Memory . ShiftType != <STR_LIT> || Memory . ShiftImm != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; return true ;


<s> bool isMemThumbRIs2 ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || ! is<ISA_LIT>LowRegister ( Memory . BaseRegNum ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return Val >= <NUM_LIT> && Val <= <NUM_LIT> && ( Val % <NUM_LIT> ) == <NUM_LIT> ;


<s> if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || ! is<ISA_LIT>LowRegister ( Memory . BaseRegNum ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ;


<s> if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return Val >= <NUM_LIT> && Val <= <NUM_LIT> && ( Val % <NUM_LIT> ) == <NUM_LIT> ;


<s> if ( ! isGPRMem ( ) || ! Memory . OffsetRegNum || Memory . isNegative || Memory . ShiftType != <STR_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; return is<ISA_LIT>LowRegister ( Memory . BaseRegNum ) && ( ! Memory . OffsetRegNum || is<ISA_LIT>LowRegister ( Memory . OffsetRegNum ) ) ;


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


<s> if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . BaseRegNum != <STR_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return Val >= <NUM_LIT> && Val <= <NUM_LIT> && ( Val % <NUM_LIT> ) == <NUM_LIT> ;


if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ;


<s> if ( ! Memory . OffsetImm ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) { int64_t Val = CE -> getValue ( ) ; return ( Val >= <NUM_LIT> && Val < <NUM_LIT> ) ; }


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


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


<s> if ( Memory . OffsetRegNum && ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . OffsetRegNum ) ) return false ;


<s> if ( Kind != k_Memory ) return false ; if ( Memory . BaseRegNum && ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) && ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ;


<s> return VectorIndex . Val == PermittedValue || VectorIndex . Val == OtherPermittedValue ;


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


<s> bool isNEONByteReplicate ( unsigned NumBytes ) const { return isNEONReplicate ( <NUM_LIT> , NumBytes , false ) ;


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


<s> if ( ! CE ) return false ; return isValidNEONi32vmovImm ( ~ CE -> getValue ( ) ) ;


<s> return isNEONReplicate ( FromW , ToW / FromW , true ) ;


<s> checkNeonReplicateArgs ( FromW , ToW ) ;

if ( ToW == <NUM_LIT> && isNEONi64splat ( ) ) return false ;


return isPostIdxRegShifted ( ) && PostIdxReg . ShiftTy == <STR_LIT> ;


<s> bool isPostIdxRegShifted ( ) const { return Kind == k_PostIndexRegister && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( PostIdxReg . RegNum ) ;


<s> return Kind == k_PostIndexRegister && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( PostIdxReg . RegNum ) ;


<s> bool isRegListWithAPSR ( ) const { return Kind == k_RegisterListWithAPSR || Kind == k_RegisterList ;


<s> return Kind == k_ShiftedImmediate && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( RegShiftedImm . SrcReg ) ;


<s> return Kind == k_ShiftedRegister && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( RegShiftedReg . SrcReg ) && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( RegShiftedReg . ShiftReg ) ;


<s> if ( ! isGPRMem ( ) || ! Memory . OffsetRegNum || Memory . isNegative || Memory . Alignment != <NUM_LIT> || Memory . BaseRegNum == <STR_LIT> ) return false ; if ( Memory . ShiftType == <STR_LIT> ) return true ; if ( Memory . ShiftType != <STR_LIT> || Memory . ShiftImm > <NUM_LIT> ) return false ; return true ;


<s> const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Imm . Val ) ; if ( ! CE ) return false ; Val = CE -> getValue ( ) ; } else if ( isGPRMem ( ) ) { if ( ! Memory . OffsetImm || Memory . OffsetRegNum ) return false ; if ( Memory . BaseRegNum != <STR_LIT> ) return false ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Memory . OffsetImm ) ) Val = CE -> getValue ( ) ; else return false ; }


<s> return Kind == k_TraceSyncBarrierOpt ;


<s> static bool isValidNEONi32vmovImm ( int64_t Value ) {

return ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) ;


<s> return ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) || ( ( Value & <NUM_LIT> ) == <NUM_LIT> ) ;


<s> bool isVecListFourMQ ( ) const { return isSingleSpacedVectorList ( ) && VectorList . Count == <NUM_LIT> && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( VectorList . RegNum ) ;


return isSingleSpacedVectorList ( ) && VectorList . Count == <NUM_LIT> && <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( VectorList . RegNum ) ;


return isVectorIndexInRange < <NUM_LIT> > ( ) ;


<s> return isVectorIndexInRange < <NUM_LIT> > ( ) ;


<s> bool isVectorIndex64 ( ) const { return isVectorIndexInRange < <NUM_LIT> > ( ) ;


<s> if ( Kind != k_VectorIndex ) return false ; return VectorIndex . Val < NumLanes ;


<s> return findFirstVectorPredOperandIdx ( MCID ) != - <NUM_LIT> ;


<s> static bool isVectorPredicable ( const MCInstrDesc & MCID ) { return findFirstVectorPredOperandIdx ( MCID ) != - <NUM_LIT> ;


<s> bool isVPTPredicableCDEInstr ( StringRef Mnemonic ) {

if ( ! Mnemonic . startswith ( <STR_LIT> ) ) return false ;


<s> RegisterMCAsmParser < <ISA_LIT>AsmParser > X ( getThe<ISA_LIT>LETarget ( ) ) ; RegisterMCAsmParser < <ISA_LIT>AsmParser > Y ( getThe<ISA_LIT>BETarget ( ) ) ; RegisterMCAsmParser < <ISA_LIT>AsmParser > A ( getTheThumbLETarget ( ) ) ;

RegisterMCAsmParser < <ISA_LIT>AsmParser > B ( getTheThumbBETarget ( ) ) ;


<s> forwardITPosition ( ) ; forwardVPTPosition ( ) ; return true ; } { while ( processInstruction ( Inst , Operands , Out ) ) LLVM_DEBUG ( dbgs ( ) << <STR_LIT> ; Inst . dump_pretty ( dbgs ( ) , MII . getName ( Inst . getOpcode ( ) ) ) ; dbgs ( ) << <STR_LIT> ) ; } forwardITPosition ( ) ; forwardVPTPosition ( ) ; if ( Inst . getOpcode ( ) == <STR_LIT> ) return false ; Inst . setLoc ( IDLoc ) ; if ( PendConditionalInstruction ) { PendingConditionalInsts . push_back ( Inst ) ;

if ( isITBlockFull ( ) || isITBlockTerminator ( Inst ) ) flushPendingInstructions ( Out ) ;


<s> unsigned MatchResult ; bool PendConditionalInstruction = false ; SmallVector < NearMissInfo , <NUM_LIT> > NearMisses ; MatchResult = MatchInstruction ( Operands , Inst , NearMisses , MatchingInlineAsm , PendConditionalInstruction , Out ) ; switch ( MatchResult ) { case Match_Success : LLVM_DEBUG ( dbgs ( ) << <STR_LIT> ; Inst . dump_pretty ( dbgs ( ) , MII . getName ( Inst . getOpcode ( ) ) ) ; dbgs ( ) << <STR_LIT> ) ; if ( validateInstruction ( Inst , Operands ) ) { forwardITPosition ( ) ; forwardVPTPosition ( ) ; return true ; } { while ( processInstruction ( Inst , Operands , Out ) ) LLVM_DEBUG ( dbgs ( ) << <STR_LIT> ; Inst . dump_pretty ( dbgs ( ) , MII . getName ( Inst . getOpcode ( ) ) ) ; dbgs ( ) << <STR_LIT> ) ; } forwardITPosition ( ) ; forwardVPTPosition ( ) ; if ( Inst . getOpcode ( ) == <STR_LIT> ) return false ; Inst . setLoc ( IDLoc ) ; if ( PendConditionalInstruction ) { PendingConditionalInsts . push_back ( Inst ) ;


<s> void <ISA_LIT>AsmParser :: onLabelParsed ( MCSymbol * Symbol ) { if ( NextSymbolIsThumb ) {

getParser ( ) . getStreamer ( ) . emitThumbFunc ( Symbol ) ;


<s> getParser ( ) . getStreamer ( ) . emitThumbFunc ( Symbol ) ; NextSymbolIsThumb = false ;


<s> OperandMatchResultTy <ISA_LIT>AsmParser :: parseCoprocNumOperand ( OperandVector & Operands ) { MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; if ( Tok . isNot ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ; int Num = MatchCoprocessorOperandName ( Tok . getString ( ) . lower ( ) , 'p' ) ; if ( Num == - <NUM_LIT> ) return MatchOperand_NoMatch ; if ( ! isValidCoprocessorNumber ( Num , getSTI ( ) . getFeatureBits ( ) ) ) return MatchOperand_NoMatch ; Parser . Lex ( ) ;

Operands . push_back ( <ISA_LIT>Operand :: CreateCoprocNum ( Num , S ) ) ;


<s> MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ;

if ( Tok . isNot ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ;


<s> int Reg = MatchCoprocessorOperandName ( Tok . getString ( ) . lower ( ) , 'c' ) ; if ( Reg == - <NUM_LIT> ) return MatchOperand_NoMatch ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateCoprocReg ( Reg , S ) ) ; return MatchOperand_Success ;


<s> else if ( ! IsMachO && ! IsCOFF ) { if ( IDVal == <STR_LIT> ) parseDirectiveArch ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveCPU ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveEabiAttr ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveFPU ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveFnStart ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveObjectArch ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveTLSDescSeq ( DirectiveID . getLoc ( ) ) ; else return true ; } else if ( IsCOFF ) { if ( IDVal == <STR_LIT> ) parseDirectiveSEHAllocStack ( DirectiveID . getLoc ( ) , false ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHAllocStack ( DirectiveID . getLoc ( ) , true ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHSaveRegs ( DirectiveID . getLoc ( ) , false ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHSaveRegs ( DirectiveID . getLoc ( ) , true ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHSaveSP ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHSaveFRegs ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHSaveLR ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHPrologEnd ( DirectiveID . getLoc ( ) , false ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHPrologEnd ( DirectiveID . getLoc ( ) , true ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHNop ( DirectiveID . getLoc ( ) , false ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHNop ( DirectiveID . getLoc ( ) , true ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHEpilogStart ( DirectiveID . getLoc ( ) , false ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHEpilogStart ( DirectiveID . getLoc ( ) , true ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHEpilogEnd ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveSEHCustom ( DirectiveID . getLoc ( ) ) ; else return true ;


<s> assert ( Section && <STR_LIT> ) ; if ( Section -> useCodeAlign ( ) ) getStreamer ( ) . emitCodeAlignment ( <NUM_LIT> , & getSTI ( ) , <NUM_LIT> ) ;

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


if ( Section -> useCodeAlign ( ) ) getStreamer ( ) . emitCodeAlignment ( <NUM_LIT> , & getSTI ( ) , <NUM_LIT> ) ;


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


<s> if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( Name == <STR_LIT> ) { enableArchExtFeature ( <STR_LIT> , ExtLoc ) ; enableArchExtFeature ( <STR_LIT> , ExtLoc ) ; } if ( enableArchExtFeature ( Name , ExtLoc ) ) return false ;

return Error ( ExtLoc , <STR_LIT> + Name ) ;


<s> if ( Name == <STR_LIT> ) { enableArchExtFeature ( <STR_LIT> , ExtLoc ) ; enableArchExtFeature ( <STR_LIT> , ExtLoc ) ; } if ( enableArchExtFeature ( Name , ExtLoc ) ) return false ; return Error ( ExtLoc , <STR_LIT> + Name ) ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveCode ( SMLoc L ) { MCAsmParser & Parser = getParser ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; if ( Tok . isNot ( AsmToken :: Integer ) ) return Error ( L , <STR_LIT> ) ; int64_t Val = Parser . getTok ( ) . getIntVal ( ) ; 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> MCSubtargetInfo & STI = copySTI ( ) ; STI . setDefaultFeatures ( CPU , CPU , <STR_LIT> ) ; setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ;

FixModeAfterArchChange ( WasThumb , L ) ;


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


<s> Optional < unsigned > Ret = ELFAttrs :: attrTypeFromString ( Name , <STR_LIT> ( ) ) ; if ( ! Ret . hasValue ( ) ) { Error ( TagLoc , <STR_LIT> + Name ) ; return false ; } Tag = Ret . getValue ( ) ; 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 ; } if ( IsStringValue ) { if ( Parser . getTok ( ) . isNot ( AsmToken :: String ) ) return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; StringValue = Parser . getTok ( ) . getStringContents ( ) ; Parser . Lex ( ) ; } if ( Parser . parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( IsIntegerValue && IsStringValue ) { assert ( Tag == <STR_LIT> ) ; getTargetStreamer ( ) . emitIntTextAttribute ( Tag , IntegerValue , StringValue ) ; } else if ( IsIntegerValue ) getTargetStreamer ( ) . emitAttribute ( Tag , IntegerValue ) ;

else if ( IsStringValue ) getTargetStreamer ( ) . emitTextAttribute ( Tag , StringValue ) ;


<s> if ( ! Section ) { getStreamer ( ) . initSections ( false , getSTI ( ) ) ; Section = getStreamer ( ) . getCurrentSectionOnly ( ) ; }


<s> bool <ISA_LIT>AsmParser :: parseDirectiveEven ( SMLoc L ) { const MCSection * Section = getStreamer ( ) . getCurrentSectionOnly ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; if ( ! Section ) { getStreamer ( ) . initSections ( false , getSTI ( ) ) ; Section = getStreamer ( ) . getCurrentSectionOnly ( ) ; } assert ( Section && <STR_LIT> ) ; if ( Section -> useCodeAlign ( ) ) getStreamer ( ) . emitCodeAlignment ( <NUM_LIT> , & getSTI ( ) ) ; else getStreamer ( ) . emitValueToAlignment ( <NUM_LIT> ) ;


<s> int Width = <NUM_LIT> ; if ( isThumb ( ) ) { switch ( Suffix ) { case 'n' : Width = <NUM_LIT> ; break ; case 'w' : break ; default : Width = <NUM_LIT> ; break ; } } 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> ) ; } char CurSuffix = Suffix ; 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 ; case <NUM_LIT> : if ( Value -> getValue ( ) < <NUM_LIT> ) CurSuffix = 'n' ;

else if ( Value -> getValue ( ) >= <NUM_LIT> ) CurSuffix = 'w' ;


<s> if ( ! IsVector && ! Op . isRegList ( ) ) return Error ( L , <STR_LIT> ) ; if ( IsVector && ! Op . isDPRRegList ( ) ) return Error ( L , <STR_LIT> ) ;

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


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


if ( parseImmExpr ( Size ) ) return true ;


<s> if ( parseImmExpr ( Byte ) ) return true ; if ( Byte > <NUM_LIT> || Byte < <NUM_LIT> ) return Error ( L , <STR_LIT> ) ; if ( Opcode > <NUM_LIT> ) return Error ( L , <STR_LIT> ) ; Opcode = ( Opcode << <NUM_LIT> ) | Byte ; } while ( parseOptionalToken ( AsmToken :: Comma ) ) ; getTargetStreamer ( ) . emit<ISA_LIT>WinCFICustom ( Opcode ) ; return false ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveSEHCustom ( SMLoc L ) { unsigned Opcode = <NUM_LIT> ; do { int64_t Byte ;

if ( parseImmExpr ( Byte ) ) return true ;


<s> bool <ISA_LIT>AsmParser :: parseDirectiveSEHEpilogEnd ( SMLoc L ) { getTargetStreamer ( ) . emit<ISA_LIT>WinCFIEpilogEnd ( ) ;


<s> getTargetStreamer ( ) . emit<ISA_LIT>WinCFIEpilogEnd ( ) ; return false ;


<s> SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ;

if ( ! Tok . is ( AsmToken :: Identifier ) ) return Error ( S , <STR_LIT> ) ;


<s> if ( Condition ) { MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; if ( ! Tok . is ( AsmToken :: Identifier ) ) return Error ( S , <STR_LIT> ) ; CC = <ISA_LIT>CondCodeFromString ( Tok . getString ( ) ) ; if ( CC == ~ <NUM_LIT> ) return Error ( S , <STR_LIT> ) ; Parser . Lex ( ) ;


<s> getTargetStreamer ( ) . emit<ISA_LIT>WinCFIPrologEnd ( Fragment ) ;


<s> const SmallVectorImpl < unsigned > & RegList = Op . getRegList ( ) ; uint32_t Mask = <NUM_LIT> ; for ( size_t i = <NUM_LIT> ; i < RegList . size ( ) ; ++ i ) { unsigned Reg = MRI -> getEncodingValue ( RegList [ i ] ) ; assert ( Reg < <NUM_LIT> && <STR_LIT> ) ; unsigned Bit = ( <NUM_LIT> << Reg ) ; Mask |= Bit ; } if ( Mask == <NUM_LIT> ) return Error ( L , <STR_LIT> ) ; unsigned First = <NUM_LIT> ; while ( ( Mask & <NUM_LIT> ) == <NUM_LIT> ) { First ++ ; Mask >>= <NUM_LIT> ; } if ( ( ( Mask + <NUM_LIT> ) & Mask ) != <NUM_LIT> ) return Error ( L , <STR_LIT> ) ; unsigned Last = First ; while ( ( Mask & <NUM_LIT> ) != <NUM_LIT> ) {


<s> getTargetStreamer ( ) . emit<ISA_LIT>WinCFISaveLR ( Offset ) ;


<s> const SmallVectorImpl < unsigned > & RegList = Op . getRegList ( ) ; uint32_t Mask = <NUM_LIT> ; for ( size_t i = <NUM_LIT> ; i < RegList . size ( ) ; ++ i ) { unsigned Reg = MRI -> getEncodingValue ( RegList [ i ] ) ; if ( Reg == <NUM_LIT> ) Reg = <NUM_LIT> ; if ( Reg == <NUM_LIT> ) return Error ( L , <STR_LIT> ) ; assert ( Reg < <NUM_LIT> && <STR_LIT> ) ; unsigned Bit = ( <NUM_LIT> << Reg ) ; Mask |= Bit ; } if ( ! Wide && ( Mask & <NUM_LIT> ) != <NUM_LIT> ) return Error ( L , <STR_LIT> ) ;

getTargetStreamer ( ) . emit<ISA_LIT>WinCFISaveRegMask ( Mask , Wide ) ;


<s> unsigned Index = MRI -> getEncodingValue ( Reg ) ; if ( Index > <NUM_LIT> || Index == <NUM_LIT> ) return Error ( L , <STR_LIT> ) ;

getTargetStreamer ( ) . emit<ISA_LIT>WinCFISaveSP ( Index ) ;


<s> if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) || check ( ! hasThumb ( ) , L , <STR_LIT> ) ) return true ;


<s> if ( Parser . getTok ( ) . is ( AsmToken :: Identifier ) || Parser . getTok ( ) . is ( AsmToken :: String ) ) { MCSymbol * Func = getParser ( ) . getContext ( ) . getOrCreateSymbol ( Parser . getTok ( ) . getIdentifier ( ) ) ; getParser ( ) . getStreamer ( ) . emitThumbFunc ( Func ) ; Parser . Lex ( ) ; if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ; return false ; } } if ( parseToken ( AsmToken :: EndOfStatement , <STR_LIT> ) ) return true ;


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


<s> const MCExpr * Expr = nullptr ; SMLoc L = getParser ( ) . getTok ( ) . getLoc ( ) ; if ( check ( getParser ( ) . parseExpression ( Expr ) , L , <STR_LIT> ) ) return true ; const MCConstantExpr * Value = dyn_cast_or_null < MCConstantExpr > ( Expr ) ; if ( check ( ! Value , L , <STR_LIT> ) ) return true ; Out = Value -> getValue ( ) ;


<s> StringRef OptStr = Tok . getString ( ) ; if ( OptStr . equals_insensitive ( <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> ) ; 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 :: CreateInstSyncBarrierOpt ( ( <STR_LIT> ) Opt , S ) ) ;


<s> const MCExpr * Value ; if ( getParser ( ) . parseExpression ( Value ) ) return true ; getParser ( ) . getStreamer ( ) . emitValue ( Value , Size , L ) ; return false ; } ; return ( parseMany ( parseOne ) ) ;


<s> return false ; } if ( Parser . getTok ( ) . is ( AsmToken :: Hash ) || Parser . getTok ( ) . is ( AsmToken :: Dollar ) || Parser . getTok ( ) . is ( AsmToken :: LParen ) || Parser . getTok ( ) . is ( AsmToken :: Integer ) ) { if ( Parser . getTok ( ) . is ( AsmToken :: Hash ) || Parser . getTok ( ) . is ( AsmToken :: Dollar ) ) Parser . Lex ( ) ; E = Parser . getTok ( ) . getLoc ( ) ; bool isNegative = getParser ( ) . getTok ( ) . is ( AsmToken :: Minus ) ; const MCExpr * Offset , * AdjustedOffset ; if ( getParser ( ) . parseExpression ( Offset ) ) return true ; if ( const auto * CE = dyn_cast < MCConstantExpr > ( Offset ) ) { int32_t Val = CE -> getValue ( ) ; if ( isNegative && Val == <NUM_LIT> ) CE = MCConstantExpr :: create ( std :: numeric_limits < int32_t > :: min ( ) , getContext ( ) ) ; AdjustedOffset = CE ; } else AdjustedOffset = Offset ; Operands . push_back ( <ISA_LIT>Operand :: CreateMem ( BaseRegNum , AdjustedOffset , <NUM_LIT> , <STR_LIT> , <NUM_LIT> , <NUM_LIT> , false , S , E ) ) ; if ( Parser . getTok ( ) . isNot ( AsmToken :: RBrac ) ) return Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; E = Parser . getTok ( ) . getEndLoc ( ) ; Parser . Lex ( ) ; if ( Parser . getTok ( ) . is ( AsmToken :: Exclaim ) ) { Operands . push_back ( <ISA_LIT>Operand :: CreateToken ( <STR_LIT> , Parser . getTok ( ) . getLoc ( ) ) ) ; Parser . Lex ( ) ; } return false ; } bool isNegative = false ; if ( Parser . getTok ( ) . is ( AsmToken :: Minus ) ) { isNegative = true ;


<s> return MatchOperand_NoMatch ; } unsigned SYSmvalue = Val & <NUM_LIT> ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateMSRMask ( SYSmvalue , S ) ) ; return MatchOperand_Success ; } if ( ! Tok . is ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ; StringRef Mask = Tok . getString ( ) ; if ( isMClass ( ) ) { auto TheReg = <STR_LIT> ( Mask . lower ( ) ) ; if ( ! TheReg || ! TheReg -> hasRequiredFeatures ( getSTI ( ) . getFeatureBits ( ) ) ) return MatchOperand_NoMatch ; unsigned SYSmvalue = TheReg -> Encoding & <NUM_LIT> ; 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 ( ) ) ;


<s> bool <ISA_LIT>AsmParser :: parseOperand ( OperandVector & Operands , StringRef Mnemonic ) { MCAsmParser & Parser = getParser ( ) ; SMLoc S , E ; OperandMatchResultTy ResTy = MatchOperandParserImpl ( Operands , Mnemonic ) ; if ( ResTy == MatchOperand_Success ) return false ; if ( ResTy == MatchOperand_ParseFail ) return true ; switch ( getLexer ( ) . getKind ( ) ) { 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_insensitive ( <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> RefKind = <ISA_LIT>MCExpr :: VK_<ISA_LIT>_None ; if ( getLexer ( ) . is ( AsmToken :: Hash ) ) Parser . Lex ( ) ; assert ( getLexer ( ) . is ( AsmToken :: Colon ) && <STR_LIT> ) ; Parser . Lex ( ) ; if ( getLexer ( ) . isNot ( AsmToken :: Identifier ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; } enum { COFF = ( <NUM_LIT> << MCContext :: IsCOFF ) , ELF = ( <NUM_LIT> << MCContext :: IsELF ) , MACHO = ( <NUM_LIT> << MCContext :: IsMachO ) , WASM = ( <NUM_LIT> << MCContext :: IsWasm ) , } ; static const struct PrefixEntry { const char * Spelling ; <ISA_LIT>MCExpr :: VariantKind VariantKind ; uint8_t SupportedFormats ; } PrefixEntries [ ] = { { <STR_LIT> , <ISA_LIT>MCExpr :: VK_<ISA_LIT>_LO16 , COFF | ELF | MACHO } , { <STR_LIT> , <ISA_LIT>MCExpr :: VK_<ISA_LIT>_HI16 , COFF | ELF | MACHO } , } ; StringRef IDVal = Parser . getTok ( ) . getIdentifier ( ) ; const auto & Prefix = llvm :: find_if ( PrefixEntries , [ & IDVal ] ( const PrefixEntry & PE ) { return PE . Spelling == IDVal ; } ) ; if ( Prefix == std :: end ( PrefixEntries ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; } uint8_t CurrentFormat ; switch ( getContext ( ) . getObjectFileType ( ) ) { case MCContext :: IsMachO : CurrentFormat = MACHO ; break ; case MCContext :: IsELF : CurrentFormat = ELF ; break ; case MCContext :: IsCOFF : CurrentFormat = COFF ; break ; case MCContext :: IsWasm : CurrentFormat = WASM ;


<s> case MCContext :: IsMachO : CurrentFormat = MACHO ; break ; case MCContext :: IsELF : CurrentFormat = ELF ; break ; case MCContext :: IsCOFF : CurrentFormat = COFF ; break ; case MCContext :: IsWasm : CurrentFormat = WASM ; break ; case MCContext :: IsGOFF : case MCContext :: IsSPIRV : case MCContext :: IsXCOFF : case MCContext :: IsDXContainer : llvm_unreachable ( <STR_LIT> ) ; break ; } if ( ~ Prefix -> SupportedFormats & CurrentFormat ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; } RefKind = Prefix -> VariantKind ; Parser . Lex ( ) ; if ( getLexer ( ) . isNot ( AsmToken :: Colon ) ) { Error ( Parser . getTok ( ) . getLoc ( ) , <STR_LIT> ) ; return true ; }


<s> MCAsmParser & Parser = getParser ( ) ; SMLoc S = Parser . getTok ( ) . getLoc ( ) ; const AsmToken & Tok = Parser . getTok ( ) ; if ( Tok . isNot ( AsmToken :: Identifier ) ) return MatchOperand_NoMatch ; if ( ! Tok . getString ( ) . equals_insensitive ( <STR_LIT> ) ) return MatchOperand_NoMatch ; Parser . Lex ( ) ; Operands . push_back ( <ISA_LIT>Operand :: CreateTraceSyncBarrierOpt ( <STR_LIT> , S ) ) ; return MatchOperand_Success ;


<s> if ( ( ( ( Mnemonic == <STR_LIT> || Mnemonic == <STR_LIT> ) && ! hasMVE ( ) ) || 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 ; } return false ;


<s> bool <ISA_LIT>AsmParser :: shouldOmitVectorPredicateOperand ( StringRef Mnemonic , OperandVector & Operands ) { if ( ! hasMVE ( ) || Operands . size ( ) < <NUM_LIT> ) return true ; if ( Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) ) return true ; if ( Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) ) return false ; if ( Mnemonic . startswith ( <STR_LIT> ) && ! ( Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) || Mnemonic . startswith ( <STR_LIT> ) ) ) { for ( auto & Operand : Operands ) { if ( static_cast < <ISA_LIT>Operand & > ( * Operand ) . isVectorIndex ( ) || ( ( * Operand ) . isReg ( ) && ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( ( * Operand ) . getReg ( ) ) || <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( ( * Operand ) . getReg ( ) ) ) ) ) { return true ; } } return false ; } else { for ( auto & Operand : Operands ) { if ( static_cast < <ISA_LIT>Operand & > ( * Operand ) . isVectorIndex ( ) || ( Operand -> isReg ( ) && ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Operand -> getReg ( ) ) ) ) ) return false ; }


<s> ProcessorIMod = <NUM_LIT> ; if ( ( Mnemonic == <STR_LIT> && isThumb ( ) ) || 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> || 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 == <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> ) return Mnemonic ; 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> && ! ( hasMVE ( ) && ( 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 . startswith ( <STR_LIT> ) ) ) ) { unsigned CC = <ISA_LIT>CondCodeFromString ( Mnemonic . substr ( Mnemonic . size ( ) - <NUM_LIT> ) ) ; if ( CC != ~ <NUM_LIT> ) { Mnemonic = Mnemonic . slice ( <NUM_LIT> , Mnemonic . size ( ) - <NUM_LIT> ) ; PredicationCode = CC ; }


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


<s> if ( Tok . isNot ( AsmToken :: Identifier ) ) return - <NUM_LIT> ; std :: string lowerCase = Tok . getString ( ) . lower ( ) ; 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> ; Parser . Lex ( ) ; return Entry -> getValue ( ) ; }

if ( ! hasD32 ( ) && RegNum >= <STR_LIT> && RegNum <= <STR_LIT> ) return - <NUM_LIT> ;


<s> if ( Rt == <NUM_LIT> ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; if ( ( Rt & <NUM_LIT> ) == <NUM_LIT> ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; if ( Rt2 != Rt + <NUM_LIT> ) { if ( Load ) return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; else return Error ( Operands [ <NUM_LIT> ] -> getStartLoc ( ) , <STR_LIT> ) ; } }


<s> break ; case MCK__HASH_8 : if ( Op . isImm ( ) ) if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op . getImm ( ) ) ) if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ; break ; case MCK__HASH_16 : if ( Op . isImm ( ) ) if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op . getImm ( ) ) ) if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ; break ; case MCK_ModImm : 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 ;


<s> case MCK__HASH_0 : if ( Op . isImm ( ) ) if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op . getImm ( ) ) ) if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ; break ; case MCK__HASH_8 : if ( Op . isImm ( ) ) if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op . getImm ( ) ) ) if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ; break ; case MCK__HASH_16 : if ( Op . isImm ( ) ) if ( const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Op . getImm ( ) ) ) if ( CE -> getValue ( ) == <NUM_LIT> ) return Match_Success ; break ; case MCK_ModImm : 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 ;


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


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

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


<s> void addMVEVecListOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; const MCRegisterClass * RC_in = & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] ; const MCRegisterClass * RC_out = ( VectorList . Count == <NUM_LIT> ) ? & <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] :


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


<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> void addThumbMemPCOperands ( MCInst & Inst , unsigned N ) const { assert ( N == <NUM_LIT> && <STR_LIT> ) ; if ( isImm ( ) ) { const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( getImm ( ) ) ; if ( CE ) { Inst . addOperand ( MCOperand :: createImm ( CE -> getValue ( ) ) ) ; return ; } const MCSymbolRefExpr * SR = cast < MCSymbolRefExpr > ( Imm . Val ) ; Inst . addOperand ( MCOperand :: createExpr ( SR ) ) ; return ; } assert ( isGPRMem ( ) && <STR_LIT> ) ;

assert ( isa < MCConstantExpr > ( Memory . OffsetImm ) && <STR_LIT> ) ;


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


<s> unsigned RegNum ; if ( getVPTPred ( ) == <STR_LIT> ) { RegNum = <NUM_LIT> ; } else { unsigned NextOpIndex = Inst . getNumOperands ( ) ; const MCInstrDesc & MCID = <ISA_LIT>Insts [ Inst . getOpcode ( ) ] ; int TiedOp = MCID . getOperandConstraint ( NextOpIndex , MCOI :: TIED_TO ) ;

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


<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 ( ) ; setAvailableFeatures ( ComputeAvailableFeatures ( STI . getFeatureBits ( ) ) ) ; if ( AddBuildAttributes ) getTargetStreamer ( ) . emitTargetAttributes ( STI ) ; ITState . CurPosition = ~ <NUM_LIT> ;


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


<s> } else if ( <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Regs . front ( ) . second ) ) { if ( Regs . back ( ) . second == <STR_LIT> ) Kind = k_FPSRegisterListWithVPR ; else Kind = k_SPRRegisterList ; } if ( Kind == k_RegisterList && Regs . back ( ) . second == <STR_LIT> ) Kind = k_RegisterListWithAPSR ; assert ( std :: is_sorted ( Regs . begin ( ) , Regs . end ( ) ) && <STR_LIT> ) ; auto Op = std :: make_unique < <ISA_LIT>Operand > ( Kind ) ; for ( const auto & P : Regs ) Op -> Registers . push_back ( P . second ) ;


<s> MCInst ITInst ; ITInst . setOpcode ( <STR_LIT> ) ; ITInst . addOperand ( MCOperand :: createImm ( ITState . Cond ) ) ; ITInst . addOperand ( MCOperand :: createImm ( ITState . Mask ) ) ; Out . EmitInstruction ( ITInst , getSTI ( ) ) ; assert ( PendingConditionalInsts . size ( ) <= <NUM_LIT> ) ; for ( const MCInst & Inst : PendingConditionalInsts ) {

Out . EmitInstruction ( Inst , getSTI ( ) ) ;


<s> if ( ! Memory . OffsetImm ) return true ;

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


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


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


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


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


<s> bool isMemImm0_1020s4Offset ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) 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> ;


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


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

return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> && ( Val & <NUM_LIT> ) == <NUM_LIT> ) || Val == INT32_MIN ;


<s> if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ; if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> || ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! Memory . OffsetImm ) return true ;


<s> unsigned Divisor = <NUM_LIT> << Bits ; if ( Val % Divisor != <NUM_LIT> ) return false ; Val /= Divisor ;

return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> ) ;


<s> if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> || ! <ISA_LIT>MCRegisterClasses [ RegClassID ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ; if ( Val == INT32_MIN ) return true ; unsigned Divisor = <NUM_LIT> << Bits ; if ( Val % Divisor != <NUM_LIT> ) return false ; Val /= Divisor ; return ( Val >= - <NUM_LIT> && Val <= <NUM_LIT> ) ;


<s> if ( Memory . BaseRegNum == <STR_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ; return ( Val == std :: numeric_limits < int32_t > :: min ( ) ) || ( Val > - <NUM_LIT> && Val < <NUM_LIT> ) ;


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


<s> bool isMemImm8s4Offset ( ) const { if ( isImm ( ) && ! isa < MCConstantExpr > ( getImm ( ) ) ) return true ;

if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ;


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


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


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


<s> bool isMemPCRelImm12 ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( Memory . BaseRegNum != <STR_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ;


<s> if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ;

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


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


<s> if ( ! Memory . OffsetImm ) return true ;


<s> static_assert ( shift < <NUM_LIT> , <STR_LIT> ) ; int64_t Val = Memory . OffsetImm -> getValue ( ) ; if ( ( Val & ( ( <NUM_LIT> << shift ) - <NUM_LIT> ) ) != <NUM_LIT> ) return false ; int64_t Range = ( <NUM_LIT> << ( <NUM_LIT> + shift ) ) - <NUM_LIT> ; return ( Val == INT32_MIN ) || ( Val > - Range && Val < Range ) ;


<s> if ( ! isMVEMem ( ) || Memory . OffsetImm != <NUM_LIT> || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . BaseRegNum ) ) return false ; if ( ! <ISA_LIT>MCRegisterClasses [ <STR_LIT> ] . contains ( Memory . OffsetRegNum ) ) return false ;

if ( shift == <NUM_LIT> && Memory . ShiftType != <STR_LIT> ) return false ;


<s> bool isMemThumbRIs2 ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || ! is<ISA_LIT>LowRegister ( Memory . BaseRegNum ) || Memory . Alignment != <NUM_LIT> ) 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> ;


<s> bool isMemThumbRIs4 ( ) const { if ( ! isGPRMem ( ) || Memory . OffsetRegNum != <NUM_LIT> || ! is<ISA_LIT>LowRegister ( Memory . BaseRegNum ) || Memory . Alignment != <NUM_LIT> ) return false ; if ( ! Memory . OffsetImm ) return true ;


<s> if ( ! Memory . OffsetImm ) return true ; int64_t Val = Memory . OffsetImm -> getValue ( ) ; return Val >= <NUM_LIT> && Val <= <NUM_LIT> && ( Val % <NUM_LIT> ) == <NUM_LIT> ;


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


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

return ( Val >= <NUM_LIT> && Val < <NUM_LIT> ) ;


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


<s> if ( isa < MCSymbolRefExpr > ( Imm . Val ) ) return true ; const MCConstantExpr * CE = dyn_cast < MCConstantExpr > ( Imm . Val ) ; if ( ! CE ) return false ; Val = CE -> getValue ( ) ; } else if ( isGPRMem ( ) ) {

if ( ! Memory . OffsetImm || Memory . OffsetRegNum ) return false ;


<s> bool PendConditionalInstruction = false ; SmallVector < NearMissInfo , <NUM_LIT> > NearMisses ; MatchResult = MatchInstruction ( Operands , Inst , NearMisses , MatchingInlineAsm , PendConditionalInstruction , Out ) ; switch ( MatchResult ) { case Match_Success : LLVM_DEBUG ( dbgs ( ) << <STR_LIT> ; Inst . dump_pretty ( dbgs ( ) , MII . getName ( Inst . getOpcode ( ) ) ) ; dbgs ( ) << <STR_LIT> ) ; if ( validateInstruction ( Inst , Operands ) ) { forwardITPosition ( ) ; forwardVPTPosition ( ) ; return true ; } { bool wasInITBlock = inITBlock ( ) ; while ( processInstruction ( Inst , Operands , Out ) ) LLVM_DEBUG ( dbgs ( ) << <STR_LIT> ; Inst . dump_pretty ( dbgs ( ) , MII . getName ( Inst . getOpcode ( ) ) ) ; dbgs ( ) << <STR_LIT> ) ; if ( wasInITBlock && hasV8Ops ( ) && isThumb ( ) && ! isV8EligibleForIT ( & Inst ) ) { Warning ( IDLoc , <STR_LIT> ) ; } } forwardITPosition ( ) ; forwardVPTPosition ( ) ; 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 : { FeatureBitset 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 ( ) ) ;


<s> 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 ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveThumbSet ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveInst ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveInst ( DirectiveID . getLoc ( ) , 'n' ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveInst ( DirectiveID . getLoc ( ) , 'w' ) ; else if ( ! IsMachO && ! IsCOFF ) { if ( IDVal == <STR_LIT> ) parseDirectiveArch ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveCPU ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveEabiAttr ( DirectiveID . getLoc ( ) ) ; else if ( IDVal == <STR_LIT> ) parseDirectiveFPU ( DirectiveID . getLoc ( ) ) ;

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