<s> const InstrStage * IS = II -> beginStage ( QII -> get ( this -> getOpcode ( ) ) . getSchedClass ( ) ) ; return ( IS -> getUnits (


<s> const uint64_t F = MCID . TSFlags ; return ( ( F >>


<s> assert ( MCID . getSize ( ) == <NUM_LIT> && <STR_LIT> ) ; setOpcode (


<s> const uint64_t F = MCID . TSFlags ; return ( F >> <STR_LIT> ) &


<s> bool <ISA_LIT>MCInst :: isExtended ( void ) const { const uint64_t F = MCID .


<s> const uint64_t F = MCID . TSFlags ; return ( ( F >> <STR_LIT> ) & <STR_LIT>


<s> bool <ISA_LIT>MCInst :: isPacketBegin ( )


<s> bool <ISA_LIT>MCInst :: isPacketBegin


<s> bool <ISA_LIT>MCInst :: isPacketEnd (


<s> bool <ISA_LIT>MCInst :: isPacketEnd ( ) const { return packetEnd


<s> void <ISA_LIT>MCInst :: setPacketBegin (


<s> void <ISA_LIT>MCInst :: setPacketEnd ( bool Y ) { packetEnd = Y


<s> explicit <ISA_LIT>MCInst ( ) : MCInst ( ) , MCID ( <NUM_LIT> ) , packetStart ( <NUM_LIT>


<s> static MCOperand GetSymbolRef ( const MachineOperand & MO , const MCSymbol * Symbol , <ISA_LIT>AsmPrinter & Printer , bool MustExtend ) { MCContext & MC = Printer . OutContext ; const MCExpr * ME ; MCSymbolRefExpr :: VariantKind RelocationType ; switch ( MO . getTargetFlags ( ) ) { default : RelocationType = MCSymbolRefExpr :: VK_None ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_PCREL ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_GOT ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_LO16 ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_HI16 ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_GPREL ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr


<s> RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_IE ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_IE_GOT ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_TPREL ; break ; } ME = MCSymbolRefExpr :: create ( Symbol , RelocationType , MC ) ; if ( ! MO . isJTI ( ) && MO . getOffset ( ) ) ME = MCBinaryExpr :: createAdd ( ME , MCConstantExpr :: create ( MO . getOffset ( ) , MC ) , MC ) ; ME = <ISA_LIT>MCExpr :: create ( ME , MC ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * ME , MustExtend ) ; return MCOperand :: createExpr (


<s> if ( MO . isImplicit ( ) ) continue ; MCO = MCOperand :: CreateReg ( MO . getReg ( ) ) ; break ; case MachineOperand :: MO_FPImmediate : { APFloat Val = MO . getFPImm ( ) -> getValueAPF ( ) ; MCO = MCOperand :: CreateImm ( * Val . bitcastToAPInt ( ) . getRawData ( ) ) ; break ; } case MachineOperand :: MO_Immediate : MCO = MCOperand :: CreateImm ( MO . getImm ( ) ) ; break ; case MachineOperand :: MO_MachineBasicBlock : MCO = MCOperand :: CreateExpr ( MCSymbolRefExpr :: Create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ) ; break ; case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . Mang -> getSymbol ( MO . getGlobal ( ) ) , AP ) ; break ; case MachineOperand :: MO_ExternalSymbol : MCO = GetSymbolRef ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP ) ; break ; case MachineOperand :: MO_JumpTableIndex : MCO = GetSymbolRef ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_ConstantPoolIndex : MCO = GetSymbolRef ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_BlockAddress : MCO = GetSymbolRef ( MO , AP . GetBlockAddressSymbol ( MO .


<s> RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_IE_GOT ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_TPREL ; break ; } ME = MCSymbolRefExpr :: create ( Symbol , RelocationType , MC ) ; if ( ! MO . isJTI ( ) && MO . getOffset ( ) ) ME = MCBinaryExpr :: createAdd ( ME , MCConstantExpr :: create ( MO . getOffset ( ) , MC ) , MC ) ; ME = <ISA_LIT>MCExpr :: create ( ME , MC ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * ME , MustExtend ) ; return MCOperand :: createExpr (


<s> break ; case MachineOperand :: MO_FPImmediate : { APFloat Val = MO . getFPImm ( ) -> getValueAPF ( ) ; auto Expr = <ISA_LIT>MCExpr :: create ( MCConstantExpr :: create ( * Val . bitcastToAPInt ( ) . getRawData ( ) , AP . OutContext ) , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_Immediate : { auto Expr = <ISA_LIT>MCExpr :: create ( MCConstantExpr :: create ( MO . getImm ( ) , AP . OutContext ) , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_MachineBasicBlock : { MCExpr const * Expr = MCSymbolRefExpr :: create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ; Expr = <ISA_LIT>MCExpr :: create ( Expr , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP , MustExtend ) ; break ; case MachineOperand ::


<s> break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_GD_PLT ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_IE ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_<ISA_LIT>_IE_GOT ; break ; case <STR_LIT> : RelocationType = MCSymbolRefExpr :: VK_TPREL ; break ; } ME = MCSymbolRefExpr :: create ( Symbol , RelocationType , MC ) ; if ( ! MO . isJTI ( ) && MO . getOffset ( ) ) ME = MCBinaryExpr :: createAdd ( ME , MCConstantExpr

:: create ( MO . getOffset ( ) , MC ) , MC ) ;


<s> case MachineOperand :: MO_Immediate : { auto Expr = <ISA_LIT>MCExpr :: create ( MCConstantExpr :: create ( MO . getImm ( ) , AP . OutContext ) , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_MachineBasicBlock : { MCExpr const * Expr = MCSymbolRefExpr :: create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ; Expr = <ISA_LIT>MCExpr :: create ( Expr , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_ExternalSymbol : MCO = GetSymbolRef ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_JumpTableIndex : MCO = GetSymbolRef ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_ConstantPoolIndex : MCO = GetSymbolRef ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP , MustExtend ) ; break ; case MachineOperand ::


<s> case MachineOperand :: MO_ExternalSymbol : MCO = GetSymbolRef ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP ) ; break ; case MachineOperand :: MO_JumpTableIndex : MCO = GetSymbolRef ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_ConstantPoolIndex : MCO = GetSymbolRef ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_BlockAddress : MCO = GetSymbolRef ( MO , AP . GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) , AP ) ; break ; } MCI . addOperand ( MCO


<s> static MCOperand GetSymbolRef ( const MachineOperand & MO , const MCSymbol * Symbol , <ISA_LIT>AsmPrinter & Printer ) { MCContext & MC = Printer . OutContext ; const MCExpr * ME ; ME = MCSymbolRefExpr :: Create ( Symbol , MCSymbolRefExpr :: VK_None , MC ) ; if ( ! MO . isJTI ( ) && MO . getOffset ( ) ) ME = MCBinaryExpr :: CreateAdd ( ME , MCConstantExpr :: Create ( MO . getOffset


<s> static MCOperand GetSymbolRef ( const MachineOperand & MO , const MCSymbol * Symbol , <ISA_LIT>AsmPrinter & Printer ) { MCContext & MC = Printer . OutContext ; const MCExpr * ME ; ME = MCSymbolRefExpr :: Create ( Symbol , MCSymbolRefExpr


<s> const MCExpr * ME ; ME = MCSymbolRefExpr :: create ( Symbol , MCSymbolRefExpr :: VK_None , MC ) ; if ( ! MO . isJTI ( ) && MO . getOffset ( ) ) ME = MCBinaryExpr :: createAdd

( ME , MCConstantExpr :: create ( MO . getOffset ( ) , MC ) , MC ) ;


<s> } if ( MI -> getOpcode ( ) == <STR_LIT> ) { <ISA_LIT>MCInstrInfo :: setOuterLoop ( MCB ) ; return ; } MCInst * MCI = new ( AP . OutContext ) MCInst ; MCI -> setOpcode ( MI -> getOpcode ( ) ) ; assert ( MCI -> getOpcode ( ) == static_cast < unsigned > ( MI -> getOpcode ( ) ) && <STR_LIT> ) ; for ( unsigned i = <NUM_LIT> , e = MI -> getNumOperands ( ) ; i < e ; i ++ ) { const MachineOperand & MO = MI -> getOperand ( i ) ; MCOperand MCO ; switch ( MO . getType ( ) ) { default : MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; case MachineOperand :: MO_Register : if ( MO . isImplicit ( ) )


<s> case MachineOperand :: MO_Register : if ( MO . isImplicit ( ) ) continue ; MCO = MCOperand :: CreateReg ( MO . getReg ( ) ) ; break ; case MachineOperand :: MO_FPImmediate : { APFloat Val = MO . getFPImm ( ) -> getValueAPF ( ) ; MCO = MCOperand :: CreateImm ( * Val . bitcastToAPInt ( ) . getRawData ( ) ) ; break ; } case MachineOperand :: MO_Immediate : MCO = MCOperand :: CreateImm ( MO . getImm ( ) ) ; break ; case MachineOperand :: MO_MachineBasicBlock : MCO = MCOperand :: CreateExpr ( MCSymbolRefExpr :: Create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ) ; break ; case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP ) ; break ; case MachineOperand :: MO_ExternalSymbol


<s> break ; case MachineOperand :: MO_FPImmediate : { APFloat Val = MO . getFPImm ( ) -> getValueAPF ( ) ; MCO = MCOperand :: CreateImm ( * Val . bitcastToAPInt ( ) . getRawData ( ) ) ; break ; } case MachineOperand :: MO_Immediate : MCO = MCOperand :: CreateImm ( MO . getImm ( ) ) ; break ; case MachineOperand :: MO_MachineBasicBlock : MCO = MCOperand :: CreateExpr ( MCSymbolRefExpr :: Create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ) ; break ; case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP ) ; break ; case MachineOperand :: MO_ExternalSymbol : MCO = GetSymbolRef ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP ) ; break ; case MachineOperand :: MO_JumpTableIndex : MCO = GetSymbolRef ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_ConstantPoolIndex : MCO = GetSymbolRef ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand ::


<s> static MCOperand GetSymbolRef ( const MachineOperand & MO , const MCSymbol * Symbol , <ISA_LIT>AsmPrinter & Printer ) { MCContext & MC = Printer . OutContext ; const MCExpr * ME ; ME = MCSymbolRefExpr :: Create ( Symbol , MCSymbolRefExpr :: VK_None


<s> auto Expr = <ISA_LIT>MCExpr :: create ( MCConstantExpr :: create ( MO . getImm ( ) , AP . OutContext ) , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_MachineBasicBlock : { MCExpr const * Expr = MCSymbolRefExpr :: create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ; Expr = <ISA_LIT>MCExpr :: create ( Expr , AP . OutContext ) ; <ISA_LIT>MCInstrInfo :: setMustExtend ( * Expr , MustExtend ) ; MCO = MCOperand :: createExpr ( Expr ) ; break ; } case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_ExternalSymbol : MCO = GetSymbolRef ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_JumpTableIndex : MCO = GetSymbolRef ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_ConstantPoolIndex : MCO = GetSymbolRef ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP , MustExtend ) ; break ; case MachineOperand :: MO_BlockAddress : MCO = GetSymbolRef ( MO , AP . GetBlockAddressSymbol ( MO . getBlockAddress ( ) ) , AP , MustExtend ) ; break ; } MCI -> addOperand ( MCO ) ; } AP . <ISA_LIT>ProcessInstruction ( * MCI , * MI ) ; <ISA_LIT>MCInstrInfo :: extendIfNeeded ( AP . OutContext , MCII , MCB , * MCI ) ; MCB . addOperand ( MCOperand :: createInst (


<s> } if ( MI -> getOpcode ( ) == <STR_LIT> ) { <ISA_LIT>MCInstrInfo :: setOuterLoop ( MCB ) ; return ; } MCInst * MCI = new ( AP . OutContext ) MCInst ; MCI -> setOpcode ( MI -> getOpcode ( ) ) ; assert ( MCI -> getOpcode ( ) == static_cast < unsigned > ( MI -> getOpcode ( ) ) && <STR_LIT> ) ; bool MustExtend = false ; for ( unsigned i = <NUM_LIT> , e = MI -> getNumOperands ( ) ; i < e ; i ++ ) { const MachineOperand & MO = MI -> getOperand ( i ) ; MCOperand MCO ; if ( MO . getTargetFlags ( ) & <STR_LIT> ) MustExtend = true ; switch ( MO . getType ( ) ) { default : MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; case MachineOperand :: MO_Register : if ( MO . isImplicit ( ) ) continue ; MCO = MCOperand :: createReg ( MO . getReg ( ) ) ; break ; case MachineOperand :: MO_FPImmediate : { APFloat Val = MO . getFPImm ( ) -> getValueAPF ( ) ; MCO = MCOperand :: createExpr ( MCConstantExpr :: create ( * Val . bitcastToAPInt ( ) . getRawData ( ) , AP . OutContext ) ) ; break ; } case MachineOperand :: MO_Immediate : MCO = MCOperand :: createExpr ( MCConstantExpr :: create ( MO . getImm ( ) , AP . OutContext ) ) ; break ; case MachineOperand :: MO_MachineBasicBlock : MCO = MCOperand :: createExpr ( MCSymbolRefExpr :: create ( MO . getMBB ( ) -> getSymbol ( ) , AP . OutContext ) ) ; break ; case MachineOperand :: MO_GlobalAddress : MCO = GetSymbolRef ( MO , AP . getSymbol ( MO . getGlobal ( ) ) , AP ) ; break ; case MachineOperand :: MO_ExternalSymbol : MCO = GetSymbolRef ( MO , AP . GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) , AP ) ; break ; case MachineOperand :: MO_JumpTableIndex : MCO = GetSymbolRef ( MO , AP . GetJTISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_ConstantPoolIndex : MCO = GetSymbolRef ( MO , AP . GetCPISymbol ( MO . getIndex ( ) ) , AP ) ; break ; case MachineOperand :: MO_BlockAddress : MCO = GetSymbolRef ( MO , AP . GetBlockAddressSymbol ( MO . getBlockAddress (


<s> void <ISA_LIT>MCInstrInfo :: addConstant ( MCInst & MI , uint64_t Value , MCContext & Context ) { MI . addOperand ( MCOperand :: createExpr ( MCConstantExpr :: create


<s> void <ISA_LIT>MCInstrInfo :: addConstExtender ( MCContext & Context , MCInstrInfo const & MCII , MCInst & MCB , MCInst const & MCI ) { assert ( <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) ; MCOperand const & exOp = MCI . getOperand ( <ISA_LIT>MCInstrInfo :: getExtendableOp ( MCII , MCI ) ) ; MCInst * XMCI = new ( Context ) MCInst ( <ISA_LIT>MCInstrInfo :: deriveExtender ( MCII , MCI ,


<s> iterator_range < MCInst :: const_iterator > <ISA_LIT>MCInstrInfo :: bundleInstructions (


<s> if ( STI . getFeatureBits ( ) [ <STR_LIT> ] ) { SmallVector < DuplexCandidate , <NUM_LIT> > possibleDuplexes ; possibleDuplexes = <ISA_LIT>MCInstrInfo :: getDuplexPossibilties ( MCII , STI , MCB ) ; <ISA_LIT>MCShuffle ( Context , MCII , STI , MCB , possibleDuplexes ) ; } <ISA_LIT>MCInstrInfo :: padEndloop ( MCB , Context ) ; if ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) > HEXAGON_PACKET_SIZE ) return false ; CheckOk = Check ? Check -> check ( true ) :


<s> if ( Index == <NUM_LIT> ) return nullptr ; MCInst const * Inst = MCB . getOperand ( Index + bundleInstructionsOffset -


<s> if ( Index == <NUM_LIT> ) return nullptr ; MCInst const * Inst = MCB . getOperand ( Index + bundleInstructionsOffset - <NUM_LIT> ) . getInst ( ) ; if ( isImmext ( * Inst ) ) return Inst ; return nullptr


<s> if ( isConstExtended ( MCII , MCI ) ) addConstExtender ( Context , MCII , MCB


<s> void <ISA_LIT>MCInstrInfo :: extendIfNeeded ( MCContext & Context , MCInstrInfo const & MCII , MCInst & MCB , MCInst const & MCI ) { if ( isConstExtended ( MCII , MCI ) ) addConstExtender


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return static_cast < unsigned > ( ( F >>


<s> unsigned <ISA_LIT>MCInstrInfo :: getAddrMode ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return static_cast < unsigned > ( ( F >> <STR_LIT>


<s> MCInstrDesc const & <ISA_LIT>MCInstrInfo :: getDesc ( MCInstrInfo const & MCII , MCInst const & MCI ) { return MCII . get ( MCI . getOpcode (


<s> return <NUM_LIT> ; case R2 : case D2 : return <NUM_LIT> ; case R3 : case D3 : return <NUM_LIT> ; case R4 : case D8 : return <NUM_LIT> ; case R5 : case D9 : return <NUM_LIT> ; case R6 : case


<s> const auto & HExpr = cast < <ISA_LIT>MCExpr > ( Expr ) ; assert ( HExpr . getExpr ( ) ) ; return * HExpr . getExpr


<s> MCExpr const & <ISA_LIT>MCInstrInfo :: getExpr ( MCExpr const & Expr ) { const auto & HExpr = cast < <ISA_LIT>MCExpr > ( Expr ) ; assert ( HExpr . getExpr ( )


<s> unsigned O = <ISA_LIT>MCInstrInfo :: getExtendableOp ( MCII , MCI ) ; MCOperand const & MO = MCI . getOperand ( O ) ; assert ( ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) && ( MO . isImm (


<s> MCOperand const & <ISA_LIT>MCInstrInfo :: getExtendableOperand ( MCInstrInfo const & MCII , MCInst const & MCI ) { unsigned O = <ISA_LIT>MCInstrInfo :: getExtendableOp ( MCII , MCI ) ; MCOperand const & MO = MCI . getOperand ( O ) ; assert ( ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) && ( MO . isImm ( ) || MO . isExpr ( ) ) ) ; return ( MO )


<s> unsigned <ISA_LIT>MCInstrInfo :: getExtentAlignment ( MCInstrInfo const & MCII ,


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc (


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI


<s> if ( <ISA_LIT>MCInstrInfo :: isExtentSigned ( MCII , MCI ) ) return ( <NUM_LIT> << ( <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII , MCI ) - <NUM_LIT> ) ) - <NUM_LIT> ; return ( <NUM_LIT> << <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII , MCI ) )


<s> if ( <ISA_LIT>MCInstrInfo :: isExtentSigned ( MCII , MCI ) ) return ( <NUM_LIT> << ( <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII , MCI ) - <NUM_LIT> ) ) - <NUM_LIT> ; return ( <NUM_LIT> << <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII , MCI ) ) -


<s> assert ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) ; if ( <ISA_LIT>MCInstrInfo :: isExtentSigned ( MCII , MCI ) ) return - ( <NUM_LIT> << ( <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII , MCI ) - <NUM_LIT> ) ) ; return


<s> StringRef <ISA_LIT>MCInstrInfo :: getName ( MCInstrInfo const & MCII


<s> unsigned short <ISA_LIT>MCInstrInfo :: getNewValueOp ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ( F >>


<s> unsigned short <ISA_LIT>MCInstrInfo :: getNewValueOp ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII ,


<s> unsigned short <ISA_LIT>MCInstrInfo :: getNewValueOp2 ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc (


<s> unsigned short <ISA_LIT>MCInstrInfo :: getNewValueOp2 ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc


<s> MCOperand const & MCO = MCI . getOperand ( O ) ; assert ( ( <ISA_LIT>MCInstrInfo :: isNewValue ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: hasNewValue2 ( MCII , MCI ) ) && MCO . isReg ( ) ) ; return ( MCO )


<s> unsigned <ISA_LIT>MCInstrInfo :: getOtherReservedSlots ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst const & MCI ) { const InstrItinerary * II = STI . getSchedModel ( ) . InstrItineraries ; int SchedClass = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . getSchedClass ( ) ; unsigned Slots = <NUM_LIT> ; for ( unsigned Stage = II [ SchedClass ] . FirstStage + <NUM_LIT> ; Stage < II [ SchedClass ] . LastStage ; ++ Stage ) { unsigned Units = ( Stage + <ISA_LIT>Stages ) ->


<s> const uint64_t F = MCII . get ( MCI . getOpcode ( )


<s> unsigned <ISA_LIT>MCInstrInfo :: getType ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = MCII . get ( MCI . getOpcode ( ) ) . TSFlags ; return ( ( F >> <STR_LIT>


<s> unsigned <ISA_LIT>MCInstrInfo :: getUnits ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst const & MCI ) { const InstrItinerary * II = STI . getSchedModel ( ) . InstrItineraries ; int SchedClass = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . getSchedClass ( ) ; return ( ( II [ SchedClass ] . FirstStage


<s> bool <ISA_LIT>MCInstrInfo :: hasDuplex ( MCInstrInfo const & MCII , MCInst const & MCI ) { if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCI ) ) return false ; for ( auto const & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCI ) ) { if ( <ISA_LIT>MCInstrInfo :: isDuplex ( MCII , * I . getInst ( ) ) ) return true ; } return false


<s> bool <ISA_LIT>MCInstrInfo :: hasExtenderForIndex ( MCInst const & MCB , size_t Index ) { return extenderForIndex ( MCB , Index


<s> bool <ISA_LIT>MCInstrInfo :: hasImmExt ( MCInst const & MCI ) { if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCI ) )


<s> if ( isImmext ( * I . getInst ( ) ) ) return true ; } return false


<s> bool <ISA_LIT>MCInstrInfo :: hasNewValue ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII ,


<s> return * MCB . getOperand ( bundleInstructionsOffset + Index )


<s> return * MCB . getOperand ( bundleInstructionsOffset + Index


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc (


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI


<s> bool <ISA_LIT>MCInstrInfo :: isBundle ( MCInst const & MCI ) { auto Result = <STR_LIT> ==


<s> bool <ISA_LIT>MCInstrInfo :: isCanon ( MCInstrInfo const & MCII


<s> bool <ISA_LIT>MCInstrInfo :: isCofMax1 ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc (


<s> bool <ISA_LIT>MCInstrInfo :: isCofRelax1 ( MCInstrInfo const & MCII , MCInst const


<s> bool <ISA_LIT>MCInstrInfo :: isCofRelax2 ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI


<s> bool <ISA_LIT>MCInstrInfo :: isCofRelax2 ( MCInstrInfo const &


<s> if ( isa < <ISA_LIT>MCExpr > ( MO . getExpr ( ) ) && <ISA_LIT>MCInstrInfo :: mustExtend ( * MO . getExpr ( ) ) ) return true ; if ( ( <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) == <STR_LIT> ) || ( <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) == <STR_LIT> && <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . isBranch ( ) ) || ( <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) == <STR_LIT> && <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . isBranch ( ) ) ) return false ; else if ( ( <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) == <STR_LIT> ) && ( MCI . getOpcode ( ) != <STR_LIT> ) ) return false ; assert ( ! MO . isImm ( ) ) ; if ( isa < <ISA_LIT>MCExpr > ( MO . getExpr ( ) ) && <ISA_LIT>MCInstrInfo :: mustNotExtend ( * MO . getExpr ( ) ) ) return false ; int64_t Value ; if ( ! MO . getExpr ( ) -> evaluateAsAbsolute


<s> bool <ISA_LIT>MCInstrInfo :: isCVINew ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc


<s> return ( ( Reg >= <STR_LIT> && Reg <= <STR_LIT> )

|| ( Reg >= <STR_LIT> && Reg <= <STR_LIT> ) ) ;


<s> bool <ISA_LIT>MCInstrInfo :: isDuplex ( MCInstrInfo const & MCII , MCInst


<s> bool <ISA_LIT>MCInstrInfo :: isDuplex ( MCInstrInfo const & MCII , MCInst const & MCI ) { return <STR_LIT> == <ISA_LIT>MCInstrInfo :: getType ( MCII


<s> uint64_t const F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII ,


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( F >> <STR_LIT> )


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( F >> <STR_LIT>


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ( F >> <STR_LIT> )


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) .


<s> bool <ISA_LIT>MCInstrInfo :: isImmext ( MCInst const & MCI ) { return MCI . getOpcode ( ) ==


<s> assert ( isBundle ( MCI ) ) ; int64_t Flags = MCI . getOperand ( <NUM_LIT>


<s> bool <ISA_LIT>MCInstrInfo :: isInnerLoop ( MCInst const & MCI ) { assert ( isBundle ( MCI )


<s> bool <ISA_LIT>MCInstrInfo :: isIntReg ( unsigned Reg ) { return ( Reg >= <STR_LIT> && Reg


<s> return ( ( Reg >= <STR_LIT> && Reg <= <STR_LIT> ) ||

( Reg >= <STR_LIT> && Reg <= <STR_LIT> ) ) ;


<s> return ( ( Reg >= <STR_LIT> && Reg <= <STR_LIT> ) || (

Reg >= <STR_LIT> && Reg <= <STR_LIT> ) ) ;


<s> assert ( isBundle ( MCI ) ) ; auto Flags = MCI . getOperand ( <NUM_LIT> ) . getImm ( ) ; return ( Flags & memReorderDisabledMask )


<s> bool <ISA_LIT>MCInstrInfo :: isNewValue ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ( F >> <STR_LIT>


<s> bool <ISA_LIT>MCInstrInfo :: isNewValue ( MCInstrInfo const & MCII , MCInst const & MCI


<s> bool <ISA_LIT>MCInstrInfo :: isOpExtendable ( MCInstrInfo const & MCII , MCInst const & MCI , unsigned short O ) { return ( O == <ISA_LIT>MCInstrInfo :: getExtendableOp ( MCII , MCI


<s> assert ( isBundle ( MCI ) ) ; int64_t Flags = MCI . getOperand ( <NUM_LIT> ) .


<s> bool <ISA_LIT>MCInstrInfo :: isPredicated ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc (


<s> bool <ISA_LIT>MCInstrInfo :: isPredicated ( MCInstrInfo const &


<s> bool <ISA_LIT>MCInstrInfo :: isPredicatedNew ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII


<s> bool <ISA_LIT>MCInstrInfo :: isPredicatedNew ( MCInstrInfo const & MCII ,


<s> bool <ISA_LIT>MCInstrInfo :: isPredicatedTrue ( MCInstrInfo const & MCII ,


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ! ( ( F >> <STR_LIT> ) & <STR_LIT>


<s> bool <ISA_LIT>MCInstrInfo :: isPredicateLate ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( F >> <STR_LIT> & <STR_LIT> )


<s> bool <ISA_LIT>MCInstrInfo :: isPredicateLate ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI )


<s> bool <ISA_LIT>MCInstrInfo :: isPrefix ( MCInstrInfo const & MCII , MCInst const & MCI ) { return <STR_LIT> == <ISA_LIT>MCInstrInfo :: getType ( MCII ,


<s> bool <ISA_LIT>MCInstrInfo :: isPrefix ( MCInstrInfo const & MCII , MCInst const & MCI ) { return <STR_LIT> == <ISA_LIT>MCInstrInfo :: getType ( MCII


<s> bool <ISA_LIT>MCInstrInfo :: isRestrictSlot1AOK ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ( F >> <STR_LIT>


<s> const uint64_t F = MCII . get ( MCI . getOpcode ( ) ) . TSFlags ; return ( ( F >> <STR_LIT> ) & <STR_LIT>


<s> bool <ISA_LIT>MCInstrInfo :: isSoloAX ( MCInstrInfo const & MCII ,


<s> bool <ISA_LIT>MCInstrInfo :: isSoloAX ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT>


<s> if ( MCI . size ( ) <= Index ) return Sentinal ; MCOperand const & MCO = MCI . getOperand ( Index ) ; if ( ! MCO . isExpr ( ) ) return Sentinal ; int64_t Value ; if ( ! MCO . getExpr ( ) -> evaluateAsAbsolute


<s> <ISA_LIT>MCExpr const & HExpr = cast < <ISA_LIT>MCExpr > ( Expr ) ; return HExpr . mustNotExtend


<s> bool <ISA_LIT>MCInstrInfo :: mustNotExtend ( MCExpr const & Expr


<s> if ( ! isPredicated ( MCII , MCI ) ) return { <NUM_LIT> , <NUM_LIT> , false } ; MCInstrDesc const & Desc = getDesc ( MCII , MCI ) ; for ( auto I = Desc . getNumDefs ( ) , N = Desc . getNumOperands ( ) ; I != N ; ++ I ) if ( Desc . OpInfo [ I ] . RegClass == <STR_LIT> ) return { MCI . getOperand ( I ) . getReg ( ) , I , isPredicatedTrue ( MCII , MCI ) } ; return { <NUM_LIT> , <NUM_LIT>


<s> for ( auto I = Desc . getNumDefs ( ) , N = Desc . getNumOperands ( ) ; I != N ; ++ I ) if ( Desc . OpInfo [ I ] . RegClass == <STR_LIT> ) return { MCI . getOperand ( I ) . getReg ( ) , I , isPredicatedTrue ( MCII , MCI ) } ; return { <NUM_LIT> , <NUM_LIT>


<s> bool <ISA_LIT>MCInstrInfo :: prefersSlot3 ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) .


<s> MCInst * Duplex = deriveDuplex ( Context , Candidate . iClass , * MCB . getOperand ( Candidate . packetIndexJ ) . getInst ( ) , * MCB . getOperand ( Candidate . packetIndexI ) . getInst ( ) ) ; assert ( Duplex != nullptr ) ; MCB . getOperand ( Candidate . packetIndexI ) . setInst ( Duplex ) ; MCB . erase ( MCB . begin (


<s> assert ( Candidate . packetIndexJ < MCB . size ( ) ) ; assert ( isBundle ( MCB ) ) ; MCInst * Duplex = deriveDuplex ( Context , Candidate . iClass , * MCB . getOperand ( Candidate . packetIndexJ ) . getInst ( ) , * MCB . getOperand ( Candidate . packetIndexI ) . getInst ( ) ) ; assert ( Duplex != nullptr ) ; MCB . getOperand ( Candidate . packetIndexI ) . setInst ( Duplex ) ; MCB . erase ( MCB . begin ( ) + Candidate .


<s> bool <ISA_LIT>MCInstrInfo :: s27_2_reloc ( MCExpr const & Expr ) { <ISA_LIT>MCExpr const * HExpr = dyn_cast < <ISA_LIT>MCExpr > ( & Expr ) ; if ( ! HExpr ) return false ; return HExpr -> s27_2_reloc (


<s> assert ( isBundle ( MCI ) ) ; MCOperand & Operand = MCI . getOperand ( <NUM_LIT>


<s> void <ISA_LIT>MCInstrInfo :: setMustExtend ( MCExpr const & Expr , bool Val ) { <ISA_LIT>MCExpr & HExpr = const_cast < <ISA_LIT>MCExpr & > ( cast < <ISA_LIT>MCExpr > (


<s> <ISA_LIT>MCExpr & HExpr = const_cast < <ISA_LIT>MCExpr & > ( cast < <ISA_LIT>MCExpr


<s> void <ISA_LIT>MCInstrInfo :: setMustNotExtend ( MCExpr const & Expr , bool Val ) { <ISA_LIT>MCExpr & HExpr = const_cast < <ISA_LIT>MCExpr & > ( cast < <ISA_LIT>MCExpr > ( Expr ) ) ; HExpr . setMustNotExtend ( Val )


<s> <ISA_LIT>MCExpr & HExpr = const_cast < <ISA_LIT>MCExpr & >


<s> assert ( isBundle ( MCI ) ) ; MCOperand & Operand = MCI


<s> assert ( isBundle ( MCI ) ) ; MCOperand & Operand = MCI . getOperand (


<s> <ISA_LIT>MCExpr & HExpr = const_cast < <ISA_LIT>MCExpr & > (

* cast < <ISA_LIT>MCExpr > ( & Expr ) ) ;


<s> <ISA_LIT>MCExpr & HExpr = const_cast < <ISA_LIT>MCExpr & > ( * cast < <ISA_LIT>MCExpr


<s> if ( Producer >= <STR_LIT> && Producer <= <STR_LIT> ) if ( Consumer >= <STR_LIT> && Consumer <= <STR_LIT> ) return ( Consumer - <STR_LIT> ) & <NUM_LIT> ; if ( Producer2 != <STR_LIT> ) return Consumer == Producer ; return <NUM_LIT>


<s> bool <ISA_LIT>MCInstrInfo :: IsReverseVecRegPair ( unsigned VecReg ) { return ( VecReg >= <STR_LIT> && VecReg <=


<s> bool <ISA_LIT>MCInstrInfo :: IsReverseVecRegPair ( unsigned VecReg ) { return ( VecReg >= <STR_LIT> && VecReg


<s> const unsigned ProdPairIndex = IsReverseVecRegPair ( Producer ) ? Producer - <STR_LIT> : Producer - <STR_LIT> ; const unsigned ConsumerSingleIndex = ( Consumer - <STR_LIT> ) >> <NUM_LIT> ; return ConsumerSingleIndex == ProdPairIndex


<s> bool <ISA_LIT>MCInstrInfo :: IsVecRegSingle ( unsigned VecReg ) { return ( VecReg >= <STR_LIT> && VecReg


<s> unsigned <ISA_LIT>MCInstrInfo :: SubregisterBit ( unsigned Consumer , unsigned Producer , unsigned Producer2 ) { if ( IsVecRegPair ( Producer ) && IsVecRegSingle ( Consumer ) ) return ( Consumer - <STR_LIT> ) & <NUM_LIT> ; if ( Producer2 != <STR_LIT> ) return Consumer == Producer ; return <NUM_LIT>


<s> if ( ! <ISA_LIT>DisableCompound ) <ISA_LIT>MCInstrInfo :: tryCompound ( MCII , STI , Context , MCB ) ; <ISA_LIT>MCShuffle ( Context , false , MCII , STI , MCB ) ; MCInst InstBundlePreDuplex = MCInst ( MCB ) ; if ( ! <ISA_LIT>DisableDuplex ) { SmallVector < DuplexCandidate , <NUM_LIT> > possibleDuplexes ; possibleDuplexes = <ISA_LIT>MCInstrInfo :: getDuplexPossibilties ( MCII , STI , MCB ) ; <ISA_LIT>MCShuffle ( Context , MCII , STI , MCB , possibleDuplexes ) ; } <ISA_LIT>MCInstrInfo :: padEndloop ( MCB , Context ) ; if ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) > HEXAGON_PACKET_SIZE


<s> int <ISA_LIT>MCInstrInfo :: getMaxValue ( MCInstrInfo const & MCII , MCInst const & MCI ) { const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; bool S = ( F >> <STR_LIT> ) & <STR_LIT> ; assert ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) ; if ( S ) return ( <NUM_LIT> << ( <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII , MCI ) - <NUM_LIT> ) ) - <NUM_LIT> ; return ( <NUM_LIT> << <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII ,


<s> assert ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) ; if ( S ) return ( <NUM_LIT> << ( <ISA_LIT>MCInstrInfo :: getExtentBits ( MCII


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; bool S = ( F >> <STR_LIT> ) & <STR_LIT> ; assert ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) ; if ( S ) return - ( <NUM_LIT> << ( <ISA_LIT>MCInstrInfo ::

getExtentBits ( MCII , MCI ) - <NUM_LIT> ) ) ;


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; bool S = ( F >> <STR_LIT> ) & <STR_LIT> ; assert ( <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: isExtended


<s> MCOperand const & MCO = MCI . getOperand ( O ) ; assert ( ( <ISA_LIT>MCInstrInfo :: isNewValue ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: hasNewValue ( MCII , MCI ) )


<s> assert ( ( <ISA_LIT>MCInstrInfo :: isNewValue ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: hasNewValue ( MCII , MCI ) ) && MCO . isReg ( ) ) ; return ( MCO


<s> for ( auto const & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCII , MCI ) ) { if ( <ISA_LIT>MCInstrInfo :: isDuplex ( MCII , I ) ) return true ; } return


<s> if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCI ) ) return false ; for ( const auto & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCI ) ) { if ( isImmext ( * I . getInst


<s> if ( Producer >= <STR_LIT> && Producer <= <STR_LIT> ) if ( Consumer >= <STR_LIT> &&

Consumer <= <STR_LIT> ) return ( Consumer - <STR_LIT> ) & <NUM_LIT> ;


<s> unsigned <ISA_LIT>MCInstrInfo :: SubregisterBit ( unsigned Consumer , unsigned Producer , unsigned Producer2 ) { if ( Producer >= <STR_LIT> && Producer <= <STR_LIT> ) if ( Consumer >= <STR_LIT> && Consumer <= <STR_LIT> )

return ( Consumer - <STR_LIT> ) & <NUM_LIT> ;


<s> return iterator_range < MCInst :: const_iterator > ( MCI . begin ( ) + bundleInstructionsOffset , MCI .


<s> int MaxValue = <ISA_LIT>MCInstrInfo :: getMaxValue ( MCII , MCI ) ; MCOperand const & MO = MCI . getOperand ( ExtOpNum ) ; if ( MO . isExpr ( ) ) return true ; assert ( MO . isImm (


<s> <ISA_LIT>MCExpr const * HExpr = llvm :: dyn_cast < <ISA_LIT>MCExpr > ( & Expr ) ; if ( ! HExpr ) return false ; return HExpr -> s27_2_reloc (


<s> if ( isConstExtended ( MCII , MCI ) || MustExtend ) addConstExtender


<s> if ( isConstExtended ( MCII , MCI ) || MustExtend ) addConstExtender ( Context ,


<s> else if ( ! <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) ) return false ; MCOperand const & MO = <ISA_LIT>MCInstrInfo :: getExtendableOperand ( MCII , MCI ) ; assert ( ! MO . isImm ( ) ) ; int64_t Value ; if ( ! MO . getExpr ( ) -> evaluateAsAbsolute ( Value ) ) return true ; int MinValue = <ISA_LIT>MCInstrInfo :: getMinValue ( MCII , MCI ) ; int MaxValue = <ISA_LIT>MCInstrInfo :: getMaxValue ( MCII , MCI ) ; return ( MinValue > Value || Value


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT>


<s> <ISA_LIT>MCChecker PerfCheck ( * BaseCheck , STI , false ) ; if ( canonicalizePacketImpl ( MCII , STI , Context , MCB , & PerfCheck ) ) return true ; <ISA_LIT>MCChecker ArchCheck ( * BaseCheck , * ArchSTI , true ) ; return canonicalizePacketImpl ( MCII , * ArchSTI , Context , MCB


<s> possibleDuplexes = <ISA_LIT>MCInstrInfo :: getDuplexPossibilties ( MCII , STI , MCB ) ; <ISA_LIT>MCShuffle ( Context , MCII , STI , MCB , possibleDuplexes ) ; } <ISA_LIT>MCInstrInfo :: padEndloop ( MCB , Context ) ; if ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) > HEXAGON_PACKET_SIZE ) { if ( Check ) Check -> reportError ( <STR_LIT> ) ; return false ; } CheckOk = Check ? Check -> check ( true ) : true ; if ( ! CheckOk ) return false ; <ISA_LIT>MCShuffle ( Context , true , MCII , STI


<s> const InstrItinerary * II = STI . getSchedModel ( ) . InstrItineraries ; int SchedClass = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . getSchedClass ( ) ; int Size = II [ SchedClass ] . LastStage -


<s> int Size = II [ SchedClass ] . LastStage - II [ SchedClass ] . FirstStage ; unsigned Stage = II [ SchedClass ] . LastStage - <NUM_LIT> ; if ( Size < <NUM_LIT> ) return <NUM_LIT> ; return ( ( Stage + <ISA_LIT>Stages ) -> getUnits (


<s> bool <ISA_LIT>MCInstrInfo :: isNewValueStore ( MCInstrInfo const & MCII


<s> MCInstrDesc const & Desc = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , Inst ) ; return Inst . getOperand ( I ) . isReg ( ) && Desc . OpInfo [ I ] . RegClass


<s> bool <ISA_LIT>MCInstrInfo :: isVector ( MCInstrInfo const & MCII , MCInst


<s> unsigned <ISA_LIT>MCInstrInfo :: packetSizeSlots ( MCSubtargetInfo const & STI ) { const bool IsTiny = STI . getFeatureBits ( )


<s> const bool IsTiny = STI . getFeatureBits ( ) [


<s> bool <ISA_LIT>MCInstrInfo :: requiresSlot ( MCSubtargetInfo const & STI , MCInst const & MCI ) { const unsigned OpCode = MCI . getOpcode ( ) ; const bool IsTiny = STI . getFeatureBits (


<s> MCInst const & MCI = * HMI . getInst ( ) ; if ( ! requiresSlot ( STI , MCI ) ) continue ; if ( isDuplex ( MCII , MCI ) ) slotsUsed += <NUM_LIT> ; else ++ slotsUsed ; } return


<s> unsigned <ISA_LIT>MCInstrInfo :: slotsConsumed ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst const & MCI ) { unsigned slotsUsed =


<s> if ( ! CheckOk ) return false ; if ( ! <ISA_LIT>DisableCompound ) <ISA_LIT>MCInstrInfo :: tryCompound ( MCII , STI , Context , MCB ) ; <ISA_LIT>MCShuffle ( false , MCII , STI , MCB ) ; MCInst InstBundlePreDuplex = MCInst ( MCB ) ; if ( ! <ISA_LIT>DisableDuplex ) { SmallVector < DuplexCandidate , <NUM_LIT> > possibleDuplexes ; possibleDuplexes = <ISA_LIT>MCInstrInfo :: getDuplexPossibilties ( MCII , STI , MCB ) ; <ISA_LIT>MCShuffle ( MCII , STI , Context , MCB , possibleDuplexes ) ; } <ISA_LIT>MCInstrInfo :: padEndloop ( MCB , Context ) ; if ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) > HEXAGON_PACKET_SIZE ) return false ; CheckOk = Check ? Check -> check


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; <STR_LIT> Target = static_cast < <STR_LIT> > ( ( F >> <STR_LIT> ) & <STR_LIT> ) ; switch ( Target ) { default : return <STR_LIT> ; case <STR_LIT> : return


<s> for ( const auto & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCI ) ) { auto MI = I . getInst ( ) ; if ( <ISA_LIT>MCInstrInfo :: isDuplex ( MCII , * MI ) ) return true ; } return


<s> for ( const auto & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCI ) ) { auto MI = I . getInst (


<s> <ISA_LIT>MCExpr const * HExpr = llvm :: dyn_cast < <ISA_LIT>MCExpr


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII


<s> MCI . addOperand ( MCOperand :: CreateInst ( nullptr )


<s> SanityCheckImplicitOperands ( MCI ) ; std :: bitset < <NUM_LIT> > Bits ( MCI . getOperand ( MCI . getNumOperands ( ) - <NUM_LIT> ) . getImm ( ) ) ; return Bits


<s> bool <ISA_LIT>MCInstrInfo :: isPacketBegin ( MCInst const


<s> bool <ISA_LIT>MCInstrInfo :: isPacketBegin ( MCInst const & MCI ) { std :: bitset < <NUM_LIT> > Bits ( GetImplicitBits ( MCI )


<s> std :: bitset < <NUM_LIT> > Bits ( GetImplicitBits ( MCI ) ) ; return Bits . test


<s> bool <ISA_LIT>MCInstrInfo :: isPacketEnd ( MCInst const


<s> void <ISA_LIT>MCInstrInfo :: resetPacket ( MCInst & MCI ) { setPacketBegin ( MCI , false


<s> void <ISA_LIT>MCInstrInfo :: SetImplicitBits ( MCInst & MCI , std :: bitset < <NUM_LIT> > Bits ) { SanityCheckImplicitOperands ( MCI ) ; MCI . getOperand ( MCI . getNumOperands ( ) - <NUM_LIT> ) . setImm


<s> std :: bitset < <NUM_LIT> > Bits ( GetImplicitBits ( MCI ) ) ; Bits . set ( packetBeginIndex , f


<s> void <ISA_LIT>MCInstrInfo :: setPacketEnd ( MCInst & MCI , bool f ) { std :: bitset < <NUM_LIT> > Bits ( GetImplicitBits ( MCI ) ) ; Bits . set (


<s> assert ( MCI . getOperand ( MCI . getNumOperands ( ) - <NUM_LIT> ) . isInst ( ) && <STR_LIT> ) ; assert ( MCI . getOperand ( MCI . getNumOperands ( ) - <NUM_LIT> )


<s> if ( ! CheckOk ) return false ; MCInst OrigMCB = MCB ; if ( ! <ISA_LIT>DisableCompound ) <ISA_LIT>MCInstrInfo :: tryCompound ( MCII , STI , Context , MCB ) ; <ISA_LIT>MCShuffle ( Context , false , MCII , STI , MCB ) ; const SmallVector < DuplexCandidate , <NUM_LIT> > possibleDuplexes = ( STI . getFeatureBits ( ) [ <STR_LIT> ] ) ? <ISA_LIT>MCInstrInfo :: getDuplexPossibilties ( MCII , STI , MCB ) : SmallVector < DuplexCandidate , <NUM_LIT> > ( ) ; <ISA_LIT>MCShuffle ( Context , MCII ,


<s> bool <ISA_LIT>MCInstrInfo :: IsABranchingInst ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI ,


<s> return ( ( <ISA_LIT>MCInstrInfo :: isInnerLoop ( MCB ) && ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) < HEXAGON_PACKET_INNER_SIZE ) ) || ( ( <ISA_LIT>MCInstrInfo :: isOuterLoop ( MCB

) && ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) < HEXAGON_PACKET_OUTER_SIZE ) ) ) ) ;


<s> MCOperand const & MCO = MCI . getOperand ( Index ) ; if ( ! MCO . isExpr ( ) ) return Sentinel ; int64_t Value ; if ( ! MCO . getExpr ( ) -> evaluateAsAbsolute ( Value ) ) return Sentinel ; return Value


<s> assert ( isBundle ( MCB ) ) ; while ( LoopNeedsPadding ( MCB ) ) MCB . addOperand ( MCOperand :: createInst ( new ( Context ) MCInst (


<s> MCInst * XMCI = new ( Context ) MCInst ( <ISA_LIT>MCInstrInfo :: deriveExtender ( MCII , MCI , exOp ) ) ; MCB . addOperand ( MCOperand :: createInst ( XMCI


<s> bool <ISA_LIT>MCInstrInfo :: canonicalizePacket ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCContext & Context , MCInst & MCB , <ISA_LIT>MCChecker * Check ) { if ( ! <ISA_LIT>DisableCompound ) <ISA_LIT>MCInstrInfo :: tryCompound ( MCII , Context , MCB ) ; bool CheckOk = Check ? Check -> check ( ) : true ; if ( ! CheckOk ) return false ; <ISA_LIT>MCShuffle ( MCII , STI ,


<s> Result . setOpcode ( <STR_LIT> ) ; Result . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return Result


<s> Result . addOperand ( MCOperand :: createImm ( <NUM_LIT> ) ) ; return


<s> XMI . setOpcode ( ( Desc . isBranch ( ) || Desc . isCall ( ) || <ISA_LIT>MCInstrInfo :: getType ( MCII , Inst ) == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; if ( MO . isImm ( ) ) XMI . addOperand ( MCOperand :: createImm ( MO . getImm ( ) & ( ~ <NUM_LIT> ) ) ) ; else if ( MO . isExpr ( ) ) XMI . addOperand ( MCOperand :: createExpr ( MO . getExpr (


<s> uint64_t const F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ( F >>


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI )


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc (


<s> MCInstrDesc const & <ISA_LIT>MCInstrInfo :: getDesc ( MCInstrInfo const & MCII , MCInst


<s> int <ISA_LIT>MCInstrInfo :: getMaxValue ( MCInstrInfo const & MCII , MCInst const & MCI ) { uint64_t const F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; unsigned isSigned = ( F >> <STR_LIT> ) & <STR_LIT> ; unsigned bits = ( F >> <STR_LIT> ) & <STR_LIT> ; if ( isSigned ) return ~ ( -


<s> unsigned isSigned = ( F >> <STR_LIT> ) & <STR_LIT> ; unsigned bits = ( F >> <STR_LIT> ) & <STR_LIT> ; if ( isSigned ) return ~ ( - <NUM_LIT>


<s> unsigned bits = ( F >> <STR_LIT> ) & <STR_LIT> ; if ( isSigned ) return - <NUM_LIT> << ( bits - <NUM_LIT> ) ; else return <NUM_LIT>


<s> char const * <ISA_LIT>MCInstrInfo :: getName ( MCInstrInfo const & MCII ,


<s> unsigned const O = ( F >> <STR_LIT> ) & <STR_LIT> ; MCOperand const & MCO = MCI . getOperand ( O ) ; assert ( ( <ISA_LIT>MCInstrInfo :: isNewValue ( MCII , MCI ) || <ISA_LIT>MCInstrInfo :: hasNewValue ( MCII , MCI ) ) && MCO . isReg ( ) ) ; return (


<s> unsigned <ISA_LIT>MCInstrInfo :: getType ( MCInstrInfo const & MCII , MCInst const


<s> bool <ISA_LIT>MCInstrInfo :: isCanon ( MCInstrInfo const & MCII , MCInst const & MCI ) { return ( ! <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . isPseudo ( ) && ! <ISA_LIT>MCInstrInfo :: isPrefix ( MCII ,

MCI ) && <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) != <STR_LIT> ) ;


<s> bool <ISA_LIT>MCInstrInfo :: isCanon ( MCInstrInfo const & MCII , MCInst const & MCI ) { return ( ! <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . isPseudo ( ) && ! <ISA_LIT>MCInstrInfo :: isPrefix ( MCII , MCI ) && <ISA_LIT>MCInstrInfo :: getType (


<s> bool <ISA_LIT>MCInstrInfo :: isCompound ( MCInstrInfo const & MCII , MCInst


<s> bool <ISA_LIT>MCInstrInfo :: isConstExtended ( MCInstrInfo const & MCII , MCInst const & MCI ) { if ( <ISA_LIT>MCInstrInfo :: isExtended ( MCII , MCI ) ) return true ; if ( ! <ISA_LIT>MCInstrInfo :: isExtendable ( MCII , MCI ) ) return false ; MCOperand const & MO = <ISA_LIT>MCInstrInfo :: getExtendableOperand ( MCII , MCI ) ; if ( isa < <ISA_LIT>MCExpr > ( MO . getExpr ( ) ) && <ISA_LIT>MCInstrInfo :: mustExtend ( *


<s> auto Op = MCI . getOpcode ( ) ; return ( Op == <STR_LIT> || Op == <STR_LIT> || Op == <STR_LIT> || Op ==


<s> return ( Op == <STR_LIT> || Op == <STR_LIT> || Op == <STR_LIT> || Op


<s> assert ( isBundle ( MCI ) ) ; auto Flags = MCI . getOperand ( <NUM_LIT> ) . getImm ( ) ; return ( Flags & memStoreReorderEnabledMask


<s> bool <ISA_LIT>MCInstrInfo :: isPrefix ( MCInstrInfo const & MCII , MCInst const &


<s> bool <ISA_LIT>MCInstrInfo :: isPrefix ( MCInstrInfo const & MCII , MCInst const & MCI ) { return ( <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) ==


<s> const uint64_t F = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . TSFlags ; return ( ( F >> <STR_LIT> ) &


<s> bool <ISA_LIT>MCInstrInfo :: isSoloAin1 ( MCInstrInfo const &


<s> while ( ( <ISA_LIT>MCInstrInfo :: isInnerLoop ( MCB ) && ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) < HEXAGON_PACKET_INNER_SIZE ) ) || ( ( <ISA_LIT>MCInstrInfo :: isOuterLoop ( MCB ) && ( <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) < HEXAGON_PACKET_OUTER_SIZE ) ) ) ) MCB . addOperand ( MCOperand :: createInst (


<s> if ( <ISA_LIT>MCInstrInfo :: getType ( MCII , MCI ) == <STR_LIT> ) return false ; unsigned SchedClass = <ISA_LIT>MCInstrInfo :: getDesc ( MCII , MCI ) . getSchedClass ( ) ; switch ( SchedClass ) { case <STR_LIT> :: ALU32_3op_tc_2_SLOT0123 : case <STR_LIT> ::


<s> <ISA_LIT>MCExpr const & HExpr = * llvm :: cast < <ISA_LIT>MCExpr > ( &


<s> <ISA_LIT>MCExpr const & HExpr = * llvm ::


<s> assert ( isBundle ( MCI ) ) ; MCOperand & Operand = MCI . getOperand ( <NUM_LIT> ) ; Operand . setImm ( Operand . getImm ( ) | memStoreReorderEnabledMask


<s> MCI . addOperand ( MCOperand :: CreateImm ( <NUM_LIT> ) ) ; MCI . addOperand ( MCOperand :: CreateInst (


<s> MCI . addOperand ( MCOperand :: CreateImm ( <NUM_LIT> ) ) ; MCI . addOperand ( MCOperand :: CreateInst


<s> const uint64_t F = getDesc ( ) . TSFlags ; return ( ( F >> <STR_LIT> )


<s> unsigned short <ISA_LIT>MCInst :: getCExtOpNum ( void ) const { const uint64_t F = getDesc ( ) . TSFlags ; return ( ( F >> <STR_LIT> )


<s> const MCInstrDesc & getDesc ( void ) const { return *


<s> unsigned bits = ( F >> <STR_LIT> ) & <STR_LIT> ; if ( isSigned ) return - <NUM_LIT> << ( bits - <NUM_LIT> ) ; else return <NUM_LIT>


<s> const uint64_t F = getDesc ( ) . TSFlags ; const unsigned O = ( F >> <STR_LIT> ) & <STR_LIT> ; const MCOperand & MCO = getOperand ( O ) ; assert ( ( isNewValue ( ) || hasNewValue ( ) ) && MCO . isReg ( ) ) ; return ( MCO


<s> <ISA_LIT>MCInst ( const MCInstrDesc & mcid ) : MCInst ( ) , MCID ( & mcid ) , packetStart

( <NUM_LIT> ) , packetEnd ( <NUM_LIT> ) { }


<s> <ISA_LIT>MCInst ( const MCInstrDesc & mcid ) : MCInst ( ) , MCID ( & mcid ) ,

packetStart ( <NUM_LIT> ) , packetEnd ( <NUM_LIT> ) { }


<s> bool <ISA_LIT>MCInst :: isCanon ( ) const { return ( ! getDesc ( ) . isPseudo ( ) && ! isPrefix (


<s> return ( ! getDesc ( ) . isPseudo ( ) &&

! isPrefix ( ) && getType ( ) != <STR_LIT> ) ;


<s> int MinValue = getMinValue ( ) ; int MaxValue = getMaxValue ( ) ; const MCOperand & MO = getOperand ( ExtOpNum ) ; if ( MO . isExpr ( ) ) return


<s> bool <ISA_LIT>MCInst :: isConstExtended ( void ) const { if ( isExtended ( ) ) return true ; if ( ! isExtendable ( ) ) return false ; short ExtOpNum = getCExtOpNum ( ) ; int MinValue = getMinValue ( ) ; int MaxValue = getMaxValue ( ) ; const MCOperand & MO = getOperand ( ExtOpNum ) ; if ( MO . isExpr ( ) ) return true ; assert ( MO . isImm ( ) && <STR_LIT> ) ; int ImmValue = MO


<s> bool <ISA_LIT>MCInst :: isExtended ( void ) const { const uint64_t F = getDesc ( ) . TSFlags ; return ( F >> <STR_LIT>


<s> const uint64_t F = getDesc ( ) . TSFlags ; return ( ( F >> <STR_LIT> ) & <STR_LIT>


<s> const uint64_t F = getDesc ( ) . TSFlags ; return ( ( F >> <STR_LIT> ) & <STR_LIT> )


<s> bool isPacketEnd ( ) const { return ( packetEnd )


<s> bool isPacketStart ( ) const { return ( packetStart


<s> bool isPacketStart ( ) const { return


<s> bool <ISA_LIT>MCInst :: isSolo ( ) const { const uint64_t F = getDesc ( ) .


<s> void resetPacket ( ) { setPacketStart ( false )


<s> void resetPacket ( ) { setPacketStart ( false


<s> void setDesc ( const MCInstrDesc & mcid


<s> void setDesc ( const MCInstrDesc & mcid ) { MCID = &


<s> void <ISA_LIT>MCInst :: SetImplicitBits ( MCInst & MCI ,


<s> std :: bitset < <NUM_LIT> > Bits ( GetImplicitBits ( * this ) ) ; Bits . set ( packetBeginIndex


<s> void setPacketEnd ( bool Y ) { packetEnd


<s> } else { if ( bundleSize == HEXAGON_PACKET_SIZE - <NUM_LIT> && fixupCount ) return false ; } if ( DisableShuffle ) return false ; <ISA_LIT>MCShuffler MCS ( MCII , STI , MCB , AddMI ) ; if ( ! MCS . reshuffleTo ( MCB ) ) { unsigned shuffleError = MCS . getError ( ) ; switch ( shuffleError ) { default : return false ; case <ISA_LIT>Shuffler


<s> } else if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) { DEBUG ( dbgs ( ) << <STR_LIT> ) ; return <ISA_LIT>Shuffler :: SHUFFLE_SUCCESS ; } bool doneShuffling = false ; unsigned shuffleError ; while ( possibleDuplexes . size ( ) > <NUM_LIT> && ( ! doneShuffling ) ) { DuplexCandidate duplexToTry = possibleDuplexes . pop_back_val ( ) ; MCInst Attempt ( MCB ) ; <ISA_LIT>MCInstrInfo :: replaceDuplex ( Context , Attempt , duplexToTry ) ; <ISA_LIT>MCShuffler MCS ( MCII , STI , Attempt


<s> MCB . setLoc ( Loc ) ; for ( auto & I : * this ) { MCInst const & MI = I . getDesc ( ) ; MCInst const * Extender = I . getExtender ( ) ; if ( Extender ) MCB . addOperand ( MCOperand :: createInst ( Extender ) ) ; MCB . addOperand ( MCOperand :: createInst


<s> <ISA_LIT>MCInstrInfo :: replaceDuplex ( Context , Attempt , duplexToTry ) ; <ISA_LIT>MCShuffler MCS ( Context , false , MCII , STI , Attempt ) ; if ( MCS . size ( ) == <NUM_LIT> ) { MCS . copyTo ( MCB ) ; return false ; } doneShuffling = MCS . reshuffleTo ( MCB ) ; if ( doneShuffling ) break ; } if ( ! doneShuffling


<s> bool doneShuffling = false ; while ( possibleDuplexes . size ( ) > <NUM_LIT> && ( ! doneShuffling ) ) { DuplexCandidate duplexToTry = possibleDuplexes . pop_back_val ( ) ; MCInst Attempt ( MCB ) ; <ISA_LIT>MCInstrInfo :: replaceDuplex ( Context , Attempt , duplexToTry ) ; <ISA_LIT>MCShuffler MCS ( Context , false , MCII , STI , Attempt ) ; if ( MCS . size ( ) == <NUM_LIT> ) { MCS . copyTo ( MCB ) ; return false ; } doneShuffling = MCS . reshuffleTo ( MCB ) ; if ( doneShuffling ) break ; } if ( ! doneShuffling ) { <ISA_LIT>MCShuffler MCS ( Context , false , MCII , STI , MCB ) ; doneShuffling = MCS . reshuffleTo ( MCB ) ; } return doneShuffling


<s> void <ISA_LIT>MCShuffler :: copyTo ( MCInst & MCB ) { MCB . clear ( ) ; MCB . addOperand ( MCOperand :: createImm ( BundleFlags ) ) ; for ( <ISA_LIT>Shuffler :: iterator I = begin ( ) ; I !=


<s> MCB . clear ( ) ; MCB . addOperand ( MCOperand :: createImm ( BundleFlags ) ) ; for ( <ISA_LIT>Shuffler :: iterator I = begin ( ) ; I != end ( ) ; ++ I ) { MCInst const & MI = I -> getDesc ( ) ; MCInst const * Extender = I -> getExtender ( ) ; if ( Extender ) MCB . addOperand ( MCOperand :: createInst ( Extender ) ) ; MCB . addOperand ( MCOperand :: createInst (


<s> } } else { if ( bundleSize == HEXAGON_PACKET_SIZE - <NUM_LIT> && fixupCount ) return false ; } if ( DisableShuffle ) return false ; unsigned maxBundleSize = ( <ISA_LIT>MCInstrInfo :: hasImmExt ( MCB ) ) ? HEXAGON_PACKET_SIZE : HEXAGON_PACKET_SIZE - <NUM_LIT> ; if ( bhasDuplex && bundleSize >= maxBundleSize ) return false ; <ISA_LIT>MCShuffler MCS ( MCII , STI , MCB , AddMI , false ) ; if ( ! MCS . reshuffleTo ( MCB ) ) { unsigned shuffleError = MCS . getError ( ) ; switch (


<s> bool llvm :: <ISA_LIT>MCShuffle ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , MCInst const & AddMI , int fixupCount ) { if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) return false ; unsigned int bundleSize = <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) ; if ( bundleSize >= HEXAGON_PACKET_SIZE ) return false ; bool bhasDuplex = <ISA_LIT>MCInstrInfo :: hasDuplex ( MCII , MCB ) ; if ( fixupCount >= <NUM_LIT> ) { if ( bhasDuplex ) { if ( bundleSize >= HEXAGON_PACKET_SIZE - <NUM_LIT> ) { return false ; } }


<s> assert ( ! <ISA_LIT>MCInstrInfo :: getDesc ( MCII , * I . getInst ( ) ) . isPseudo ( ) ) ; MCInst & MI = * const_cast < MCInst * > ( I . getInst ( ) ) ; if ( ! <ISA_LIT>MCInstrInfo :: isImmext ( MI ) ) { append ( MI , Extender , <ISA_LIT>MCInstrInfo :: getUnits ( MCII , STI , MI ) ) ; Extender =


<s> if ( <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) { if ( bInsertAtFront ) append ( AddMI , nullptr , <ISA_LIT>MCInstrInfo :: getUnits ( MCII , STI , AddMI ) ) ; MCInst const * Extender = nullptr ; for ( auto const & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCB ) ) { assert ( ! <ISA_LIT>MCInstrInfo :: getDesc ( MCII , * I . getInst ( )


<s> return false ; } else if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) { DEBUG ( dbgs ( ) << <STR_LIT> ) ; return false ; } bool doneShuffling = false ; while ( possibleDuplexes . size ( ) > <NUM_LIT> && ( ! doneShuffling ) ) { DuplexCandidate duplexToTry = possibleDuplexes . pop_back_val ( ) ; MCInst Attempt ( MCB ) ; <ISA_LIT>MCInstrInfo :: replaceDuplex ( Context , Attempt , duplexToTry ) ; <ISA_LIT>MCShuffler MCS ( Context , false , MCII , STI , Attempt ) ; if ( MCS . size ( ) ==


<s> return true ; } DEBUG ( MCB . dump ( ) ) ; return false


<s> <ISA_LIT>MCShuffler ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , const MCInst * AddMI , bool bInsertAtFront = false ) : <ISA_LIT>Shuffler ( MCII , STI ) { init ( MCB , AddMI


<s> bool immextPresent ( ) const { return


<s> <ISA_LIT>MCShuffler ( MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , MCInst const & AddMI , bool InsertAtFront ) : <ISA_LIT>Shuffler ( MCII , STI ) { init ( MCB , AddMI ,


<s> <ISA_LIT>MCShuffler ( MCContext & Context , bool ReportErrors , MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , MCInst const & AddMI , bool InsertAtFront ) : <ISA_LIT>Shuffler ( Context , ReportErrors , MCII , STI ) { init ( MCB , AddMI


<s> <ISA_LIT>MCShuffler ( MCContext & Context , bool ReportErrors , MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , MCInst const & AddMI , bool InsertAtFront ) : <ISA_LIT>Shuffler ( Context , ReportErrors , MCII , STI ) { init ( MCB , AddMI ,


<s> while ( possibleDuplexes . size ( ) > <NUM_LIT> && ( ! doneShuffling ) ) { DuplexCandidate duplexToTry = possibleDuplexes . pop_back_val ( ) ; MCInst Attempt ( MCB ) ; <ISA_LIT>MCInstrInfo :: replaceDuplex ( Context , Attempt , duplexToTry ) ; <ISA_LIT>MCShuffler MCS ( Context , false , MCII , STI , Attempt ) ; if ( MCS . size ( ) == <NUM_LIT> ) { MCS . copyTo ( MCB ) ; return false ; } doneShuffling = MCS . reshuffleTo ( MCB ) ; if ( doneShuffling ) break ; } if ( doneShuffling == false


<s> MCB . addOperand ( MCOperand :: createImm ( BundleFlags ) ) ; MCB . setLoc ( Loc ) ; for ( <ISA_LIT>Shuffler :: iterator I = begin ( ) ; I != end ( ) ; ++ I ) { MCInst const & MI = I -> getDesc ( ) ; MCInst const * Extender = I -> getExtender ( ) ; if ( Extender ) MCB . addOperand ( MCOperand :: createInst ( Extender ) ) ; MCB . addOperand ( MCOperand :: createInst


<s> if ( ! <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) return false ; unsigned int bundleSize = <ISA_LIT>MCInstrInfo :: bundleSize ( MCB ) ; if ( bundleSize >= HEXAGON_PACKET_SIZE ) return false ; bool bhasDuplex = <ISA_LIT>MCInstrInfo :: hasDuplex ( MCII , MCB ) ; if ( fixupCount >= <NUM_LIT> ) { if ( bhasDuplex ) { if ( bundleSize >= HEXAGON_PACKET_SIZE - <NUM_LIT> ) { return false ; } } else { return false ; } } else { if ( bundleSize == HEXAGON_PACKET_SIZE - <NUM_LIT> && fixupCount ) return false ; } if ( DisableShuffle


<s> <ISA_LIT>MCShuffler ( MCContext & Context , bool Fatal , MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , MCInst const & AddMI , bool InsertAtFront ) : <ISA_LIT>Shuffler ( Context ,


<s> <ISA_LIT>MCShuffler ( MCContext & Context , bool Fatal , MCInstrInfo const & MCII , MCSubtargetInfo const & STI , MCInst & MCB , MCInst const & AddMI , bool

InsertAtFront ) : <ISA_LIT>Shuffler ( Context , Fatal , MCII , STI ) {


<s> if ( <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) { if ( bInsertAtFront ) append ( AddMI , nullptr , <ISA_LIT>MCInstrInfo :: getUnits ( MCII , STI , AddMI ) ) ; MCInst const * Extender = nullptr ; for ( auto const & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCB ) ) { assert ( ! <ISA_LIT>MCInstrInfo :: getDesc ( MCII , * I . getInst ( ) ) . isPseudo ( ) ) ; MCInst & MI = * const_cast < MCInst * > ( I . getInst ( ) ) ; if ( ! <ISA_LIT>MCInstrInfo :: isImmext ( MI ) ) { append ( MI , Extender , <ISA_LIT>MCInstrInfo :: getUnits ( MCII , STI , MI ) ) ; Extender = nullptr ; } else Extender = & MI ; } if ( ! bInsertAtFront ) append ( AddMI , nullptr , <ISA_LIT>MCInstrInfo :: getUnits ( MCII , STI , AddMI ) ) ; } Loc = MCB . getLoc ( ) ; BundleFlags = MCB . getOperand ( <NUM_LIT> ) . getImm (


<s> if ( <ISA_LIT>MCInstrInfo :: isBundle ( MCB ) ) { if ( bInsertAtFront ) append ( AddMI , nullptr , <ISA_LIT>MCInstrInfo :: getUnits ( MCII , STI , AddMI ) ) ; MCInst const * Extender = nullptr ; for ( auto const & I : <ISA_LIT>MCInstrInfo :: bundleInstructions ( MCB ) ) { assert ( ! <ISA_LIT>MCInstrInfo :: getDesc ( MCII , * I . getInst ( ) ) . isPseudo ( ) ) ; MCInst & MI = * const_cast < MCInst * > ( I . getInst ( ) ) ; if ( ! <ISA_LIT>MCInstrInfo :: isImmext


<s> LLVM_DEBUG ( MCB . dump ( ) ) ; return false


<s> bool <ISA_LIT>MCShuffler :: reshuffleTo ( MCInst & MCB ) { if ( shuffle ( ) ) { copyTo ( MCB


<s> static bool LLVM_ATTRIBUTE_UNUSED checkFeature ( MCSubtargetInfo * STI , uint64_t F ) { uint64_t FB = STI -> getFeatureBits ( ) . to_ullong ( ) ; return ( FB & ( <NUM_LIT> << F ) )


<s> static bool LLVM_ATTRIBUTE_UNUSED checkFeature ( MCSubtargetInfo *


<s> static void LLVM_ATTRIBUTE_UNUSED clearFeature ( MCSubtargetInfo * STI , uint64_t F ) { uint64_t FB = STI -> getFeatureBits ( ) . to_ullong (


<s> for ( unsigned F : { ExtensionHVXV60 , ExtensionHVXV62 , ExtensionHVXV65 , ExtensionHVXV66 } ) { if ( ! FB . test ( F ) ) continue ; HasHvxVer = true ; UseHvx = true ; break ; } if ( ! UseHvx || HasHvxVer ) return FB ; switch ( CpuArch ) { case ArchV66 : FB . set ( ExtensionHVXV66 ) ; LLVM_FALLTHROUGH ; case


<s> static MCAsmInfo * create<ISA_LIT>MCAsmInfo ( const MCRegisterInfo & MRI , const Triple & TT ) { MCAsmInfo * MAI = new <ISA_LIT>MCAsmInfo ( TT ) ; MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( nullptr , MRI . getDwarfRegNum ( <STR_LIT> , true ) , <NUM_LIT> ) ; MAI -> addInitialFrameState ( Inst )


<s> MCSubtargetInfo * <ISA_LIT>_MC :: create<ISA_LIT>MCSubtargetInfo ( const Triple & TT , StringRef CPU , StringRef FS ) { std :: pair < std :: string , std :: string > Features = selectCPUAndFS ( CPU , FS ) ; StringRef CPUName = Features . first ; StringRef ArchFS = Features . second ; if ( ! isCPUValid ( CPUName . str ( ) ) ) { errs ( ) << <STR_LIT> << CPUName . str ( ) . c_str ( ) << <STR_LIT> ; return nullptr ; } MCSubtargetInfo * X = create<ISA_LIT>MCSubtargetInfoImpl ( TT , CPUName , ArchFS ) ; if ( <ISA_LIT>DisableDuplex ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . set ( <STR_LIT> ,


<s> void EmitCommonSymbolSorted ( MCSymbol * Symbol , uint64_t Size , unsigned ByteAlignment , unsigned AccessSize ) override { <ISA_LIT>MCELFStreamer & <ISA_LIT>ELFStreamer = static_cast < <ISA_LIT>MCELFStreamer & > ( getStreamer ( ) ) ; <ISA_LIT>ELFStreamer . <ISA_LIT>MCEmitCommonSymbol ( Symbol , Size , ByteAlignment ,


<s> <ISA_LIT>MCELFStreamer & <ISA_LIT>ELFStreamer = static_cast < <ISA_LIT>MCELFStreamer & > ( getStreamer ( ) ) ; <ISA_LIT>ELFStreamer . <ISA_LIT>MCEmitLocalCommonSymbol ( Symbol ,


<s> assert ( Extended . isExpr ( ) ) ; int64_t Value ; if ( ! Extended . getExpr ( ) -> evaluateAsAbsolute ( Value


<s> bool evaluateBranch ( MCInst const & Inst , uint64_t Addr , uint64_t Size , uint64_t & Target ) const override { if ( ! <ISA_LIT>MCInstrInfo :: isExtendable ( * Info , Inst ) ) return false ; auto const & Extended ( <ISA_LIT>MCInstrInfo :: getExtendableOperand ( * Info , Inst ) ) ; assert ( Extended . isExpr ( ) ) ; int64_t Value ; if ( ! Extended . getExpr ( ) -> evaluateAsAbsolute ( Value ) ) return false ; Target = Value


<s> static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V66 } , } ; auto F = ElfFlags . find ( STI . getCPU ( ) ) ; assert ( F != ElfFlags . end ( ) && <STR_LIT> ) ; return F -> second


<s> if ( MV60 ) return <STR_LIT> ; if ( MV62 ) return <STR_LIT> ; if ( MV65 ) return <STR_LIT> ; if ( MV66 ) return <STR_LIT> ; return


<s> void prettyPrintAsm ( MCInstPrinter & InstPrinter , raw_ostream & OS , const MCInst & Inst , const MCSubtargetInfo & STI ) override { assert ( <ISA_LIT>MCInstrInfo :: isBundle ( Inst ) ) ; assert ( <ISA_LIT>MCInstrInfo :: bundleSize ( Inst ) <= HEXAGON_PACKET_SIZE ) ; std :: string Buffer ; { raw_string_ostream TempStream ( Buffer ) ; InstPrinter . printInst ( & Inst , TempStream , <STR_LIT> , STI ) ; } StringRef Contents ( Buffer ) ; auto PacketBundle = Contents . rsplit ( '\n' ) ; auto HeadTail = PacketBundle . first . split ( '\n' ) ; StringRef Separator = <STR_LIT> ; StringRef Indent = <STR_LIT> ; OS << <STR_LIT> ; while ( ! HeadTail . first . empty ( ) ) { StringRef


<s> std :: pair < std :: string , std :: string > Result ; Result . first = <ISA_LIT>_MC :: select<ISA_LIT>CPU (


<s> std :: pair < std :: string , std :: string > selectCPUAndFS ( StringRef CPU , StringRef FS ) { std :: pair < std :: string , std :: string > Result ; Result . first = <ISA_LIT>_MC :: select<ISA_LIT>CPU ( CPU ) ; Result . second = select<ISA_LIT>FS ( Result . first , FS ) ; return Result


<s> Result . push_back ( StringSwitch < StringRef > ( CPU ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) ) ; break ; } case <STR_LIT> :: NoArch : break ; } return join ( Result . begin ( ) , Result . end (


<s> MCAsmInfo * MAI = new <ISA_LIT>MCAsmInfo ( TT ) ; MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( nullptr , <STR_LIT> , <NUM_LIT> ) ; MAI -> addInitialFrameState ( Inst ) ; return


<s> if ( RM == Reloc :: Default ) RM = Reloc :: Static ; X -> initMCCodeGenInfo ( RM , CM , OL ) ; return


<s> MCCodeGenInfo * X = new MCCodeGenInfo ( ) ; if ( RM == Reloc :: Default ) RM = Reloc :: Static ; X -> initMCCodeGenInfo ( RM , CM , OL ) ; return X


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) { if ( SyntaxVariant == <NUM_LIT> ) return ( new <ISA_LIT>InstPrinter ( MAI , MII , MRI ) ) ; else return


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII


<s> MCInstrInfo * X = new MCInstrInfo ( ) ; Init<ISA_LIT>MCInstrInfo ( X


<s> static MCRegisterInfo * create<ISA_LIT>MCRegisterInfo (


<s> static MCSubtargetInfo * create<ISA_LIT>MCSubtargetInfo ( const Triple & TT , StringRef CPU ,


<s> return new <ISA_LIT>TargetELFStreamer ( S , STI


<s> static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS ,

MCInstPrinter * InstPrint , bool IsVerboseAsm ) {


<s> static MCStreamer * createMCStreamer ( Triple const & T , MCContext & Context , MCAsmBackend & MAB , raw_pwrite_stream & OS , MCCodeEmitter * Emitter , bool RelaxAll ) { return create<ISA_LIT>ELFStreamer ( Context , MAB , OS ,


<s> static MCStreamer * createMCStreamer ( Triple const & T , MCContext & Context , MCAsmBackend & MAB , raw_pwrite_stream

& OS , MCCodeEmitter * Emitter , bool RelaxAll ) {


<s> <ISA_LIT>TargetELFStreamer ( MCStreamer & S , MCSubtargetInfo const & STI ) : <ISA_LIT>TargetStreamer ( S ) { auto Bits = STI . getFeatureBits ( ) ; unsigned Flags ; if ( Bits . to_ullong ( ) & llvm :: <STR_LIT> ) Flags = ELF :: EF_HEXAGON_MACH_V5 ; else Flags =


<s> RegisterMCAsmInfoFn X ( The<ISA_LIT>Target , create<ISA_LIT>MCAsmInfo ) ; TargetRegistry :: RegisterMCCodeGenInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeGenInfo ) ; TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCAsmBackend ( The<ISA_LIT>Target , create<ISA_LIT>AsmBackend ) ; TargetRegistry :: RegisterELFStreamer ( The<ISA_LIT>Target


<s> raw_string_ostream TempStream ( Buffer ) ; InstPrinter . printInst ( & Inst , TempStream , <STR_LIT> , STI ) ; } StringRef Contents ( Buffer ) ; auto PacketBundle = Contents . rsplit ( '\n' ) ; auto HeadTail = PacketBundle . first . split ( '\n' ) ; StringRef Separator = <STR_LIT> ; StringRef Indent = <STR_LIT> ; OS << <STR_LIT> ; while ( ! HeadTail . first . empty ( ) ) { StringRef InstTxt ; auto Duplex = HeadTail . first . split (


<s> if ( CPU . empty ( ) ) CPU = <STR_LIT> ; return CPU


<s> MCELFStreamer * ES = new MCELFStreamer ( Context , MAB , OS , CE ) ; return


<s> MCELFStreamer * ES = new MCELFStreamer ( Context , MAB , OS , CE ) ; return ES


<s> static MCCodeGenInfo * create<ISA_LIT>MCCodeGenInfo ( StringRef TT , Reloc :: Model RM , CodeModel :: Model CM ,


<s> static MCInstrInfo * create<ISA_LIT>MCInstrInfo ( ) { MCInstrInfo * X = new MCInstrInfo ( ) ; Init<ISA_LIT>MCInstrInfo ( X )


<s> MCInstrInfo * X = new MCInstrInfo ( ) ; Init<ISA_LIT>MCInstrInfo ( X )


<s> Init<ISA_LIT>MCRegisterInfo ( X , <STR_LIT> ) ; return


<s> MCStreamer * ES = create<ISA_LIT>ELFStreamer ( Context , MAB , OS , Emitter , RelaxAll ) ; new MCTargetStreamer ( * ES ) ; return


<s> static MCStreamer * createMCStreamer ( Target const & T , StringRef TT , MCContext & Context , MCAsmBackend & MAB , raw_ostream & OS , MCCodeEmitter * Emitter , MCSubtargetInfo const & STI , bool RelaxAll ) { MCStreamer * ES = create<ISA_LIT>ELFStreamer ( Context , MAB , OS , Emitter , RelaxAll ) ; new MCTargetStreamer (


<s> TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCInstPrinter ( The<ISA_LIT>Target , create<ISA_LIT>MCInstPrinter ) ; TargetRegistry :: RegisterMCAsmBackend (


<s> TargetRegistry :: RegisterMCCodeGenInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeGenInfo ) ; TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target


<s> TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter (


<s> CpuArch = F ; break ; } bool UseHvx = false ; for ( unsigned F : { ExtensionHVX , ExtensionHVX64B , ExtensionHVX128B } ) { if ( ! FB . test ( F ) ) continue ; UseHvx = true ; break ; } bool HasHvxVer = false ; for ( unsigned F : { ExtensionHVXV60 , ExtensionHVXV62 , ExtensionHVXV65 , ExtensionHVXV66 , ExtensionHVXV67 , ExtensionHVXV68 , ExtensionHVXV69 } ) { if ( ! FB . test ( F ) ) continue ; HasHvxVer = true ; UseHvx = true ; break ; } if ( ! UseHvx || HasHvxVer ) return FB ; switch ( CpuArch ) { case ArchV69 : FB . set ( ExtensionHVXV69 ) ; LLVM_FALLTHROUGH ; case ArchV68 : FB . set ( ExtensionHVXV68 ) ; LLVM_FALLTHROUGH ; case ArchV67 : FB . set ( ExtensionHVXV67 ) ; LLVM_FALLTHROUGH ; case ArchV66 : FB . set ( ExtensionHVXV66 ) ; LLVM_FALLTHROUGH ; case ArchV65 : FB . set ( ExtensionHVXV65 ) ; LLVM_FALLTHROUGH ; case ArchV62 : FB . set ( ExtensionHVXV62 ) ; LLVM_FALLTHROUGH ; case ArchV60


<s> bool UseHvx = false ; for ( unsigned F : { ExtensionHVX , ExtensionHVX64B , ExtensionHVX128B } ) { if ( ! FB . test ( F ) ) continue ; UseHvx = true ; break ; } bool HasHvxVer = false ; for ( unsigned F : { ExtensionHVXV60 , ExtensionHVXV62 , ExtensionHVXV65 , ExtensionHVXV66 , ExtensionHVXV67 , ExtensionHVXV68 , ExtensionHVXV69 } ) { if ( ! FB . test ( F ) ) continue ; HasHvxVer = true ; UseHvx = true ; break ; } if ( ! UseHvx || HasHvxVer ) return FB ; switch ( CpuArch ) { case ArchV69 : FB . set ( ExtensionHVXV69 ) ; LLVM_FALLTHROUGH ; case ArchV68 : FB . set ( ExtensionHVXV68 ) ; LLVM_FALLTHROUGH ; case ArchV67 : FB . set ( ExtensionHVXV67 ) ; LLVM_FALLTHROUGH ; case ArchV66 : FB . set ( ExtensionHVXV66 ) ; LLVM_FALLTHROUGH ; case ArchV65 : FB . set ( ExtensionHVXV65 ) ; LLVM_FALLTHROUGH ; case ArchV62 : FB . set ( ExtensionHVXV62 ) ; LLVM_FALLTHROUGH ; case ArchV60 : FB . set ( ExtensionHVXV60 )


<s> if ( ! isCPUValid ( CPUName . str ( ) ) ) { errs ( ) << <STR_LIT> << CPUName . str ( ) . c_str ( ) << <STR_LIT> ; return nullptr ; } if ( checkFeature ( X , <STR_LIT> ) && ArchFS . find ( <STR_LIT> , <NUM_LIT> ) == std :: string :: npos ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . set ( <STR_LIT> ) ) ; } if ( <ISA_LIT>DisableDuplex ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . reset ( <STR_LIT> ) ) ; } X -> setFeatureBits ( completeHVXFeatures ( X -> getFeatureBits ( ) ) ) ; const bool ZRegOnDefault = ( CPUName == <STR_LIT> ) || ( CPUName == <STR_LIT> ) ; if ( ZRegOnDefault )


<s> return StringSwitch < unsigned > ( STI . getCPU ( ) ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V5 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V5 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V55 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V60 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V62 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V65 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V66 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V67 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V67T )

. Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V68 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V69 ) ;


<s> return StringSwitch < unsigned > ( STI . getCPU ( ) ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V5 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V5 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V55 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V60 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V62 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V65 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V66 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V67 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V67T ) . Case

( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V68 ) . Case ( <STR_LIT> , llvm :: ELF :: EF_HEXAGON_MACH_V69 ) ;


<s> if ( MV55 ) return <STR_LIT> ; if ( MV60 ) return <STR_LIT> ; if ( MV62 ) return <STR_LIT> ; if ( MV65 ) return <STR_LIT> ; if ( MV66 ) return <STR_LIT> ; if ( MV67 ) return <STR_LIT> ; if ( MV67T ) return <STR_LIT> ; if ( MV68 ) return <STR_LIT> ; if ( MV69 )


<s> static bool isCPUValid ( StringRef CPU ) { return <STR_LIT> ( CPU ) . hasValue


<s> break ; case <STR_LIT> :: V60 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V62 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V65 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V66 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V67 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V68 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V69 : Result . push_back ( <STR_LIT>


<s> MCRegisterInfo * X = new MCRegisterInfo ( ) ; Init<ISA_LIT>MCRegisterInfo ( X ,


<s> static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * IP , bool IsVerboseAsm ) { return new <ISA_LIT>TargetAsmStreamer ( S , OS


<s> static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * IP , bool IsVerboseAsm ) { return new <ISA_LIT>TargetAsmStreamer ( S , OS ,


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo


<s> void LLVMInitialize<ISA_LIT>TargetMC ( ) { RegisterMCAsmInfoFn X ( The<ISA_LIT>Target , create<ISA_LIT>MCAsmInfo ) ; TargetRegistry :: RegisterMCCodeGenInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeGenInfo ) ; TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target ,


<s> TargetRegistry :: RegisterMCCodeGenInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeGenInfo ) ; TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target ,


<s> return nullptr ; } MCSubtargetInfo * X = create<ISA_LIT>MCSubtargetInfoImpl ( TT , CPUName , ArchFS ) ; if ( X -> getFeatureBits ( ) [ <STR_LIT> ] ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . set ( <STR_LIT> )


<s> static MCStreamer * createMCStreamer ( Triple const & T , MCContext & Context , std :: unique_ptr < MCAsmBackend > && MAB , raw_pwrite_stream & OS , std :: unique_ptr < MCCodeEmitter > && Emitter , bool RelaxAll ) { return create<ISA_LIT>ELFStreamer ( T , Context , std :: move ( MAB ) , OS ,


<s> return create<ISA_LIT>ELFStreamer ( T , Context , std :: move ( MAB ) , OS , std ::


<s> { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V4 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , } ; auto F = ElfFlags . find ( STI . getCPU ( ) ) ; assert ( F != ElfFlags . end ( )


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V4 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , } ; auto F = ElfFlags . find ( STI . getCPU ( )


<s> if ( <ISA_LIT>V55ArchVariant ) return <STR_LIT> ; if ( <ISA_LIT>V60ArchVariant )


<s> unsigned llvm :: <ISA_LIT>GetLastSlot ( ) { return <STR_LIT>


<s> <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , } ; return std :: find ( table . begin ( ) , table . end ( ) , CPU ) !=


<s> static bool isCPUValid ( std :: string CPU ) { std :: vector < std :: string > table { <STR_LIT> , <STR_LIT> , <STR_LIT> ,


<s> StringRef <ISA_LIT>_MC :: Parse<ISA_LIT>Triple ( const Triple & TT , StringRef CPU ) { StringRef CPUName = <ISA_LIT>_MC :: select<ISA_LIT>CPU ( TT , CPU ) ; StringRef FS =


<s> if ( ! ArchV . empty ( ) && ! CPU . empty ( ) ) { if ( ArchV != CPU ) report_fatal_error ( <STR_LIT> ) ; return CPU ; } if ( ArchV . empty ( ) ) { if ( CPU . empty (


<s> return CPU ; } if ( ArchV . empty ( ) ) { if ( CPU . empty ( ) ) CPU =


<s> MCSubtargetInfo * X = create<ISA_LIT>MCSubtargetInfoImpl ( TT , CPUName , ArchFS ) ; if ( X -> getFeatureBits ( ) [ <STR_LIT> ] ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . set ( <STR_LIT> ) ) ; } return X


<s> return create<ISA_LIT>ELFStreamer ( T , Context , MAB ,


<s> MCCodeGenInfo * X = new MCCodeGenInfo ( ) ; X -> initMCCodeGenInfo ( RM , CM , OL ) ; return


<s> if ( <ISA_LIT>V5ArchVariant ) return <STR_LIT> ; if ( <ISA_LIT>V55ArchVariant )


<s> MachineLocation Dst ( MachineLocation :: VirtualFP ) ; MachineLocation Src ( <STR_LIT> , <NUM_LIT> ) ; MAI -> addInitialFrameState ( <NUM_LIT> , Dst , Src ) ; return MAI


<s> static MCCodeGenInfo * create<ISA_LIT>MCCodeGenInfo ( const Triple & TT , Reloc :: Model RM , CodeModel ::


<s> static MCAsmInfo * create<ISA_LIT>MCAsmInfo ( const MCRegisterInfo & MRI , const Triple & TT , const MCTargetOptions & Options ) { MCAsmInfo * MAI = new <ISA_LIT>MCAsmInfo ( TT


<s> MCAsmInfo * MAI = new <ISA_LIT>MCAsmInfo ( TT ) ; MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( nullptr , <STR_LIT> , <NUM_LIT> ) ; MAI -> addInitialFrameState ( Inst ) ; return


<s> Init<ISA_LIT>MCSubtargetInfo ( X , TT , CPU , FS ) ; return


<s> if ( X != nullptr && ( CPUName == <STR_LIT> ) ) addArchSubtarget ( X , ArchFS ) ; if ( CPU . equals ( <STR_LIT> ) ) exit ( <NUM_LIT> ) ; if ( ! isCPUValid ( CPUName . str ( ) ) ) { errs ( ) << <STR_LIT> << CPUName . str ( ) . c_str ( ) << <STR_LIT> ; return nullptr ; } if ( <ISA_LIT>DisableDuplex ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . reset ( <STR_LIT> ) ) ; } X -> setFeatureBits ( completeHVXFeatures ( X -> getFeatureBits ( ) )


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V66 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67T } , } ; auto F = ElfFlags . find ( STI . getCPU ( ) ) ; assert ( F != ElfFlags . end ( ) && <STR_LIT> ) ; return F -> second


<s> if ( MV66 ) return <STR_LIT> ; if ( MV67 ) return <STR_LIT> ; if ( MV67T


<s> break ; case <STR_LIT> :: V65 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V66 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: V67 : Result . push_back ( <STR_LIT> ) ; break ; case <STR_LIT> :: Generic : { Result . push_back ( StringSwitch < StringRef > ( CPU ) . 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> ) ) ; break ; } case <STR_LIT>


<s> void LLVMInitialize<ISA_LIT>TargetMC ( ) { RegisterMCAsmInfoFn X ( The<ISA_LIT>Target , create<ISA_LIT>MCAsmInfo ) ; TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCAsmBackend ( The<ISA_LIT>Target , create<ISA_LIT>AsmBackend ) ; TargetRegistry :: RegisterELFStreamer ( The<ISA_LIT>Target ,


<s> static MCCodeGenInfo * create<ISA_LIT>MCCodeGenInfo ( StringRef TT , Reloc :: Model RM , CodeModel :: Model CM , CodeGenOpt :: Level OL ) { MCCodeGenInfo * X = new MCCodeGenInfo


<s> static MCCodeGenInfo * create<ISA_LIT>MCCodeGenInfo ( StringRef TT , Reloc :: Model RM , CodeModel :: Model CM , CodeGenOpt :: Level OL ) { MCCodeGenInfo * X = new MCCodeGenInfo ( ) ; X -> initMCCodeGenInfo ( Reloc :: Static , CM , OL ) ; return X


<s> TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCSubtargetInfo


<s> static MCSubtargetInfo * create<ISA_LIT>MCSubtargetInfo ( const Triple & TT , StringRef CPU ,


<s> TargetRegistry :: RegisterMCSubtargetInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCAsmBackend ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>AsmBackend ) ; TargetRegistry :: RegisterELFStreamer ( getThe<ISA_LIT>Target ( ) , createMCStreamer ) ; TargetRegistry :: RegisterAsmTargetStreamer ( getThe<ISA_LIT>Target ( ) , createMCAsmTargetStreamer ) ; TargetRegistry :: RegisterMCInstPrinter ( getThe<ISA_LIT>Target ( )


<s> TargetRegistry :: RegisterMCSubtargetInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCAsmBackend ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>AsmBackend ) ; TargetRegistry :: RegisterELFStreamer ( getThe<ISA_LIT>Target ( ) , createMCStreamer ) ; TargetRegistry :: RegisterAsmTargetStreamer ( getThe<ISA_LIT>Target ( ) , createMCAsmTargetStreamer


<s> static MCAsmInfo * create<ISA_LIT>MCAsmInfo ( const MCRegisterInfo & MRI , StringRef TT ) { MCAsmInfo * MAI = new <ISA_LIT>MCAsmInfo ( TT ) ; MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( <NUM_LIT> , <STR_LIT>


<s> MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( <NUM_LIT> , <STR_LIT> , <NUM_LIT> ) ; MAI -> addInitialFrameState ( Inst ) ; return


<s> break ; } bool UseHvx = false ; for ( unsigned F : { ExtensionHVX , ExtensionHVX64B , ExtensionHVX128B , ExtensionHVXDbl } ) { if ( ! FB . test ( F ) ) continue ; UseHvx = true ; break ; } bool HasHvxVer = false ; for ( unsigned F : { ExtensionHVXV60 , ExtensionHVXV62 , ExtensionHVXV65 } ) { if ( ! FB . test ( F ) ) continue ; HasHvxVer =


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V4 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 }

, { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , } ;


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V4 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , } ; auto F = ElfFlags . find ( STI . getCPU ( ) ) ; assert ( F != ElfFlags . end ( ) && <STR_LIT>


<s> if ( MV60 ) return <STR_LIT> ; if ( MV62 ) return <STR_LIT> ; if ( MV65 ) return


<s> if ( MV5 ) return <STR_LIT> ; if ( MV55 ) return <STR_LIT> ; if ( MV60 ) return <STR_LIT> ; if ( MV62 ) return <STR_LIT> ; if ( MV65 )


<s> static bool isCPUValid ( std :: string CPU ) { std :: vector < std :: string > table { <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> ,


<s> std :: vector < std :: string > table { <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT>


<s> std :: string Buffer ; { raw_string_ostream TempStream ( Buffer ) ; InstPrinter . printInst ( & Inst , TempStream , <STR_LIT> , STI ) ; } StringRef Contents ( Buffer ) ; auto PacketBundle = Contents . rsplit ( '\n' ) ; auto HeadTail = PacketBundle . first . split ( '\n' ) ; StringRef Separator = <STR_LIT> ; StringRef Indent = <STR_LIT> ; OS << <STR_LIT> ; while ( ! HeadTail . first . empty ( ) ) { StringRef InstTxt ; auto Duplex = HeadTail . first . split ( '\v' ) ; if ( ! Duplex . second . empty ( ) ) { OS << Indent << Duplex . first << Separator ; InstTxt = Duplex . second ; } else if ( ! HeadTail . first . trim ( ) . startswith ( <STR_LIT> ) ) { InstTxt = Duplex . first ; } if ( ! InstTxt . empty ( ) ) OS << Indent << InstTxt << Separator ; HeadTail = HeadTail . second . split ( '\n' ) ; } if ( <ISA_LIT>MCInstrInfo :: isMemReorderDisabled ( Inst ) ) OS << <STR_LIT> << PacketBundle . second ; else OS << <STR_LIT> <<


<s> break ; case <STR_LIT> :: V5 : { Result . push_back ( StringSwitch < StringRef > ( CPU ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) ) ; break ; } case <STR_LIT> :: V4 : break ; } return join ( Result . begin ( ) , Result . end ( ) ,


<s> return std :: find ( table . begin ( ) , table .


<s> if ( ! FB . test ( F ) ) continue ; CpuArch = F ; break ; } bool UseHvx = false ; for ( unsigned F : { ExtensionHVX , ExtensionHVX64B , ExtensionHVX128B } ) { if ( ! FB . test ( F ) ) continue ; UseHvx = true ; break ; } bool HasHvxVer = false ; for ( unsigned F : { ExtensionHVXV60 , ExtensionHVXV62 , ExtensionHVXV65 } ) { if ( ! FB . test ( F ) ) continue ; HasHvxVer = true ; UseHvx = true ; break ; } if ( ! UseHvx || HasHvxVer ) return FB ; switch ( CpuArch


<s> static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , {

<STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , } ;


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , } ; auto F = ElfFlags . find ( STI . getCPU ( ) ) ; assert ( F != ElfFlags . end ( ) && <STR_LIT> ) ; return F -> second


<s> if ( MV55 ) return <STR_LIT> ; if ( MV60 ) return <STR_LIT> ; if ( MV62 ) return <STR_LIT> ; if ( MV65 ) return <STR_LIT> ; return <STR_LIT>


<s> if ( MV60 ) return <STR_LIT> ; if ( MV62 ) return <STR_LIT>


<s> <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , } ; return std :: find ( table . begin ( ) , table . end ( ) , CPU ) != table .


<s> TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( The<ISA_LIT>Target , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCInstPrinter ( The<ISA_LIT>Target , create<ISA_LIT>MCInstPrinter


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V66 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67T } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V68 } ,

{ <STR_LIT> , ELF :: EF_HEXAGON_MACH_V69 } , } ;


<s> StringRef <ISA_LIT>_MC :: Parse<ISA_LIT>Triple ( const Triple & TT , StringRef CPU ) { StringRef CPUName = <ISA_LIT>_MC :: select<ISA_LIT>CPU (


<s> const std :: string CPU ( STI . getCPU ( ) . str ( ) ) ; auto F = ElfFlagsByCpuStr . find ( CPU ) ; assert ( F != ElfFlagsByCpuStr . end ( )


<s> const std :: string CPU ( STI . getCPU ( ) . str ( ) ) ; auto F = ElfFlagsByCpuStr .


<s> auto ArchSTI = create<ISA_LIT>MCSubtargetInfo ( STI -> getTargetTriple ( ) , STI -> getCPU ( ) . substr ( <NUM_LIT> , STI -> getCPU ( ) . size ( ) - <NUM_LIT> ) , FS ) ; std :: lock_guard < std :: mutex > Lock ( ArchSubtargetMutex ) ; ArchSubtarget [ std :: string ( STI -> getCPU ( ) ) ] = std :: unique_ptr < MCSubtargetInfo const > (


<s> static void LLVM_ATTRIBUTE_UNUSED clearFeature ( MCSubtargetInfo * STI , uint64_t F ) { if ( STI -> getFeatureBits ( ) [ F ] ) STI -> ToggleFeature


<s> static void LLVM_ATTRIBUTE_UNUSED clearFeature ( MCSubtargetInfo * STI , uint64_t F ) { if ( STI -> getFeatureBits ( ) [ F ]


<s> CpuArch = F ; break ; } bool UseHvx = false ; for ( unsigned F : { ExtensionHVX , ExtensionHVX64B , ExtensionHVX128B } ) { if ( ! FB . test ( F ) ) continue ; UseHvx = true ; break ; } bool HasHvxVer = false ; for ( unsigned F : { ExtensionHVXV60 , ExtensionHVXV62 , ExtensionHVXV65 , ExtensionHVXV66 , ExtensionHVXV67 , ExtensionHVXV68 } ) { if ( ! FB . test ( F ) ) continue ; HasHvxVer =


<s> if ( SyntaxVariant == <NUM_LIT> ) return new <ISA_LIT>InstPrinter


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Triple & T , unsigned SyntaxVariant , const MCAsmInfo & MAI ,

const MCInstrInfo & MII , const MCRegisterInfo & MRI ) {


<s> static MCInstrAnalysis * create<ISA_LIT>MCInstrAnalysis ( const MCInstrInfo * Info ) { return new <ISA_LIT>MCInstrAnalysis (


<s> MCInstrInfo * X = new MCInstrInfo ( ) ; Init<ISA_LIT>MCInstrInfo ( X


<s> } if ( <ISA_LIT>DisableDuplex ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . reset ( <STR_LIT> ) ) ; } X -> setFeatureBits ( completeHVXFeatures ( X -> getFeatureBits ( ) ) ) ; const bool ZRegOnDefault = ( CPUName == <STR_LIT> ) || ( CPUName == <STR_LIT> ) ; if ( ZRegOnDefault ) { llvm :: FeatureBitset Features = X -> getFeatureBits ( ) ; X -> setFeatureBits ( Features . set ( <STR_LIT> ) ) ; } return X


<s> static MCTargetStreamer * create<ISA_LIT>ObjectTargetStreamer ( MCStreamer & S , const MCSubtargetInfo & STI ) { return new <ISA_LIT>TargetELFStreamer ( S , STI


<s> static MCTargetStreamer * createMCAsmTargetStreamer ( MCStreamer & S , formatted_raw_ostream & OS , MCInstPrinter * IP , bool


<s> static MCStreamer * createMCStreamer ( Triple const & T , MCContext & Context , std :: unique_ptr < MCAsmBackend > && MAB , std :: unique_ptr < MCObjectWriter > && OW , std :: unique_ptr < MCCodeEmitter > && Emitter , bool RelaxAll ) { return create<ISA_LIT>ELFStreamer ( T , Context , std :: move ( MAB ) , std :: move ( OW ) , std :: move


<s> return create<ISA_LIT>ELFStreamer ( T , Context , std :: move ( MAB ) , std :: move ( OW )


<s> void emitLocalCommonSymbolSorted ( MCSymbol * Symbol , uint64_t Size , unsigned ByteAlignment , unsigned AccessSize ) override { <ISA_LIT>MCELFStreamer & <ISA_LIT>ELFStreamer = static_cast < <ISA_LIT>MCELFStreamer & > ( getStreamer ( ) ) ; <ISA_LIT>ELFStreamer . <ISA_LIT>MCEmitLocalCommonSymbol ( Symbol , Size , ByteAlignment


<s> unsigned <ISA_LIT>_MC :: GetELFFlags ( const MCSubtargetInfo & STI ) { static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V66 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67 } , { <STR_LIT> ,

ELF :: EF_HEXAGON_MACH_V67T } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V68 } , } ;


<s> static std :: map < StringRef , unsigned > ElfFlags = { { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V5 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V55 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V60 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V62 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V65 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V66 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67 } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V67T } , { <STR_LIT> , ELF :: EF_HEXAGON_MACH_V68 } , } ; auto F = ElfFlags . find ( STI . getCPU ( ) ) ; assert ( F != ElfFlags . end ( )


<s> return static_cast < MCELFStreamer &


<s> if ( ItinUnits == <STR_LIT> || ItinUnits == <STR_LIT> ) return ( * Lanes = <NUM_LIT> , CVI_XLANE ) ; else if ( ItinUnits & <STR_LIT> && ItinUnits & <STR_LIT> ) return ( * Lanes = <NUM_LIT> , CVI_XLANE | CVI_MPY0 ) ; else if ( ItinUnits & <STR_LIT> ) return ( * Lanes = <NUM_LIT> , CVI_MPY0 ) ; else if ( ItinUnits & <STR_LIT> ) return ( * Lanes = <NUM_LIT> , CVI_XLANE ) ; else if ( ItinUnits & <STR_LIT> && ItinUnits & <STR_LIT> && ItinUnits & <STR_LIT> && ItinUnits & <STR_LIT> ) return ( * Lanes = <NUM_LIT> , CVI_XLANE | CVI_SHIFT | CVI_MPY0 | CVI_MPY1 ) ; else if ( ItinUnits & <STR_LIT> && ItinUnits & <STR_LIT> ) return (

* Lanes = <NUM_LIT> , CVI_XLANE | CVI_SHIFT ) ;


<s> if ( MV67 ) return <STR_LIT> ; if ( MV67T ) return <STR_LIT> ; if ( MV68 ) return <STR_LIT> ; return <STR_LIT>


<s> return MCInstrAnalysis :: isConditionalBranch ( Inst )


<s> bool isConditionalBranch ( MCInst const & Inst ) const


<s> static bool isCPUValid ( const std :: string & CPU


<s> static bool isCPUValid ( const std :: string


<s> return MCInstrAnalysis :: isUnconditionalBranch ( Inst )


<s> LLVM_EXTERNAL_VISIBILITY void LLVMInitialize<ISA_LIT>TargetMC ( ) { RegisterMCAsmInfoFn X ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCAsmInfo ) ; TargetRegistry :: RegisterMCInstrInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCInstrInfo ) ; TargetRegistry :: RegisterMCRegInfo ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCRegisterInfo ) ; TargetRegistry :: RegisterMCSubtargetInfo ( getThe<ISA_LIT>Target ( ) , <ISA_LIT>_MC :: create<ISA_LIT>MCSubtargetInfo ) ; TargetRegistry :: RegisterMCCodeEmitter ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>MCCodeEmitter ) ; TargetRegistry :: RegisterMCAsmBackend ( getThe<ISA_LIT>Target ( ) , create<ISA_LIT>AsmBackend ) ; TargetRegistry :: RegisterMCInstrAnalysis ( getThe<ISA_LIT>Target ( ) ,


<s> StringRef Contents ( Buffer ) ; auto PacketBundle = Contents . rsplit ( '\n' ) ; auto HeadTail = PacketBundle . first . split ( '\n' ) ; StringRef Separator = <STR_LIT> ; StringRef Indent = <STR_LIT> ; OS << <STR_LIT> ; while ( ! HeadTail . first . empty ( ) ) { StringRef InstTxt ; auto Duplex = HeadTail . first . split ( '\v' ) ; if ( ! Duplex . second . empty ( ) ) { OS << Indent << Duplex . first << Separator ; InstTxt = Duplex . second ; } else if ( ! HeadTail . first . trim ( ) . startswith ( <STR_LIT> ) ) { InstTxt = Duplex . first


<s> std :: pair < std :: string , std :: string > selectCPUAndFS ( StringRef CPU , StringRef FS ) { std :: pair < std :: string , std


<s> std :: pair < std :: string , std :: string > Result ; Result . first = std :: string ( <ISA_LIT>_MC :: select<ISA_LIT>CPU ( CPU ) ) ; Result . second = select<ISA_LIT>FS ( Result . first , FS ) ; return Result


<s> if ( ! <STR_LIT> . contains ( Op . getReg ( ) ) ) return false ; } assert ( HadDef ) ; for ( unsigned i = <NUM_LIT> ; i < II -> getNumOperands ( ) ; ++ i ) { if ( II -> getOperand ( i ) . isReg ( ) && ( II -> getOperand ( i ) . isUse ( ) || II -> getOperand ( i ) . isDef ( ) ) ) { MachineBasicBlock :: iterator localII = II ; ++ localII ; unsigned Reg = II -> getOperand ( i


<s> if ( ! afterRA ) { if ( MII -> getOpcode ( ) == TargetOpcode :: KILL || MII -> getOpcode ( ) == TargetOpcode :: PHI || MII

-> getOpcode ( ) == TargetOpcode :: COPY ) return false ;


<s> StringRef getPassName ( ) const override


<s> switch ( MI . getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return


<s> if ( II -> getOpcode ( ) == TargetOpcode :: KILL ) return false ; for ( unsigned i = <NUM_LIT> ; i < II -> getNumOperands ( ) ; ++ i ) { if ( II -> getOperand ( i ) . isReg ( ) && ( II -> getOperand ( i ) . isUse ( ) || II -> getOperand ( i ) . isDef ( ) ) ) { MachineBasicBlock :: iterator localII = II ; ++ localII ; unsigned Reg = II -> getOperand ( i ) . getReg ( ) ; for ( MachineBasicBlock :: iterator localBegin = localII ; localBegin != end ; ++ localBegin ) { if ( localBegin == skip ) continue ; if ( localBegin -> modifiesRegister ( Reg , TRI ) || localBegin -> readsRegister ( Reg , TRI ) ) return false ; } } } return