<s> AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( CPUString == <STR_LIT> ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasV8Ops ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( Subtarget -> hasV7Ops ( ) ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasV6T2Ops ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( Subtarget -> hasV6Ops ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( Subtarget -> hasV5TEOps ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( Subtarget -> hasV5TOps ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( Subtarget -> hasV4TOps ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( Subtarget -> hasNEON ( ) && emitFPU ) { if ( Subtarget -> hasVFP4 ( ) ) AttrEmitter -> EmitTextAttribute ( <STR_LIT> , <STR_LIT> ) ; else AttrEmitter -> EmitTextAttribute ( <STR_LIT> , <STR_LIT> ) ; emitFPU = false ; } if ( Subtarget -> hasVFP4 ( ) ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( emitFPU ) AttrEmitter -> EmitTextAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasVFP3 ( ) ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( emitFPU ) AttrEmitter -> EmitTextAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasVFP2 ( ) ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( emitFPU ) AttrEmitter -> EmitTextAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; else AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( Subtarget -> isAAPCS_ABI ( ) && TM . Options . FloatABIType == FloatABI :: Hard ) {


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Target & T , unsigned SyntaxVariant , const MCAsmInfo & MAI ) { if ( SyntaxVariant == <NUM_LIT> ) return new <ISA_LIT>InstPrinter ( MAI ) ;


<s> assert ( CPUString == <STR_LIT> && <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; } if ( Subtarget -> hasVFP2 ( ) ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( ! UnsafeFPMath ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; } if ( NoInfsFPMath && NoNaNsFPMath ) AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ; else AttrEmitter -> EmitAttribute ( <STR_LIT> , <NUM_LIT> ) ;


<s> MCSym = GetExternalSymbolSymbol ( ACPV -> getSymbol ( ) ) ; } const MCExpr * Expr = MCSymbolRefExpr :: Create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( MAI -> getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: Create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: CreateAdd ( PCRelExpr , MCConstantExpr :: Create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . CreateTempSymbol ( ) ; OutStreamer . EmitLabel ( DotSym ) ; const MCExpr * DotExpr = MCSymbolRefExpr :: Create ( DotSym , OutContext ) ; PCRelExpr = MCBinaryExpr :: CreateSub ( PCRelExpr , DotExpr , OutContext ) ; } Expr = MCBinaryExpr :: CreateSub ( Expr , PCRelExpr , OutContext ) ;


<s> if ( ! MI -> getOperand ( OpNum ) . isImm ( ) ) return true ; O << MI -> getOperand ( OpNum ) . getImm ( ) ; return false ; case 'P' : case 'q' : printOperand ( MI , OpNum , O ) ; return false ; case 'Q' : case 'R' : case 'H' : report_fatal_error ( <STR_LIT> ) ; return true ;


<s> case 'a' : if ( MI -> getOperand ( OpNum ) . isReg ( ) ) { O << <STR_LIT> << <ISA_LIT>InstPrinter :: getRegisterName ( MI -> getOperand ( OpNum ) . getReg ( ) ) << <STR_LIT> ; return false ; } case 'c' : if ( ! MI -> getOperand ( OpNum ) . isImm ( ) ) return true ; O << MI -> getOperand ( OpNum ) . getImm ( ) ; return false ; case 'P' : case 'q' : printOperand ( MI , OpNum , O ) ; return false ; case 'Q' : case 'R' : case 'H' : report_fatal_error ( <STR_LIT> ) ; return true ; } } printOperand ( MI , OpNum , O ) ;


<s> const char * p = getenv ( <STR_LIT> ) ; val = p && strlen ( p ) ; }


<s> int pred_idx = MI -> findFirstPredOperandIdx ( ) ; if ( pred_idx >= <NUM_LIT> ) { MachineOperand & MO = const_cast < MachineInstr * > ( MI ) -> getOperand ( pred_idx ) ; if ( MO . getImm ( ) == <STR_LIT> ) { MO . setImm ( <STR_LIT> ) ; set_pred = true ; } } if ( ! set_pred ) { OutStreamer . AddComment ( <STR_LIT> ) ;


<s> if ( Subtarget -> hasV7Ops ( ) ) { if ( Subtarget -> isAClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isRClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isMClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } ATS . emitAttribute ( <STR_LIT> , Subtarget -> has<ISA_LIT>Ops ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( Subtarget -> isThumb1Only ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasThumb2 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( TM . getRelocationModel ( ) == Reloc :: PIC_ ) {


<s> if ( CPUString != <STR_LIT> && CPUString != <STR_LIT> ) ATS . emitTextAttribute ( <STR_LIT> , CPUString ) ; ATS . emitAttribute ( <STR_LIT> , getArchForCPU ( CPUString , Subtarget ) ) ; if ( Subtarget -> hasV7Ops ( ) ) { if ( Subtarget -> isAClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isRClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isMClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } ATS . emitAttribute ( <STR_LIT> , Subtarget -> has<ISA_LIT>Ops ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( Subtarget -> isThumb1Only ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasThumb2 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( TM . getRelocationModel ( ) == Reloc :: PIC_ ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ;


<s> OutStreamer . AddBlankLine ( ) ; } Stubs = MMIMacho . GetHiddenGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer . SwitchSection ( getObjFileLowering ( ) . getDataSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( unsigned i = <NUM_LIT> , e = Stubs . size ( ) ; i != e ; ++ i ) { OutStreamer . EmitLabel ( Stubs [ i ] . first ) ; OutStreamer . EmitValue ( MCSymbolRefExpr :: Create ( Stubs [ i ] . second . getPointer ( ) , OutContext ) , <NUM_LIT> ) ; } Stubs . clear ( ) ; OutStreamer . AddBlankLine ( ) ;


<s> } else if ( Subtarget -> isRClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isMClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } ATS . emitAttribute ( <STR_LIT> , Subtarget -> has<ISA_LIT>Ops ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( Subtarget -> isThumb1Only ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasThumb2 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( TM . getRelocationModel ( ) == Reloc :: PIC_ ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ;


<s> if ( ! isIndirect ) return getSymbol ( GV ) ; MCSymbol * MCSym = getSymbolWithGlobalValueBase ( GV , <STR_LIT> ) ; MachineModuleInfoMachO & MMIMachO = MMI -> getObjFileInfo < MachineModuleInfoMachO > ( ) ; MachineModuleInfoImpl :: StubValueTy & StubSym = GV -> hasHiddenVisibility ( ) ? MMIMachO . getHiddenGVStubEntry ( MCSym ) :


<s> MCSymbol * <ISA_LIT>AsmPrinter :: Get<ISA_LIT>GVSymbol ( const GlobalValue * GV , unsigned char TargetFlags ) { bool isIndirect = Subtarget -> isTargetMachO ( ) && ( TargetFlags & <STR_LIT> ) && Subtarget -> GVIsIndirectSymbol ( GV , TM . getRelocationModel ( ) ) ; if ( ! isIndirect ) return getSymbol ( GV ) ; MCSymbol * MCSym = getSymbolWithGlobalValueBase ( GV , <STR_LIT> ) ; MachineModuleInfoMachO & MMIMachO = MMI -> getObjFileInfo < MachineModuleInfoMachO > ( ) ;

MachineModuleInfoImpl :: StubValueTy & StubSym = GV -> hasHiddenVisibility ( ) ? MMIMachO . getHiddenGVStubEntry ( MCSym ) :


<s> } const MCExpr * Expr = MCSymbolRefExpr :: Create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( MAI -> getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: Create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: CreateAdd ( PCRelExpr , MCConstantExpr :: Create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . CreateTempSymbol ( ) ; OutStreamer . EmitLabel ( DotSym ) ; const MCExpr * DotExpr = MCSymbolRefExpr :: Create ( DotSym , OutContext ) ; PCRelExpr = MCBinaryExpr :: CreateSub ( PCRelExpr , DotExpr , OutContext ) ; }

Expr = MCBinaryExpr :: CreateSub ( Expr , PCRelExpr , OutContext ) ;


<s> if ( RelocM == Reloc :: PIC_ || RelocM == Reloc :: DynamicNoPIC ) { const TargetLoweringObjectFileMachO & TLOFMacho = static_cast < const TargetLoweringObjectFileMachO & > ( getObjFileLowering ( ) ) ; SetVector < const MCSection * , SmallVector < const MCSection * , <NUM_LIT> > , SmallPtrSet < const MCSection * , <NUM_LIT> > > TextSections ; TextSections . insert ( TLOFMacho . getTextSection ( ) ) ; for ( Module :: iterator F = M . begin ( ) , e = M . end ( ) ; F != e ; ++ F ) if ( ! F -> isDeclaration ( ) && ! F -> hasAvailableExternallyLinkage ( ) ) TextSections . insert ( TLOFMacho . SectionForGlobal ( F , Mang , TM ) ) ; TextSections . insert ( TLOFMacho . getTextCoalSection ( ) ) ; TextSections . insert ( TLOFMacho . getConstTextCoalSection ( ) ) ; for ( unsigned i = <NUM_LIT> , e = TextSections . size ( ) ; i != e ; ++ i ) OutStreamer . SwitchSection ( TextSections [ i ] ) ; if ( RelocM == Reloc :: DynamicNoPIC ) { const MCSection * sect = OutContext . getMachOSection ( <STR_LIT> , <STR_LIT> , MCSectionMachO :: S_SYMBOL_STUBS , <NUM_LIT> , SectionKind :: getText ( ) ) ; OutStreamer . SwitchSection ( sect ) ; } else { const MCSection * sect = OutContext . getMachOSection ( <STR_LIT> , <STR_LIT> , MCSectionMachO :: S_SYMBOL_STUBS , <NUM_LIT> , SectionKind :: getText ( ) ) ; OutStreamer . SwitchSection ( sect ) ;


<s> MBBs [ j ] -> setAlignment ( <NUM_LIT> ) ; } } } bool last_bb_was_constant_pool = false ; for ( MachineFunction :: iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) { if ( I -> isLandingPad ( ) ) { I -> setAlignment ( <NUM_LIT> ) ; } if ( I -> empty ( ) ) continue ; bool is_constant_pool = I -> begin ( ) -> getOpcode ( ) == <STR_LIT> ; if ( last_bb_was_constant_pool != is_constant_pool ) {


<s> assert ( TargetRegisterInfo :: isPhysicalRegister ( Reg ) ) ; assert ( ! MO . getSubReg ( ) && <STR_LIT> ) ; if ( <STR_LIT> . contains ( Reg ) ) { const MachineFunction & MF = * MI -> getParent ( ) -> getParent ( ) ; const TargetRegisterInfo * TRI = MF . getTarget ( ) . getRegisterInfo ( ) ; Reg = TRI -> getSubReg ( Reg , <STR_LIT> ) ; } O << <ISA_LIT>InstPrinter :: getRegisterName ( Reg ) ; break ; } case MachineOperand :: MO_Immediate : { int64_t Imm = MO . getImm ( ) ; O << '#' ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_GlobalAddress : {

const GlobalValue * GV = MO . getGlobal ( ) ;


<s> if ( FlagSfiBranch ) { NaclAlignAllJumpTargetsAndConstantPools ( MF ) ; }

return AsmPrinter :: runOnMachineFunction ( MF ) ;


<s> bool <ISA_LIT>AsmPrinter :: runOnMachineFunction ( MachineFunction & MF ) { AFI = MF . getInfo < <ISA_LIT>FunctionInfo > ( ) ; MCP = MF . getConstantPool ( ) ; if ( FlagSfiBranch ) { NaclAlignAllJumpTargetsAndConstantPools ( MF ) ; } return AsmPrinter :: runOnMachineFunction ( MF ) ;


<s> else if ( F . hasMinSize ( ) ) OptimizationGoal = <NUM_LIT> ; else if ( F . hasOptSize ( ) ) OptimizationGoal = <NUM_LIT> ; else if ( TM . getOptLevel ( ) == CodeGenOpt :: Aggressive ) OptimizationGoal = <NUM_LIT> ; else if ( TM . getOptLevel ( ) > CodeGenOpt :: None ) OptimizationGoal = <NUM_LIT> ; else OptimizationGoal = <NUM_LIT> ; if ( OptimizationGoals == - <NUM_LIT> ) OptimizationGoals = OptimizationGoal ; else if ( OptimizationGoals != ( int ) OptimizationGoal ) OptimizationGoals = <NUM_LIT> ; if ( Subtarget -> isTargetCOFF ( ) ) { bool Internal = F . hasInternalLinkage ( ) ; COFF :: SymbolStorageClass Scl = Internal ? COFF :: IMAGE_SYM_CLASS_STATIC : COFF :: IMAGE_SYM_CLASS_EXTERNAL ; int Type = COFF :: IMAGE_SYM_DTYPE_FUNCTION << COFF :: SCT_COMPLEX_TYPE_SHIFT ; OutStreamer -> BeginCOFFSymbolDef ( CurrentFnSym ) ; OutStreamer -> emitCOFFSymbolStorageClass ( Scl ) ; OutStreamer -> emitCOFFSymbolType ( Type ) ; OutStreamer -> EndCOFFSymbolDef ( ) ; } emitFunctionBody ( ) ; emitXRayTable ( ) ; if ( ! ThumbIndirectPads . empty ( ) ) { OutStreamer -> emitAssemblerFlag ( MCAF_Code16 ) ; emitAlignment ( Align ( <NUM_LIT> ) ) ; for ( std :: pair < unsigned , MCSymbol * > & TIP : ThumbIndirectPads ) {

OutStreamer -> emitLabel ( TIP . second ) ;


<s> MCSym = MBB -> getSymbol ( ) ; } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; auto Sym = cast < <ISA_LIT>ConstantPoolSymbol > ( ACPV ) -> getSymbol ( ) ; MCSym = GetExternalSymbolSymbol ( Sym ) ; } const MCExpr * Expr = MCSymbolRefExpr :: create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( DL . getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: createAdd ( PCRelExpr , MCConstantExpr :: create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . createTempSymbol ( ) ;


<s> assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV -> stripPointerCasts ( true ) ) ; assert ( GV && <STR_LIT> ) ; const MCExpr * E = MCSymbolRefExpr :: create ( Get<ISA_LIT>GVSymbol ( GV , <STR_LIT> ) , ( Subtarget -> isTargetELF ( ) ? MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 : MCSymbolRefExpr :: VK_None ) , OutContext ) ; OutStreamer -> emitValue ( E , Size ) ;


<s> void <ISA_LIT>AsmPrinter :: emitFunctionEntryLabel ( ) { if ( AFI -> isThumbFunction ( ) ) { OutStreamer -> emitAssemblerFlag ( MCAF_Code16 ) ; OutStreamer -> emitThumbFunc ( CurrentFnSym ) ; } else { OutStreamer -> emitAssemblerFlag ( MCAF_Code32 ) ; } OutStreamer -> emitLabel ( CurrentFnSym ) ;


<s> const TargetLoweringObjectFileMachO & TLOFMacho = static_cast < const TargetLoweringObjectFileMachO & > ( getObjFileLowering ( ) ) ; MachineModuleInfoMachO & MMIMacho = MMI -> getObjFileInfo < MachineModuleInfoMachO > ( ) ; MachineModuleInfoMachO :: SymbolListTy Stubs = MMIMacho . GetGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer . SwitchSection ( TLOFMacho . getNonLazySymbolPointerSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer . AddBlankLine ( ) ; } Stubs = MMIMacho . GetHiddenGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer . SwitchSection ( TLOFMacho . getNonLazySymbolPointerSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer . AddBlankLine ( ) ; } OutStreamer . EmitAssemblerFlag ( MCAF_SubsectionsViaSymbols ) ; } if ( TT . isOSBinFormatELF ( ) ) {

const TargetLoweringObjectFileELF & TLOFELF = static_cast < const TargetLoweringObjectFileELF & > ( getObjFileLowering ( ) ) ;


<s> } else if ( ACPV -> isMachineBasicBlock ( ) ) { const MachineBasicBlock * MBB = cast < <ISA_LIT>ConstantPoolMBB > ( ACPV ) -> getMBB ( ) ; MCSym = MBB -> getSymbol ( ) ; } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; const char * Sym = cast < <ISA_LIT>ConstantPoolSymbol > ( ACPV ) -> getSymbol ( ) ; MCSym = GetExternalSymbolSymbol ( Sym ) ; } const MCExpr * Expr = MCSymbolRefExpr :: Create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( DL -> getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: Create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: CreateAdd ( PCRelExpr , MCConstantExpr :: Create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . CreateTempSymbol ( ) ; OutStreamer . EmitLabel ( DotSym ) ; const MCExpr * DotExpr = MCSymbolRefExpr :: Create ( DotSym , OutContext ) ; PCRelExpr = MCBinaryExpr :: CreateSub ( PCRelExpr , DotExpr , OutContext ) ;


<s> bool isThumb = TT . getArch ( ) == Triple :: thumb || TT . getArch ( ) == Triple :: thumbeb || TT . getSubArch ( ) == Triple :: <ISA_LIT>SubArch_v7m || TT . getSubArch ( ) == Triple :: <ISA_LIT>SubArch_v6m ; if ( ! M . getModuleInlineAsm ( ) . empty ( ) && isThumb ) OutStreamer . EmitAssemblerFlag ( MCAF_Code16 ) ;


<s> Triple TT ( TM . getTargetTriple ( ) ) ; OutStreamer . EmitAssemblerFlag ( MCAF_SyntaxUnified ) ; if ( TT . isOSBinFormatELF ( ) ) emitAttributes ( ) ; bool isThumb = TT . getArch ( ) == Triple :: thumb || TT . getArch ( ) == Triple :: thumbeb || TT . getSubArch ( ) == Triple :: <ISA_LIT>SubArch_v7m || TT . getSubArch ( ) == Triple :: <ISA_LIT>SubArch_v6m ;

if ( ! M . getModuleInlineAsm ( ) . empty ( ) && isThumb ) OutStreamer . EmitAssemblerFlag ( MCAF_Code16 ) ;


<s> if ( Subtarget -> isTargetCOFF ( ) ) { bool Internal = MF . getFunction ( ) -> hasInternalLinkage ( ) ; COFF :: SymbolStorageClass Scl = Internal ? COFF :: IMAGE_SYM_CLASS_STATIC : COFF :: IMAGE_SYM_CLASS_EXTERNAL ; int Type = COFF :: IMAGE_SYM_DTYPE_FUNCTION << COFF :: SCT_COMPLEX_TYPE_SHIFT ; OutStreamer . BeginCOFFSymbolDef ( CurrentFnSym ) ; OutStreamer . EmitCOFFSymbolStorageClass ( Scl ) ; OutStreamer . EmitCOFFSymbolType ( Type ) ;


<s> explicit <ISA_LIT>AsmPrinter ( formatted_raw_ostream & O , TargetMachine & TM , MCContext & Ctx , MCStreamer & Streamer , const MCAsmInfo * T ) : AsmPrinter ( O , TM , Ctx , Streamer , T ) , AFI ( NULL ) , MCP ( NULL ) {

Subtarget = & TM . getSubtarget < <ISA_LIT>Subtarget > ( ) ;


<s> EmitAlignment ( <NUM_LIT> ) ; for ( unsigned i = <NUM_LIT> , e = Stubs . size ( ) ; i != e ; ++ i ) { O << * Stubs [ i ] . first << <STR_LIT> ; O << * Stubs [ i ] . second << <STR_LIT> ; } } Stubs = MMIMacho . GetHiddenGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer . SwitchSection ( getObjFileLowering ( ) . getDataSection ( ) ) ;


<s> MachineModuleInfoMachO & MMIMacho = MMI -> getObjFileInfo < MachineModuleInfoMachO > ( ) ; O << '\n' ; MachineModuleInfoMachO :: SymbolListTy Stubs = MMIMacho . GetGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer . SwitchSection ( TLOFMacho . getNonLazySymbolPointerSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( unsigned i = <NUM_LIT> , e = Stubs . size ( ) ; i != e ; ++ i ) { O << * Stubs [ i ] . first << <STR_LIT> ;

O << * Stubs [ i ] . second << <STR_LIT> ;


<s> if ( StubSym == <NUM_LIT> ) StubSym = GetGlobalValueSymbol ( GV ) ; } } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; O << * GetExternalSymbolSymbol ( ACPV -> getSymbol ( ) ) ; } if ( ACPV -> hasModifier ( ) ) O << <STR_LIT> << ACPV -> getModifier ( ) << <STR_LIT> ; if ( ACPV -> getPCAdjustment ( ) != <NUM_LIT> ) { O << <STR_LIT> << MAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << ACPV -> getLabelId ( ) << <STR_LIT> << ( unsigned ) ACPV -> getPCAdjustment ( ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) O << <STR_LIT> ;


<s> const std :: vector < MachineJumpTableEntry > & JT = MJTI -> getJumpTables ( ) ; const std :: vector < MachineBasicBlock * > & JTBBs = JT [ JTI ] . MBBs ; bool ByteOffset = false , HalfWordOffset = false ; if ( MI -> getOpcode ( ) == <STR_LIT> ) ByteOffset = true ; else if ( MI -> getOpcode ( ) == <STR_LIT> ) HalfWordOffset = true ; for ( unsigned i = <NUM_LIT> , e = JTBBs . size ( ) ; i != e ; ++ i ) {


<s> if ( MI -> getOpcode ( ) == <STR_LIT> ) ByteOffset = true ; else if ( MI -> getOpcode ( ) == <STR_LIT> ) HalfWordOffset = true ; for ( unsigned i = <NUM_LIT> , e = JTBBs . size ( ) ; i != e ; ++ i ) { MachineBasicBlock * MBB = JTBBs [ i ] ; if ( ByteOffset ) O << MAI -> getData8bitsDirective ( ) ; else if ( HalfWordOffset ) O << MAI -> getData16bitsDirective ( ) ; if ( ByteOffset || HalfWordOffset ) O << '(' << * MBB -> getSymbol ( OutContext ) << <STR_LIT> << * JTISymbol << <STR_LIT> ;

else O << <STR_LIT> << * MBB -> getSymbol ( OutContext ) ;


<s> OutStreamer . EmitLabel ( JTISymbol ) ; const char * JTEntryDirective = MAI -> getData32bitsDirective ( ) ; const MachineJumpTableInfo * MJTI = MF -> getJumpTableInfo ( ) ; const std :: vector < MachineJumpTableEntry > & JT = MJTI -> getJumpTables ( ) ; const std :: vector < MachineBasicBlock * > & JTBBs = JT [ JTI ] . MBBs ; bool UseSet = MAI -> hasSetDirective ( ) && TM . getRelocationModel ( ) == Reloc :: PIC_ ; SmallPtrSet < MachineBasicBlock * , <NUM_LIT> > JTSets ; for ( unsigned i = <NUM_LIT> , e = JTBBs . size ( ) ; i != e ; ++ i ) { MachineBasicBlock * MBB = JTBBs [ i ] ; bool isNew = JTSets . insert ( MBB ) ;


<s>
const
char
*
JTEntryDirective
=
MAI
->
getData32bitsDirective
(
)
;
const
MachineJumpTableInfo
*
MJTI
=
MF
->
getJumpTableInfo
(
)
;
const
std
::
vector
<
MachineJumpTableEntry
>
&
JT
=
MJTI
->
getJumpTables
(
)
;
const
std
::
vector
<
MachineBasicBlock
*
>
&
JTBBs
=
JT
[
JTI
]
.
MBBs
;
bool
UseSet
=
MAI
->
hasSetDirective
(
)
&&
TM
.
getRelocationModel
(
)
==
Reloc
::
PIC_
;
SmallPtrSet
<
MachineBasicBlock
*
,
<NUM_LIT>
>
JTSets
;
for
(
unsigned
i
=
<NUM_LIT>
,
e
=
JTBBs
.
size
(
)
;
i
!=
e
;
++
i
)
{
MachineBasicBlock
*
MBB
=
JTBBs
[
i
]
;
bool
isNew
=
JTSets
.
insert
(
MBB
)
;
if
(
UseSet
&&
isNew
)
{
O
<<
<STR_LIT>
<<
*
Get<ISA_LIT>SetPICJumpTableLabel2
(
JTI
,
MO2
.
getImm
(
)
,
MBB
)
<<
','
<<
*
MBB
->
getSymbol
(
OutContext
)
<<
'-'
<<
*
JTISymbol
<<
'\n'
;
}
O
<<
JTEntryDirective
<<
' '
;
if
(
UseSet
)
O
<<
*
Get<ISA_LIT>SetPICJumpTableLabel2
(
JTI
,
MO2
.
getImm
(
)
,
MBB
)
;
else
if
(
TM
.
getRelocationModel
(
)
==
Reloc
::
PIC_
)
O
<<
*
MBB
->
getSymbol
(
OutContext
)
<<
'-'
<<
*
JTISymbol
;
else
O
<<
*
MBB
->
getSymbol
(
OutContext
)
;


<s> unsigned DReg = TRI -> getMatchingSuperReg ( Reg , RegNum & <NUM_LIT> ? <NUM_LIT> : <NUM_LIT> , & <STR_LIT> ) ; O << getRegisterName ( DReg ) << '[' << ( RegNum & <NUM_LIT> ) << ']' ; } else { assert ( ! MO . getSubReg ( ) && <STR_LIT> ) ; O << getRegisterName ( Reg ) ; } break ; } case MachineOperand :: MO_Immediate : { int64_t Imm = MO . getImm ( ) ; O << '#' ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF & <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF & <STR_LIT> ) ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( OutContext ) ; return ; case MachineOperand :: MO_GlobalAddress : { bool isCallOp = Modifier && ! strcmp ( Modifier , <STR_LIT> ) ; GlobalValue * GV = MO . getGlobal ( ) ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF & <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF & <STR_LIT> ) ) O << <STR_LIT> ; O << * GetGlobalValueSymbol ( GV ) ; printOffset ( MO . getOffset ( ) ) ; if ( isCallOp && Subtarget -> isTargetELF ( ) && TM . getRelocationModel ( ) == Reloc :: PIC_ ) O << <STR_LIT> ; break ;


<s> if ( MI -> getOperand ( i ) . isImplicit ( ) ) continue ; if ( ( int ) i != OpNum + <NUM_LIT> ) O << <STR_LIT> ; printOperand ( MI , i ) ; }


<s> assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV -> stripPointerCasts ( true ) ) ; assert ( GV && <STR_LIT> ) ;

const MCExpr * E = MCSymbolRefExpr :: create ( Get<ISA_LIT>GVSymbol ( GV , <STR_LIT> ) , ( Subtarget -> isTargetELF ( ) ? MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 : MCSymbolRefExpr :: VK_None ) , OutContext ) ;


<s> if ( OutStreamer . hasRawTextSupport ( ) ) { AttrEmitter = new AsmAttributeEmitter ( OutStreamer ) ; emitFPU = true ; } else { MCObjectStreamer & O = static_cast < MCObjectStreamer & > ( OutStreamer ) ; AttrEmitter = new ObjectAttributeEmitter ( O ) ; } AttrEmitter -> MaybeSwitchVendor ( <STR_LIT> ) ; std :: string CPUString = Subtarget -> getCPUString ( ) ; if ( CPUString == <STR_LIT> || Subtarget -> isCortexA8 ( ) ) { AttrEmitter -> EmitTextAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( CPUString == <STR_LIT> ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( CPUString == <STR_LIT> ) { AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ; AttrEmitter -> EmitAttribute ( <STR_LIT> , <STR_LIT> ) ;


<s> } else { SrcReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; DstReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; } if ( MI -> mayStore ( ) ) { assert ( DstReg == <STR_LIT> && <STR_LIT> ) ; SmallVector < unsigned , <NUM_LIT> > RegList ; unsigned StartOp = <NUM_LIT> + <NUM_LIT> ; unsigned NumOffset = <NUM_LIT> ; switch ( Opc ) { default : MI -> dump ( ) ; assert ( <NUM_LIT> && <STR_LIT> ) ; case <STR_LIT> : StartOp = <NUM_LIT> ; NumOffset = <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : assert ( SrcReg == <STR_LIT> && <STR_LIT> ) ; for ( unsigned i = StartOp , NumOps = MI -> getNumOperands ( ) - NumOffset ; i != NumOps ; ++ i ) RegList . push_back ( MI -> getOperand ( i ) . getReg ( ) ) ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : assert ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> && <STR_LIT> ) ; RegList . push_back ( SrcReg ) ; break ; } OutStreamer . EmitRegSave ( RegList , Opc == <STR_LIT> ) ; } else { if ( SrcReg == <STR_LIT> ) { int64_t Offset = <NUM_LIT> ; switch ( Opc ) { default : MI -> dump ( ) ; assert ( <NUM_LIT> && <STR_LIT> ) ; case <STR_LIT> : case <STR_LIT> : Offset = <NUM_LIT> ; break ; case <STR_LIT> : Offset = - MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; case <STR_LIT> : case <STR_LIT> : Offset = MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; case <STR_LIT> : Offset = MI -> getOperand ( <NUM_LIT> ) . getImm ( ) * <NUM_LIT> ; break ; case <STR_LIT> : case <STR_LIT> :

Offset = - MI -> getOperand ( <NUM_LIT> ) . getImm ( ) * <NUM_LIT> ;


<s> void <ISA_LIT>AsmPrinter :: EmitXXStructor ( const Constant * CV ) { uint64_t Size = TM . getTargetData ( ) -> getTypeAllocSize ( CV -> getType ( ) ) ; assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV ) ;


<s> uint64_t Size = TM . getTargetData ( ) -> getTypeAllocSize ( CV -> getType ( ) ) ; assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV ) ; assert ( GV && <STR_LIT> ) ; const MCExpr * E = MCSymbolRefExpr :: Create ( Mang -> getSymbol ( GV ) , ( Subtarget -> isTargetDarwin ( ) ? MCSymbolRefExpr :: VK_None : MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 ) , OutContext ) ;


<s> const BlockAddress * BA = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) -> getBlockAddress ( ) ; MCSym = GetBlockAddressSymbol ( BA ) ; } else if ( ACPV -> isGlobalValue ( ) ) { const GlobalValue * GV = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) -> getGV ( ) ; unsigned char TF = Subtarget -> isTargetMachO ( ) ? <STR_LIT> : <NUM_LIT> ; MCSym = Get<ISA_LIT>GVSymbol ( GV , TF ) ; } else if ( ACPV -> isMachineBasicBlock ( ) ) { const MachineBasicBlock * MBB = cast < <ISA_LIT>ConstantPoolMBB > ( ACPV ) -> getMBB ( ) ; MCSym = MBB -> getSymbol ( ) ; } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; const char * Sym = cast < <ISA_LIT>ConstantPoolSymbol > ( ACPV ) -> getSymbol ( ) ; MCSym = GetExternalSymbolSymbol ( Sym ) ; } const MCExpr * Expr = MCSymbolRefExpr :: create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( DL -> getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: createAdd ( PCRelExpr , MCConstantExpr :: create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . createTempSymbol ( ) ; OutStreamer -> EmitLabel ( DotSym ) ; const MCExpr * DotExpr = MCSymbolRefExpr :: create ( DotSym , OutContext ) ;

PCRelExpr = MCBinaryExpr :: createSub ( PCRelExpr , DotExpr , OutContext ) ;


<s> MCSym = MBB -> getSymbol ( ) ; } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; const char * Sym = cast < <ISA_LIT>ConstantPoolSymbol > ( ACPV ) -> getSymbol ( ) ; MCSym = GetExternalSymbolSymbol ( Sym ) ; } const MCExpr * Expr = MCSymbolRefExpr :: create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( DL -> getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: createAdd ( PCRelExpr , MCConstantExpr :: create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) {

MCSymbol * DotSym = OutContext . createTempSymbol ( ) ;


<s> assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV -> stripPointerCasts ( ) ) ; assert ( GV && <STR_LIT> ) ; const MCExpr * E = MCSymbolRefExpr :: create ( Get<ISA_LIT>GVSymbol ( GV , <STR_LIT> ) , ( Subtarget -> isTargetELF ( ) ? MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 : MCSymbolRefExpr :: VK_None ) , OutContext ) ; OutStreamer -> EmitValue ( E , Size ) ;


<s> const DataLayout * DL = TM . getDataLayout ( ) ; SmallString < <NUM_LIT> > Name ; raw_svector_ostream ( Name ) << DL -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << '_' << uid ; return OutContext . getOrCreateSymbol ( Name ) ;


<s> SmallString < <NUM_LIT> > Name ; raw_svector_ostream ( Name ) << DL -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << '_' << uid ; return OutContext . getOrCreateSymbol ( Name ) ;


<s> SmallString < <NUM_LIT> > Name ; raw_svector_ostream ( Name ) << DL -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) ; return OutContext . getOrCreateSymbol ( Name ) ;


<s> const DataLayout * DL = TM . getDataLayout ( ) ; SmallString < <NUM_LIT> > Name ; raw_svector_ostream ( Name ) << DL -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) ; return OutContext . getOrCreateSymbol ( Name ) ;


<s> FunctionPass * llvm :: create<ISA_LIT>CodePrinterPass ( raw_ostream & o , <ISA_LIT>TargetMachine & tm , bool fast ) { return new <ISA_LIT>AsmPrinter ( o , tm , tm . getTargetAsmInfo ( ) , fast ) ;


<s> DW = getAnalysisIfAvailable < DwarfWriter > ( ) ; assert ( DW && <STR_LIT> ) ; DW -> BeginModule ( & M , MMI , O , this , TAI ) ; if ( Subtarget -> isTargetDarwin ( ) ) Mang -> setUseQuotes ( true ) ;


<s> MMI = getAnalysisIfAvailable < MachineModuleInfo > ( ) ; assert ( MMI ) ; DW = getAnalysisIfAvailable < DwarfWriter > ( ) ; assert ( DW && <STR_LIT> ) ; DW -> BeginModule ( & M , MMI , O , this , TAI ) ; if ( Subtarget -> isTargetDarwin ( ) ) Mang -> setUseQuotes ( true ) ; return Result ;


<s> if ( TM . getTargetData ( ) -> isLittleEndian ( ) ) break ; case 'R' : if ( TM . getTargetData ( ) -> isBigEndian ( ) ) break ; case 'H' : if ( ! MI -> getOperand ( OpNo ) . isReg ( ) || OpNo + <NUM_LIT> == MI -> getNumOperands ( ) || ! MI -> getOperand ( OpNo + <NUM_LIT> ) . isReg ( ) ) return true ; ++ OpNo ; } } printOperand ( MI , OpNo ) ;


<s>
if
(
GVar
->
getName
(
)
==
<STR_LIT>
)
O
<<
<STR_LIT>
;
else
if
(
GVar
->
getName
(
)
==
<STR_LIT>
)
O
<<
<STR_LIT>
;
}
return
;
}
std
::
string
name
=
Mang
->
getValueName
(
GVar
)
;
Constant
*
C
=
GVar
->
getInitializer
(
)
;
const
Type
*
Type
=
C
->
getType
(
)
;
unsigned
Size
=
TD
->
getTypePaddedSize
(
Type
)
;
unsigned
Align
=
TD
->
getPreferredAlignmentLog
(
GVar
)
;
bool
isDarwin
=
Subtarget
->
isTargetDarwin
(
)
;
printVisibility
(
name
,
GVar
->
getVisibility
(
)
)
;
if
(
Subtarget
->
isTargetELF
(
)
)
O
<<
<STR_LIT>
<<
name
<<
<STR_LIT>
;
if
(
C
->
isNullValue
(
)
&&
!
GVar
->
hasSection
(
)
&&
!
GVar
->
isThreadLocal
(
)
&&
!
(
isDarwin
&&
TAI
->
SectionKindForGlobal
(
GVar
)
==
SectionKind
::
RODataMergeStr
)
)
{
if
(
GVar
->
hasExternalLinkage
(
)
)
{
SwitchToSection
(
TAI
->
SectionForGlobal
(
GVar
)
)
;
if
(
const
char
*
Directive
=
TAI
->
getZeroFillDirective
(
)
)
{
O
<<
<STR_LIT>
<<
name
<<
<STR_LIT>
;
O
<<
Directive
<<
<STR_LIT>
<<
name
<<
<STR_LIT>
<<
Size
<<
<STR_LIT>
<<
Align
<<
<STR_LIT>
;
return
;
}
}
if
(
GVar
->
hasLocalLinkage
(
)
||
GVar
->
isWeakForLinker
(
)
)
{
if
(
Size
==
<NUM_LIT>
)
Size
=
<NUM_LIT>
;
if
(
isDarwin
)
{
if
(
GVar
->
hasLocalLinkage
(
)
)
{
O
<<
TAI
->
getLCOMMDirective
(
)
<<
name
<<
<STR_LIT>
<<
Size
<<
','
<<
Align
;
}
else
if
(
GVar
->
hasCommonLinkage
(
)
)
{
O
<<
TAI
->
getCOMMDirective
(
)
<<
name
<<
<STR_LIT>
<<
Size
<<
','
<<
Align
;
}
else
{
SwitchToSection
(
TAI
->
SectionForGlobal
(
GVar
)
)
;
O
<<
<STR_LIT>
<<
name
<<
'\n'
<<
TAI
->
getWeakDefDirective
(
)
<<
name
<<
'\n'
;
EmitAlignment
(
Align
,
GVar
)
;
O
<<
name
<<
<STR_LIT>
;
if
(
VerboseAsm
)
{
O
<<
<STR_LIT>
<<
TAI
->
getCommentString
(
)
<<
' '
;
PrintUnmangledNameSafely
(
GVar
,
O
)
;
}
O
<<
'\n'
;
EmitGlobalConstant
(
C
)
;
return
;
}
}
else
if
(
TAI
->
getLCOMMDirective
(
)
!=
)
{
if
(
GVar
->
hasLocalLinkage
(
)
)
{
O
<<
TAI
->
getLCOMMDirective
(
)
<<
name
<<
<STR_LIT>
<<
Size
;
}
else
{
O
<<
TAI
->
getCOMMDirective
(
)
<<
name
<<
<STR_LIT>
<<
Size
;

if ( TAI -> getCOMMDirectiveTakesAlignment ( ) ) O << ',' << ( TAI -> getAlignmentIsInBytes ( ) ? ( <NUM_LIT> << Align ) : Align ) ;


<s> } else O << Name ; printOffset ( MO . getOffset ( ) ) ; if ( isCallOp && Subtarget -> isTargetELF ( ) && TM . getRelocationModel ( ) == Reloc :: PIC_ ) O << <STR_LIT> ; if ( GV -> hasExternalWeakLinkage ( ) ) ExtWeakSymbols . insert ( GV ) ; break ; } case MachineOperand :: MO_ExternalSymbol : { bool isCallOp = Modifier && ! strcmp ( Modifier , <STR_LIT> ) ; std :: string Name ( TAI -> getGlobalPrefix ( ) ) ; Name += MO . getSymbolName ( ) ; if ( isCallOp && Subtarget -> isTargetDarwin ( ) && TM . getRelocationModel ( ) != Reloc :: Static ) { printSuffixedName ( Name , <STR_LIT> ) ; FnStubs . insert ( Name ) ; } else O << Name ; if ( isCallOp && Subtarget -> isTargetELF ( ) && TM . getRelocationModel ( ) == Reloc :: PIC_ ) O << <STR_LIT> ; break ; }

case MachineOperand :: MO_ConstantPoolIndex :


<s>
static
void
printSOImm
(
raw_ostream
&
O
,
int64_t
V
,
const
TargetAsmInfo
*
TAI
)
{
assert
(
V
<
(
<NUM_LIT>
<<
<NUM_LIT>
)
&&
<STR_LIT>
)
;
unsigned
Imm
=
<STR_LIT>
(
V
)
;
unsigned
Rot
=
<STR_LIT>
(
V
)
;
if
(
Rot
)
{
O
<<
<STR_LIT>
<<
Imm
<<
<STR_LIT>
<<
Rot
;
if
(
VerboseAsm
)
O
<<
' '
<<
TAI
->
getCommentString
(
)
<<
' '
<<
(
int
)
<STR_LIT>
(
Imm
,
Rot
)
;


<s> const MachineOperand & MO = MI -> getOperand ( OpNum ) ; assert ( MO . isImm ( ) && <STR_LIT> ) ; unsigned V1 = <STR_LIT> ( MO . getImm ( ) ) ; unsigned V2 = <STR_LIT> ( MO . getImm ( ) ) ; printSOImm ( O , <STR_LIT> ( V1 ) , TAI ) ; O << <STR_LIT> ; printPredicateOperand ( MI , <NUM_LIT> ) ; O << <STR_LIT> ;


<s> assert ( MO . isImm ( ) && <STR_LIT> ) ; printSOImm ( O , MO . getImm ( ) , TAI ) ;


<s> void <ISA_LIT>AsmPrinter :: printSOImmOperand ( const MachineInstr * MI , int OpNum ) { const MachineOperand & MO = MI -> getOperand ( OpNum ) ;

assert ( MO . isImm ( ) && <STR_LIT> ) ;


<s> } else if ( Subtarget -> isRClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isMClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } ATS . emitAttribute ( <STR_LIT> , Subtarget -> has<ISA_LIT>Ops ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( Subtarget -> isThumb1Only ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasThumb2 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ;


<s> ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isRClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> isMClass ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } ATS . emitAttribute ( <STR_LIT> , Subtarget -> has<ISA_LIT>Ops ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( Subtarget -> isThumb1Only ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasThumb2 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( Subtarget -> isFPOnlySP ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( Subtarget -> isAAPCS_ABI ( ) && TM . Options . FloatABIType == FloatABI :: Hard ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( Subtarget -> hasMPExtension ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( Subtarget -> hasDivide ( ) ) { ATS . emitAttribute ( <STR_LIT> , Subtarget -> hasDivideIn<ISA_LIT>Mode ( ) ? <STR_LIT> : <STR_LIT> ) ;


<s> SmallVector < unsigned , <NUM_LIT> > RegList ; unsigned StartOp = <NUM_LIT> + <NUM_LIT> ; unsigned NumOffset = <NUM_LIT> ; switch ( Opc ) { default : MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; case <STR_LIT> : StartOp = <NUM_LIT> ; NumOffset = <NUM_LIT> ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : assert ( SrcReg == <STR_LIT> && <STR_LIT> ) ; for ( unsigned i = StartOp , NumOps = MI -> getNumOperands ( ) - NumOffset ; i != NumOps ; ++ i ) { const MachineOperand & MO = MI -> getOperand ( i ) ; if ( MO . isImplicit ( ) ) continue ; RegList . push_back ( MO . getReg ( ) ) ; } break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : assert ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) == <STR_LIT> && <STR_LIT> ) ; RegList . push_back ( SrcReg ) ; break ; } ATS . emitRegSave ( RegList , Opc == <STR_LIT> ) ; } else { if ( SrcReg == <STR_LIT> ) { int64_t Offset = <NUM_LIT> ; switch ( Opc ) { default : MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; case <STR_LIT> : case <STR_LIT> : Offset = <NUM_LIT> ; break ; case <STR_LIT> : Offset = - MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; case <STR_LIT> : case <STR_LIT> : Offset = MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; case <STR_LIT> : Offset = MI -> getOperand ( <NUM_LIT> ) . getImm ( ) * <NUM_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : Offset = - MI -> getOperand ( <NUM_LIT> ) . getImm ( ) * <NUM_LIT> ; break ; case <STR_LIT> : { unsigned CPI = MI -> getOperand ( <NUM_LIT> ) . getIndex ( ) ; const MachineConstantPool * MCP = MF . getConstantPool ( ) ; if ( CPI >= MCP -> getConstants ( ) . size ( ) ) CPI = AFI . getOriginalCPIdx ( CPI ) ; assert ( CPI != - <NUM_LIT> && <STR_LIT> ) ; const MachineConstantPoolEntry & CPE = MCP -> getConstants ( ) [ CPI ] ; assert ( ! CPE . isMachineConstantPoolEntry ( ) && <STR_LIT> ) ; Offset = - cast < ConstantInt > ( CPE . Val . ConstVal ) -> getSExtValue ( ) ; break ; } } if ( DstReg == FramePtr && FramePtr != <STR_LIT> ) ATS . emitSetFP ( FramePtr , <STR_LIT> , - Offset ) ; else if ( DstReg == <STR_LIT> ) { ATS . emitPad ( Offset ) ; } else { MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ;


<s> } else { if ( SrcReg == <STR_LIT> ) { int64_t Offset = <NUM_LIT> ; switch ( Opc ) { default : MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; case <STR_LIT> : case <STR_LIT> : Offset = <NUM_LIT> ; break ; case <STR_LIT> : Offset = - MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; case <STR_LIT> : case <STR_LIT> : Offset = MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; case <STR_LIT> : Offset = MI -> getOperand ( <NUM_LIT> ) . getImm ( ) * <NUM_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : Offset = - MI -> getOperand ( <NUM_LIT> ) . getImm ( ) * <NUM_LIT> ; break ; case <STR_LIT> : { unsigned CPI = MI -> getOperand ( <NUM_LIT> ) . getIndex ( ) ; const MachineConstantPool * MCP = MF . getConstantPool ( ) ; if ( CPI >= MCP -> getConstants ( ) . size ( ) ) CPI = AFI . getOriginalCPIdx ( CPI ) ; assert ( CPI != - <NUM_LIT> && <STR_LIT> ) ; const MachineConstantPoolEntry & CPE = MCP -> getConstants ( ) [ CPI ] ; assert ( ! CPE . isMachineConstantPoolEntry ( ) && <STR_LIT> ) ; Offset = - cast < ConstantInt > ( CPE . Val . ConstVal ) -> getSExtValue ( ) ; break ; } } if ( DstReg == FramePtr && FramePtr != <STR_LIT> ) ATS . emitSetFP ( FramePtr , <STR_LIT> , - Offset ) ; else if ( DstReg == <STR_LIT> ) { ATS . emitPad ( Offset ) ; } else { MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; } } else if ( DstReg == <STR_LIT> ) { MI -> dump ( ) ; llvm_unreachable ( <STR_LIT> ) ; } else {


<s> assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV -> stripPointerCasts ( ) ) ; assert ( GV && <STR_LIT> ) ;

const MCExpr * E = MCSymbolRefExpr :: Create ( getSymbol ( GV ) , ( Subtarget -> isTargetDarwin ( ) ? MCSymbolRefExpr :: VK_None : MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 ) , OutContext ) ;


<s> assert ( GV && <STR_LIT> ) ; const MCExpr * E = MCSymbolRefExpr :: Create ( getSymbol ( GV ) , ( Subtarget -> isTargetDarwin ( ) ? MCSymbolRefExpr :: VK_None : MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 ) , OutContext ) ; OutStreamer . EmitValue ( E , Size ) ;


<s> if ( ! isIndirect ) return getSymbol ( GV ) ; MCSymbol * MCSym = GetSymbolWithGlobalValueBase ( GV , <STR_LIT> ) ; MachineModuleInfoMachO & MMIMachO = MMI -> getObjFileInfo < MachineModuleInfoMachO > ( ) ; MachineModuleInfoImpl :: StubValueTy & StubSym = GV -> hasHiddenVisibility ( ) ? MMIMachO . getHiddenGVStubEntry ( MCSym ) : MMIMachO . getGVStubEntry ( MCSym ) ; if ( StubSym . getPointer ( ) == <NUM_LIT> ) StubSym = MachineModuleInfoImpl :: StubValueTy ( getSymbol ( GV ) , ! GV -> hasInternalLinkage ( ) ) ; return MCSym ;


<s> else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_GlobalAddress : { const GlobalValue * GV = MO . getGlobal ( ) ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF & <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF & <STR_LIT> ) ) O << <STR_LIT> ; O << * getSymbol ( GV ) ; printOffset ( MO . getOffset ( ) , O ) ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; break ; } case MachineOperand :: MO_ExternalSymbol : { O << * GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; break ; }


<s> unsigned Reg = MO . getReg ( ) ; assert ( TargetRegisterInfo :: isPhysicalRegister ( Reg ) ) ; assert ( ! MO . getSubReg ( ) && <STR_LIT> ) ; if ( <STR_LIT> . contains ( Reg ) ) { const MachineFunction & MF = * MI -> getParent ( ) -> getParent ( ) ; const TargetRegisterInfo * TRI = MF . getTarget ( ) . getRegisterInfo ( ) ; Reg = TRI -> getSubReg ( Reg , <STR_LIT> ) ; } O << <ISA_LIT>InstPrinter :: getRegisterName ( Reg ) ; break ; } case MachineOperand :: MO_Immediate : { int64_t Imm = MO . getImm ( ) ; O << '#' ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ;


<s> if ( isPositionIndependent ( ) || STI . isROPI ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( isPositionIndependent ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( checkFunctionsAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , <STR_LIT> ) || TM . Options . FPDenormalMode == FPDenormal :: PreserveSign ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( checkFunctionsAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , <STR_LIT> ) || TM . Options . FPDenormalMode == FPDenormal :: PositiveZero ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else { if ( ! STI . hasVFP2Base ( ) ) { if ( STI . hasV7Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . hasVFP3Base ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } if ( checkFunctionsAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , <STR_LIT> ) || TM . Options . NoTrappingFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ;

if ( TM . Options . HonorSignDependentRoundingFPMathOption ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ;


<s> if ( ! Stubs . empty ( ) ) { OutStreamer -> SwitchSection ( TLOFMacho . getThreadLocalPointerSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( * OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer -> AddBlankLine ( ) ; } OutStreamer -> EmitAssemblerFlag ( MCAF_SubsectionsViaSymbols ) ; } if ( TT . isOSBinFormatCOFF ( ) ) { const auto & TLOF = static_cast < const TargetLoweringObjectFileCOFF & > ( getObjFileLowering ( ) ) ; std :: string Flags ; raw_string_ostream OS ( Flags ) ; for ( const auto & Function : M ) TLOF . emitLinkerFlagsForGlobal ( OS , & Function , * Mang ) ; for ( const auto & Global : M . globals ( ) ) TLOF . emitLinkerFlagsForGlobal ( OS , & Global , * Mang ) ; for ( const auto & Alias : M . aliases ( ) ) TLOF . emitLinkerFlagsForGlobal ( OS , & Alias , * Mang ) ;


<s> OutStreamer -> EmitLabel ( JTISymbol ) ; OutStreamer -> EmitDataRegion ( MCDR_DataRegionJT32 ) ; const MachineJumpTableInfo * MJTI = MF -> getJumpTableInfo ( ) ; const std :: vector < MachineJumpTableEntry > & JT = MJTI -> getJumpTables ( ) ; const std :: vector < MachineBasicBlock * > & JTBBs = JT [ JTI ] . MBBs ; for ( unsigned i = <NUM_LIT> , e = JTBBs . size ( ) ; i != e ; ++ i ) { MachineBasicBlock * MBB = JTBBs [ i ] ;

const MCExpr * Expr = MCSymbolRefExpr :: create ( MBB -> getSymbol ( ) , OutContext ) ;


<s> const MachineJumpTableInfo * MJTI = MF -> getJumpTableInfo ( ) ; const std :: vector < MachineJumpTableEntry > & JT = MJTI -> getJumpTables ( ) ; const std :: vector < MachineBasicBlock * > & JTBBs = JT [ JTI ] . MBBs ; for ( unsigned i = <NUM_LIT> , e = JTBBs . size ( ) ; i != e ; ++ i ) { MachineBasicBlock * MBB = JTBBs [ i ] ;


<s> Stubs = MMIMacho . GetHiddenGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer -> SwitchSection ( TLOFMacho . getNonLazySymbolPointerSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( * OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ;


<s> for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( * OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer -> AddBlankLine ( ) ; } Stubs = MMIMacho . GetHiddenGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer -> SwitchSection ( TLOFMacho . getNonLazySymbolPointerSection ( ) ) ; EmitAlignment ( <NUM_LIT> ) ; for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( * OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer -> AddBlankLine ( ) ; } OutStreamer -> EmitAssemblerFlag ( MCAF_SubsectionsViaSymbols ) ; }


<s> bool isThumb = TT . getArch ( ) == Triple :: thumb || TT . getArch ( ) == Triple :: thumbeb || TT . getSubArch ( ) == Triple :: <ISA_LIT>SubArch_v7m || TT . getSubArch ( ) == Triple :: <ISA_LIT>SubArch_v6m ; if ( ! M . getModuleInlineAsm ( ) . empty ( ) && isThumb ) OutStreamer -> EmitAssemblerFlag ( MCAF_Code16 ) ;


<s> if ( <STR_LIT> . contains ( Reg ) ) { const MachineFunction & MF = * MI -> getParent ( ) -> getParent ( ) ; const TargetRegisterInfo * TRI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; Reg = TRI -> getSubReg ( Reg , <STR_LIT> ) ; } O << <ISA_LIT>InstPrinter :: getRegisterName ( Reg ) ; break ; } case MachineOperand :: MO_Immediate : { int64_t Imm = MO . getImm ( ) ; O << '#' ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; else if ( TF == <STR_LIT> ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_GlobalAddress : { const GlobalValue * GV = MO . getGlobal ( ) ; if ( TF & <STR_LIT> ) O << <STR_LIT> ; else if ( TF & <STR_LIT> ) O << <STR_LIT> ; O << * Get<ISA_LIT>GVSymbol ( GV , TF ) ; printOffset ( MO . getOffset ( ) , O ) ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; break ; } case MachineOperand :: MO_ConstantPoolIndex : O << * GetCPISymbol ( MO . getIndex ( ) ) ; break ;


<s> ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( isPositionIndependent ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( checkDenormalAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , DenormalMode :: getPreserveSign ( ) ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( checkDenormalAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , DenormalMode :: getPositiveZero ( ) ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else { if ( ! STI . hasVFP2Base ( ) ) { if ( STI . hasV7Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . hasVFP3Base ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } if ( checkFunctionsAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , <STR_LIT> ) || TM . Options . NoTrappingFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( TM . Options . HonorSignDependentRoundingFPMathOption ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( STI . isAAPCS_ABI ( ) && TM . Options . FloatABIType == FloatABI :: Hard ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( MMI ) {

if ( const Module * SourceModule = MMI -> getModule ( ) ) {


<s> else if ( checkDenormalAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , DenormalMode :: getPositiveZero ( ) ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else { if ( ! STI . hasVFP2Base ( ) ) { if ( STI . hasV7Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . hasVFP3Base ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } if ( checkFunctionsAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , <STR_LIT> ) || TM . Options . NoTrappingFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( TM . Options . HonorSignDependentRoundingFPMathOption ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( STI . isAAPCS_ABI ( ) && TM . Options . FloatABIType == FloatABI :: Hard ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( MMI ) { if ( const Module * SourceModule = MMI -> getModule ( ) ) { if ( auto WCharWidthValue = mdconst :: extract_or_null < ConstantInt > ( SourceModule -> getModuleFlag ( <STR_LIT> ) ) ) { int WCharWidth = WCharWidthValue -> getZExtValue ( ) ; assert ( ( WCharWidth == <NUM_LIT> || WCharWidth == <NUM_LIT> ) && <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , WCharWidth ) ; } if ( auto EnumWidthValue = mdconst :: extract_or_null < ConstantInt > ( SourceModule -> getModuleFlag ( <STR_LIT> ) ) ) { int EnumWidth = EnumWidthValue -> getZExtValue ( ) ; assert ( ( EnumWidth == <NUM_LIT> || EnumWidth == <NUM_LIT> ) && <STR_LIT> ) ; int EnumBuildAttr = EnumWidth == <NUM_LIT> ? <NUM_LIT> : <NUM_LIT> ; ATS . emitAttribute ( <STR_LIT> , EnumBuildAttr ) ; } auto * PACValue = mdconst :: extract_or_null < ConstantInt > ( SourceModule -> getModuleFlag ( <STR_LIT> ) ) ; if ( PACValue && PACValue -> getZExtValue ( ) == <NUM_LIT> ) { if ( ! STI . hasPACBTI ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; }

auto * BTIValue = mdconst :: extract_or_null < ConstantInt > ( SourceModule -> getModuleFlag ( <STR_LIT> ) ) ;


<s> else ATS . emitFPU ( STI . hasFP16 ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( STI . hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , STI . hasV8_1aOps ( ) ? <STR_LIT> : <STR_LIT> ) ; } else { if ( STI . hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( STI . hasD16 ( ) ? ( STI . isFPOnlySP ( ) ? <STR_LIT> : <STR_LIT> ) : <STR_LIT> ) ; else if ( STI . hasVFP4 ( ) ) ATS . emitFPU ( STI . hasD16 ( ) ? ( STI . isFPOnlySP ( ) ? <STR_LIT> : <STR_LIT> ) : <STR_LIT> ) ; else if ( STI . hasVFP3 ( ) ) ATS . emitFPU ( STI . hasD16 ( ) ? ( STI . isFPOnlySP ( ) ? ( STI . hasFP16 ( ) ? <STR_LIT> : <STR_LIT> ) : ( STI . hasFP16 ( ) ? <STR_LIT> : <STR_LIT> ) ) : ( STI . hasFP16 ( ) ? <STR_LIT> : <STR_LIT> ) ) ; else if ( STI . hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( isPositionIndependent ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . isRWPI ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( isPositionIndependent ( ) || STI . isROPI ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( isPositionIndependent ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( TM . Options . HonorSignDependentRoundingFPMathOption ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( ! STI . hasVFP2 ( ) ) { if ( STI . hasV7Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . hasVFP3 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( STI . allowsUnalignedMem ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ;


<s> ATS . emitAttribute ( <STR_LIT> , Subtarget -> has<ISA_LIT>Ops ( ) ? <STR_LIT> : <STR_LIT> ) ; if ( Subtarget -> isThumb1Only ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( Subtarget -> hasThumb2 ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( Subtarget -> isAAPCS_ABI ( ) && TM . Options . FloatABIType == FloatABI :: Hard ) { ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ;


<s> Streamer . EmitULEB128IntValue ( item . Tag , <NUM_LIT> ) ; switch ( item . Type ) { case AttributeItemType :: NumericAttribute : Streamer . EmitULEB128IntValue ( item . IntValue , <NUM_LIT> ) ; break ; case AttributeItemType :: TextAttribute : Streamer . EmitBytes ( UppercaseString ( item . StringValue ) , <NUM_LIT> ) ; Streamer . EmitIntValue ( <NUM_LIT> , <NUM_LIT> ) ;


<s> AttributeItemType item = Contents [ i ] ; Streamer . EmitULEB128IntValue ( item . Tag , <NUM_LIT> ) ; switch ( item . Type ) { case AttributeItemType :: NumericAttribute : Streamer . EmitULEB128IntValue ( item . IntValue , <NUM_LIT> ) ; break ; case AttributeItemType :: TextAttribute : Streamer . EmitBytes ( UppercaseString ( item . StringValue ) , <NUM_LIT> ) ; Streamer . EmitIntValue ( <NUM_LIT> , <NUM_LIT> ) ; break ; default :


<s> if ( Subtarget -> hasNEON ( ) ) { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) { if ( Subtarget -> hasCrypto ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; } else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else ATS . emitFPU ( <STR_LIT> ) ; if ( Subtarget -> hasV8Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { if ( Subtarget -> hasFP<ISA_LIT>v8 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; else if ( Subtarget -> hasVFP4 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP3 ( ) ) ATS . emitFPU ( Subtarget -> hasD16 ( ) ? <STR_LIT> : <STR_LIT> ) ; else if ( Subtarget -> hasVFP2 ( ) ) ATS . emitFPU ( <STR_LIT> ) ; } if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; }

if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ;


<s> break ; } case MachineOperand :: MO_Immediate : { int64_t Imm = MO . getImm ( ) ; O << '#' ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_GlobalAddress : { const GlobalValue * GV = MO . getGlobal ( ) ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; O << * getSymbol ( GV ) ; printOffset ( MO . getOffset ( ) , O ) ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; break ; } case MachineOperand :: MO_ExternalSymbol : { O << * GetExternalSymbolSymbol ( MO . getSymbolName ( ) ) ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; break ; }


<s> void <ISA_LIT>AsmPrinter :: printOperand ( const MachineInstr * MI , int OpNum , raw_ostream & O , const char * Modifier ) { const MachineOperand & MO = MI -> getOperand ( OpNum ) ; unsigned TF = MO . getTargetFlags ( ) ; switch ( MO . getType ( ) ) { default : llvm_unreachable ( <STR_LIT> ) ; case MachineOperand :: MO_Register : { unsigned Reg = MO . getReg ( ) ; assert ( TargetRegisterInfo :: isPhysicalRegister ( Reg ) ) ; assert ( ! MO . getSubReg ( ) && <STR_LIT> ) ; if ( <STR_LIT> . contains ( Reg ) ) { const MachineFunction & MF = * MI -> getParent ( ) -> getParent ( ) ; const TargetRegisterInfo * TRI = MF . getTarget ( ) . getRegisterInfo ( ) ; Reg = TRI -> getSubReg ( Reg , <STR_LIT> ) ; } O << <ISA_LIT>InstPrinter :: getRegisterName ( Reg ) ; break ; } case MachineOperand :: MO_Immediate : { int64_t Imm = MO . getImm ( ) ; O << '#' ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; O << Imm ; break ; } case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_GlobalAddress : { const GlobalValue * GV = MO . getGlobal ( ) ; if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ; else if ( ( Modifier && strcmp ( Modifier , <STR_LIT> ) == <NUM_LIT> ) || ( TF == <STR_LIT> ) ) O << <STR_LIT> ;


<s> <ISA_LIT>AsmPrinter :: <ISA_LIT>AsmPrinter ( TargetMachine & TM , std :: unique_ptr < MCStreamer > Streamer ) : AsmPrinter ( TM , std :: move ( Streamer ) ) , Subtarget ( nullptr ) , AFI ( nullptr ) , MCP ( nullptr ) , InConstantPool ( false ) , OptimizationGoals ( - <NUM_LIT> ) {


<s> return ! any_of ( M , [ & ] ( const Function & F ) { StringRef AttrVal = F . getFnAttribute ( Attr ) . getValueAsString ( ) ;

return parseDenormalFPAttribute ( AttrVal ) != Value ;


<s> StringRef AttrVal = F . getFnAttribute ( Attr ) . getValueAsString ( ) ; return parseDenormalFPAttribute ( AttrVal ) != Value ;


<s> StringRef FS = TM . getTargetFeatureString ( ) ; std :: string ArchFS = <ISA_LIT>_MC :: Parse<ISA_LIT>Triple ( TT , CPU ) ; if ( ! FS . empty ( ) ) { if ( ! ArchFS . empty ( ) ) ArchFS = ( Twine ( ArchFS ) + <STR_LIT> + FS ) . str ( ) ; else ArchFS = std :: string ( FS ) ; } const <ISA_LIT>BaseTargetMachine & ATM = static_cast < const <ISA_LIT>BaseTargetMachine & > ( TM ) ; const <ISA_LIT>Subtarget STI ( TT , std :: string ( CPU ) , ArchFS , ATM , ATM . isLittleEndian ( ) ) ; ATS . emitTargetAttributes ( STI ) ; if ( isPositionIndependent ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . isRWPI ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( isPositionIndependent ( ) || STI . isROPI ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( isPositionIndependent ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( checkDenormalAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , DenormalMode :: getPreserveSign ( ) ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( checkDenormalAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , DenormalMode :: getPositiveZero ( ) ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else { if ( ! STI . hasVFP2Base ( ) ) { if ( STI . hasV7Ops ( ) ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } else if ( STI . hasVFP3Base ( ) ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } } if ( checkFunctionsAttributeConsistency ( * MMI -> getModule ( ) , <STR_LIT> , <STR_LIT> ) || TM . Options . NoTrappingFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else if ( ! TM . Options . UnsafeFPMath ) { ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( TM . Options . HonorSignDependentRoundingFPMathOption ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; } if ( TM . Options . NoInfsFPMath && TM . Options . NoNaNsFPMath ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; else ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <NUM_LIT> ) ; if ( STI . isAAPCS_ABI ( ) && TM . Options . FloatABIType == FloatABI :: Hard ) ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; ATS . emitAttribute ( <STR_LIT> , <STR_LIT> ) ; if ( MMI ) { if ( const Module * SourceModule = MMI -> getModule ( ) ) {

if ( auto WCharWidthValue = mdconst :: extract_or_null < ConstantInt > ( SourceModule -> getModuleFlag ( <STR_LIT> ) ) ) {


<s> void EmitConstantPool ( ) override {


<s> for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( * OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer -> AddBlankLine ( ) ; } Stubs = MMIMacho . GetThreadLocalGVStubList ( ) ; if ( ! Stubs . empty ( ) ) { OutStreamer -> SwitchSection ( TLOFMacho . getThreadLocalPointerSection ( ) ) ; emitAlignment ( Align ( <NUM_LIT> ) ) ; for ( auto & Stub : Stubs ) emitNonLazySymbolPointer ( * OutStreamer , Stub . first , Stub . second ) ; Stubs . clear ( ) ; OutStreamer -> AddBlankLine ( ) ; } OutStreamer -> emitAssemblerFlag ( MCAF_SubsectionsViaSymbols ) ;


OutStreamer -> emitDataRegion ( MCDR_DataRegionEnd ) ;


<s> } else { OutStreamer -> emitAssemblerFlag ( MCAF_Code32 ) ; } if ( AFI -> isCmseNSEntryFunction ( ) ) { MCSymbol * S = OutContext . getOrCreateSymbol ( <STR_LIT> + CurrentFnSym -> getName ( ) ) ;

emitLinkage ( & MF -> getFunction ( ) , S ) ;


<s> void <ISA_LIT>AsmPrinter :: emitGlobalVariable ( const GlobalVariable * GV ) { if ( PromotedGlobals . count ( GV ) ) return ;

AsmPrinter :: emitGlobalVariable ( GV ) ;


<s> void <ISA_LIT>AsmPrinter :: emitGlobalVariable ( const GlobalVariable * GV ) {

if ( PromotedGlobals . count ( GV ) ) return ;


<s> void <ISA_LIT>AsmPrinter :: emitInlineAsmEnd ( const MCSubtargetInfo & StartInfo , const MCSubtargetInfo * EndInfo ) const { const bool WasThumb = isThumb ( StartInfo ) ; if ( ! EndInfo || WasThumb != isThumb ( * EndInfo ) ) { OutStreamer -> emitAssemblerFlag ( WasThumb ? MCAF_Code16 : MCAF_Code32 ) ;


<s> OutStreamer -> emitLabel ( JTISymbol ) ; OutStreamer -> emitDataRegion ( MCDR_DataRegionJT32 ) ; const MachineJumpTableInfo * MJTI = MF -> getJumpTableInfo ( ) ; const std :: vector < MachineJumpTableEntry > & JT = MJTI -> getJumpTables ( ) ; const std :: vector < MachineBasicBlock * > & JTBBs = JT [ JTI ] . MBBs ; for ( MachineBasicBlock * MBB : JTBBs ) {


<s> unsigned JTI = MO1 . getIndex ( ) ; emitAlignment ( Align ( <NUM_LIT> ) ) ; MCSymbol * JTISymbol = Get<ISA_LIT>JTIPICJumpTableLabel ( JTI ) ; OutStreamer -> emitLabel ( JTISymbol ) ; const MachineJumpTableInfo * MJTI = MF -> getJumpTableInfo ( ) ;

const std :: vector < MachineJumpTableEntry > & JT = MJTI -> getJumpTables ( ) ;


<s> OutStreamer -> emitDataRegion ( OffsetWidth == <NUM_LIT> ? MCDR_DataRegionJT8 : MCDR_DataRegionJT16 ) ; for ( auto MBB : JTBBs ) { const MCExpr * MBBSymbolExpr = MCSymbolRefExpr :: create ( MBB -> getSymbol ( ) , OutContext ) ; MCSymbol * TBInstPC = GetCPISymbol ( MI -> getOperand ( <NUM_LIT> ) . getImm ( ) ) ; const MCExpr * Expr = MCBinaryExpr :: createAdd ( MCSymbolRefExpr :: create ( TBInstPC , OutContext ) , MCConstantExpr :: create ( <NUM_LIT> , OutContext ) , OutContext ) ; Expr = MCBinaryExpr :: createSub ( MBBSymbolExpr , Expr , OutContext ) ; Expr = MCBinaryExpr :: createDiv ( Expr , MCConstantExpr :: create ( <NUM_LIT> , OutContext ) , OutContext ) ; OutStreamer -> emitValue ( Expr , OffsetWidth ) ; }


<s> if ( ACPV -> isPromotedGlobal ( ) ) { auto * ACPC = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) ; for ( const auto * GV : ACPC -> promotedGlobals ( ) ) { if ( ! EmittedPromotedGlobalLabels . count ( GV ) ) { MCSymbol * GVSym = getSymbol ( GV ) ; OutStreamer -> emitLabel ( GVSym ) ; EmittedPromotedGlobalLabels . insert ( GV ) ; } } return emitGlobalConstant ( DL , ACPC -> getPromotedGlobalInit ( ) ) ; } MCSymbol * MCSym ; if ( ACPV -> isLSDA ( ) ) { MCSym = getMBBExceptionSym ( MF -> front ( ) ) ; } else if ( ACPV -> isBlockAddress ( ) ) { const BlockAddress * BA = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) -> getBlockAddress ( ) ; MCSym = GetBlockAddressSymbol ( BA ) ; } else if ( ACPV -> isGlobalValue ( ) ) { const GlobalValue * GV = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) -> getGV ( ) ; unsigned char TF = Subtarget -> isTargetMachO ( ) ? <STR_LIT> : <NUM_LIT> ; MCSym = Get<ISA_LIT>GVSymbol ( GV , TF ) ; } else if ( ACPV -> isMachineBasicBlock ( ) ) { const MachineBasicBlock * MBB = cast < <ISA_LIT>ConstantPoolMBB > ( ACPV ) -> getMBB ( ) ; MCSym = MBB -> getSymbol ( ) ; } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; auto Sym = cast < <ISA_LIT>ConstantPoolSymbol > ( ACPV ) -> getSymbol ( ) ; MCSym = GetExternalSymbolSymbol ( Sym ) ; } const MCExpr * Expr = MCSymbolRefExpr :: create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( DL . getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: createAdd ( PCRelExpr , MCConstantExpr :: create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . createTempSymbol ( ) ;


<s> MCSymbol * GVSym = getSymbol ( GV ) ; OutStreamer -> emitLabel ( GVSym ) ; EmittedPromotedGlobalLabels . insert ( GV ) ; } } return emitGlobalConstant ( DL , ACPC -> getPromotedGlobalInit ( ) ) ; } MCSymbol * MCSym ; if ( ACPV -> isLSDA ( ) ) { MCSym = getMBBExceptionSym ( MF -> front ( ) ) ; } else if ( ACPV -> isBlockAddress ( ) ) { const BlockAddress * BA = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) -> getBlockAddress ( ) ; MCSym = GetBlockAddressSymbol ( BA ) ; } else if ( ACPV -> isGlobalValue ( ) ) { const GlobalValue * GV = cast < <ISA_LIT>ConstantPoolConstant > ( ACPV ) -> getGV ( ) ; unsigned char TF = Subtarget -> isTargetMachO ( ) ? <STR_LIT> : <NUM_LIT> ; MCSym = Get<ISA_LIT>GVSymbol ( GV , TF ) ; } else if ( ACPV -> isMachineBasicBlock ( ) ) { const MachineBasicBlock * MBB = cast < <ISA_LIT>ConstantPoolMBB > ( ACPV ) -> getMBB ( ) ; MCSym = MBB -> getSymbol ( ) ; } else { assert ( ACPV -> isExtSymbol ( ) && <STR_LIT> ) ; auto Sym = cast < <ISA_LIT>ConstantPoolSymbol > ( ACPV ) -> getSymbol ( ) ; MCSym = GetExternalSymbolSymbol ( Sym ) ; } const MCExpr * Expr = MCSymbolRefExpr :: create ( MCSym , getModifierVariantKind ( ACPV -> getModifier ( ) ) , OutContext ) ; if ( ACPV -> getPCAdjustment ( ) ) { MCSymbol * PCLabel = getPICLabel ( DL . getPrivateGlobalPrefix ( ) , getFunctionNumber ( ) , ACPV -> getLabelId ( ) , OutContext ) ; const MCExpr * PCRelExpr = MCSymbolRefExpr :: create ( PCLabel , OutContext ) ; PCRelExpr = MCBinaryExpr :: createAdd ( PCRelExpr , MCConstantExpr :: create ( ACPV -> getPCAdjustment ( ) , OutContext ) , OutContext ) ; if ( ACPV -> mustAddCurrentAddress ( ) ) { MCSymbol * DotSym = OutContext . createTempSymbol ( ) ; OutStreamer -> emitLabel ( DotSym ) ; const MCExpr * DotExpr = MCSymbolRefExpr :: create ( DotSym , OutContext ) ; PCRelExpr = MCBinaryExpr :: createSub ( PCRelExpr , DotExpr , OutContext ) ; } Expr = MCBinaryExpr :: createSub ( Expr , PCRelExpr , OutContext ) ;


<s> if ( MCSym . getInt ( ) ) OutStreamer . emitIntValue ( <NUM_LIT> , <NUM_LIT> ) ; else OutStreamer . emitValue ( MCSymbolRefExpr :: create ( MCSym . getPointer ( ) , OutStreamer . getContext ( ) ) , <NUM_LIT> ) ;


<s> static void emitNonLazySymbolPointer ( MCStreamer & OutStreamer , MCSymbol * StubLabel , MachineModuleInfoImpl :: StubValueTy & MCSym ) { OutStreamer . emitLabel ( StubLabel ) ; OutStreamer . emitSymbolAttribute ( MCSym . getPointer ( ) , MCSA_IndirectSymbol ) ; if ( MCSym . getInt ( ) ) OutStreamer . emitIntValue ( <NUM_LIT> , <NUM_LIT> ) ;

else OutStreamer . emitValue ( MCSymbolRefExpr :: create ( MCSym . getPointer ( ) , OutStreamer . getContext ( ) ) , <NUM_LIT> ) ;


<s> if ( TT . isOSBinFormatELF ( ) ) emitAttributes ( ) ;

if ( ! M . getModuleInlineAsm ( ) . empty ( ) && TT . isThumb ( ) ) OutStreamer -> emitAssemblerFlag ( MCAF_Code16 ) ;


<s> void <ISA_LIT>AsmPrinter :: emitXXStructor ( const DataLayout & DL , const Constant * CV ) { uint64_t Size = getDataLayout ( ) . getTypeAllocSize ( CV -> getType ( ) ) ; assert ( Size && <STR_LIT> ) ; const GlobalValue * GV = dyn_cast < GlobalValue > ( CV -> stripPointerCasts ( ) ) ; assert ( GV && <STR_LIT> ) ;

const MCExpr * E = MCSymbolRefExpr :: create ( Get<ISA_LIT>GVSymbol ( GV , <STR_LIT> ) , ( Subtarget -> isTargetELF ( ) ? MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 : MCSymbolRefExpr :: VK_None ) , OutContext ) ;


<s> const MCExpr * E = MCSymbolRefExpr :: create ( Get<ISA_LIT>GVSymbol ( GV , <STR_LIT> ) , ( Subtarget -> isTargetELF ( ) ? MCSymbolRefExpr :: VK_<ISA_LIT>_TARGET1 : MCSymbolRefExpr :: VK_None ) , OutContext ) ; OutStreamer -> emitValue ( E , Size ) ;


<s> if ( Subtarget -> isTargetMachO ( ) ) { bool IsIndirect = ( TargetFlags & <STR_LIT> ) && Subtarget -> isGVIndirectSymbol ( GV ) ; if ( ! IsIndirect ) return getSymbol ( GV ) ; MCSymbol * MCSym = getSymbolWithGlobalValueBase ( GV , <STR_LIT> ) ; MachineModuleInfoMachO & MMIMachO = MMI -> getObjFileInfo < MachineModuleInfoMachO > ( ) ; MachineModuleInfoImpl :: StubValueTy & StubSym = GV -> isThreadLocal ( ) ? MMIMachO . getThreadLocalGVStubEntry ( MCSym ) : MMIMachO . getGVStubEntry ( MCSym ) ; if ( ! StubSym . getPointer ( ) ) StubSym = MachineModuleInfoImpl :: StubValueTy ( getSymbol ( GV ) , ! GV -> hasInternalLinkage ( ) ) ; return MCSym ; } else if ( Subtarget -> isTargetCOFF ( ) ) { assert ( Subtarget -> isTargetWindows ( ) && <STR_LIT> ) ; bool IsIndirect = ( TargetFlags & ( <STR_LIT> | <STR_LIT> ) ) ; if ( ! IsIndirect ) return getSymbol ( GV ) ; SmallString < <NUM_LIT> > Name ;

if ( TargetFlags & <STR_LIT> ) Name = <STR_LIT> ;


<s> static MCSymbol * getBFLabel ( StringRef Prefix , unsigned FunctionNumber , unsigned LabelId , MCContext & Ctx ) {

MCSymbol * Label = Ctx . getOrCreateSymbol ( Twine ( Prefix ) + <STR_LIT> + Twine ( FunctionNumber ) + <STR_LIT> + Twine ( LabelId ) ) ;


<s> static MCSymbol * getBFLabel ( StringRef Prefix , unsigned FunctionNumber , unsigned LabelId , MCContext & Ctx ) { MCSymbol * Label = Ctx . getOrCreateSymbol ( Twine ( Prefix ) + <STR_LIT> + Twine ( FunctionNumber ) + <STR_LIT> + Twine ( LabelId ) ) ; return Label ;


<s> MCSymbol * <ISA_LIT>AsmPrinter :: GetCPISymbol ( unsigned CPID ) const {

const DataLayout & DL = getDataLayout ( ) ;


<s> RegisterAsmPrinter < <ISA_LIT>AsmPrinter > A ( getTheThumbLETarget ( ) ) ;

RegisterAsmPrinter < <ISA_LIT>AsmPrinter > B ( getTheThumbBETarget ( ) ) ;


<s> LLVM_EXTERNAL_VISIBILITY void LLVMInitialize<ISA_LIT>AsmPrinter ( ) { RegisterAsmPrinter < <ISA_LIT>AsmPrinter > X ( getThe<ISA_LIT>LETarget ( ) ) ; RegisterAsmPrinter < <ISA_LIT>AsmPrinter > Y ( getThe<ISA_LIT>BETarget ( ) ) ; RegisterAsmPrinter < <ISA_LIT>AsmPrinter > A ( getTheThumbLETarget ( ) ) ;


<s> if ( ExtraCode [ <NUM_LIT> ] != <NUM_LIT> ) return true ; switch ( ExtraCode [ <NUM_LIT> ] ) { case 'A' : default : return true ; case 'm' : if ( ! MI -> getOperand ( OpNum ) . isReg ( ) ) return true ; O << <ISA_LIT>InstPrinter :: getRegisterName ( MI -> getOperand ( OpNum ) . getReg ( ) ) ; return false ; } }

const MachineOperand & MO = MI -> getOperand ( OpNum ) ;


<s> switch ( ExtraCode [ <NUM_LIT> ] ) { case 'A' : default : return true ; case 'm' : if ( ! MI -> getOperand ( OpNum ) . isReg ( ) ) return true ;

O << <ISA_LIT>InstPrinter :: getRegisterName ( MI -> getOperand ( OpNum ) . getReg ( ) ) ;


<s> assert ( Register :: isPhysicalRegister ( Reg ) ) ; assert ( ! MO . getSubReg ( ) && <STR_LIT> ) ; if ( <STR_LIT> . contains ( Reg ) ) { const MachineFunction & MF = * MI -> getParent ( ) -> getParent ( ) ; const TargetRegisterInfo * TRI = MF . getSubtarget ( ) . getRegisterInfo ( ) ; Reg = TRI -> getSubReg ( Reg , <STR_LIT> ) ; } O << <ISA_LIT>InstPrinter :: getRegisterName ( Reg ) ; break ; } case MachineOperand :: MO_Immediate : { O << '#' ; unsigned TF = MO . getTargetFlags ( ) ; if ( TF == <STR_LIT> ) O << <STR_LIT> ; else if ( TF == <STR_LIT> ) O << <STR_LIT> ; O << MO . getImm ( ) ; break ; } case MachineOperand :: MO_MachineBasicBlock : MO . getMBB ( ) -> getSymbol ( ) -> print ( O , MAI ) ; return ; case MachineOperand :: MO_GlobalAddress : { PrintSymbolOperand ( MO , O ) ; break ; } case MachineOperand :: MO_ConstantPoolIndex : if ( Subtarget -> genExecuteOnly ( ) ) llvm_unreachable ( <STR_LIT> ) ; GetCPISymbol ( MO . getIndex ( ) ) -> print ( O , MAI ) ; break ;


<s> unsigned TF = MO . getTargetFlags ( ) ; if ( TF & <STR_LIT> ) O << <STR_LIT> ; else if ( TF & <STR_LIT> ) O << <STR_LIT> ;

Get<ISA_LIT>GVSymbol ( MO . getGlobal ( ) , TF ) -> print ( O , MAI ) ;


<s> void <ISA_LIT>AsmPrinter :: PrintSymbolOperand ( const MachineOperand & MO , raw_ostream & O ) { assert ( MO . isGlobal ( ) && <STR_LIT> ) ; unsigned TF = MO . getTargetFlags ( ) ; if ( TF & <STR_LIT> ) O << <STR_LIT> ;

else if ( TF & <STR_LIT> ) O << <STR_LIT> ;


<s> if ( OptimizationGoals == - <NUM_LIT> ) OptimizationGoals = OptimizationGoal ; else if ( OptimizationGoals != ( int ) OptimizationGoal ) OptimizationGoals = <NUM_LIT> ; if ( Subtarget -> isTargetCOFF ( ) ) { bool Internal = F . hasInternalLinkage ( ) ; COFF :: SymbolStorageClass Scl = Internal ? COFF :: IMAGE_SYM_CLASS_STATIC : COFF :: IMAGE_SYM_CLASS_EXTERNAL ; int Type = COFF :: IMAGE_SYM_DTYPE_FUNCTION << COFF :: SCT_COMPLEX_TYPE_SHIFT ; OutStreamer -> BeginCOFFSymbolDef ( CurrentFnSym ) ; OutStreamer -> EmitCOFFSymbolStorageClass ( Scl ) ; OutStreamer -> EmitCOFFSymbolType ( Type ) ; OutStreamer -> EndCOFFSymbolDef ( ) ; } emitFunctionBody ( ) ; emitXRayTable ( ) ; if ( ! ThumbIndirectPads . empty ( ) ) { OutStreamer -> emitAssemblerFlag ( MCAF_Code16 ) ; emitAlignment ( Align ( <NUM_LIT> ) ) ; for ( std :: pair < unsigned , MCSymbol * > & TIP : ThumbIndirectPads ) { OutStreamer -> emitLabel ( TIP . second ) ; EmitToStreamer ( * OutStreamer , MCInstBuilder ( <STR_LIT> ) . addReg ( TIP . first ) . addImm ( <STR_LIT> ) . addReg ( <NUM_LIT> ) ) ; } ThumbIndirectPads . clear ( ) ; }


<s> case AddrModeT1_s : return <STR_LIT> ; case AddrModeT2_i12 : return <STR_LIT> ; case AddrModeT2_i8 : return <STR_LIT> ; case AddrModeT2_so : return <STR_LIT> ; case AddrModeT2_pc : return <STR_LIT> ; case AddrModeT2_i8s4 : return <STR_LIT> ; case AddrMode_i12 : return <STR_LIT> ; case AddrModeT2_ldrex : return <STR_LIT> ; case AddrModeT2_i7s4 : return <STR_LIT> ; case AddrModeT2_i7s2 : return <STR_LIT> ; case AddrModeT2_i7 : return <STR_LIT> ;


<s> case AddrModeNone : return <STR_LIT> ; case AddrMode1 : return <STR_LIT> ; case AddrMode2 : return <STR_LIT> ; case AddrMode3 : return <STR_LIT> ; case AddrMode4 : return <STR_LIT> ; case AddrMode5 : return <STR_LIT> ; case AddrMode5FP16 : return <STR_LIT> ; case AddrMode6 : return <STR_LIT> ;


<s> case R2 : case S2 : case D2 : case Q2 : return <NUM_LIT> ; case R3 : case S3 : case D3 : case Q3 : return <NUM_LIT> ; case R4 : case S4 : case D4 : case Q4 : return <NUM_LIT> ; case R5 : case S5 : case D5 : case Q5 : return <NUM_LIT> ; case R6 : case S6 : case D6 : case Q6 : return <NUM_LIT> ; case R7 : case S7 : case D7 : case Q7 : return <NUM_LIT> ; case R8 : case S8 : case D8 : case Q8 : return <NUM_LIT> ; case R9 : case S9 : case D9 : case Q9 : return <NUM_LIT> ; case R10 : case S10 : case D10 : case Q10 : return <NUM_LIT> ; case R11 : case S11 : case D11 : case Q11 : return <NUM_LIT> ; case R12 : case S12 : case D12 : case Q12 : return <NUM_LIT> ; case SP : case S13 : case D13 : case Q13 : return <NUM_LIT> ; case LR : case S14 : case D14 : case Q14 : return <NUM_LIT> ;

case PC : case S15 : case D15 : case Q15 : return <NUM_LIT> ;


<s> switch ( CC ) { case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ; case <STR_LIT> : return <STR_LIT> ;


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


<s> case MI : return PL ; case PL : return MI ; case VS : return VC ; case VC : return VS ; case HI : return LS ; case LS : return HI ; case GE : return LT ; case LT : return GE ; case GT : return LE ; case LE : return GT ; case PRI : llvm_unreachable ( <STR_LIT> ) ; }


<s> return StringSwitch < unsigned > ( CC . lower ( ) ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ;


<s> inline static unsigned <ISA_LIT>VectorCondCodeFromString ( StringRef CC ) { return StringSwitch < unsigned > ( CC . lower ( ) ) . Case ( <STR_LIT> , <STR_LIT> ) . Case ( <STR_LIT> , <STR_LIT> ) . Default ( ~ <NUM_LIT> ) ;


<s> switch ( CC ) { case <STR_LIT> : return <STR_LIT> ;


<s> return ( FeaturesRequired & ActiveFeatures ) == FeaturesRequired ;


<s> bool isInRequiredFeatures ( FeatureBitset TestFeatures ) const {

return ( FeaturesRequired & TestFeatures ) == TestFeatures ;


<s> case R0 : case S0 : case D0 : case Q0 : return <NUM_LIT> ; case R1 : case S1 : case D1 : case Q1 : return <NUM_LIT> ; case R2 : case S2 : case D2 : case Q2 : return <NUM_LIT> ; case R3 : case S3 : case D3 : case Q3 : return <NUM_LIT> ; case R4 : case S4 : case D4 : case Q4 : return <NUM_LIT> ; case R5 : case S5 : case D5 : case Q5 : return <NUM_LIT> ; case R6 : case S6 : case D6 : case Q6 : return <NUM_LIT> ; case R7 : case S7 : case D7 : case Q7 : return <NUM_LIT> ; case R8 : case S8 : case D8 : case Q8 : return <NUM_LIT> ; case R9 : case S9 : case D9 : case Q9 : return <NUM_LIT> ; case R10 : case S10 : case D10 : case Q10 : return <NUM_LIT> ; case R11 : case S11 : case D11 : case Q11 : return <NUM_LIT> ; case R12 : case S12 : case D12 : case Q12 : return <NUM_LIT> ; case SP : case S13 : case D13 : case Q13 : return <NUM_LIT> ; case LR : case S14 : case D14 : case Q14 : return <NUM_LIT> ; case PC : case S15 : case D15 : case Q15 : return <NUM_LIT> ; case S16 : case D16 : return <NUM_LIT> ; case S17 : case D17 : return <NUM_LIT> ; case S18 : case D18 : return <NUM_LIT> ; case S19 : case D19 : return <NUM_LIT> ; case S20 : case D20 : return <NUM_LIT> ; case S21 : case D21 : return <NUM_LIT> ; case S22 : case D22 : return <NUM_LIT> ; case S23 : case D23 : return <NUM_LIT> ; case S24 : case D24 : return <NUM_LIT> ; case S25 : case D25 : return <NUM_LIT> ; case S26 : case D26 : return <NUM_LIT> ; case S27 : case D27 : return <NUM_LIT> ; case S28 : case D28 : return <NUM_LIT> ; case S29 : case D29 : return <NUM_LIT> ; case S30 : case D30 : return <NUM_LIT> ; case S31 : case D31 : return <NUM_LIT> ; case D0_D2 : return <NUM_LIT> ; case D1_D2 : case D1_D3 : return <NUM_LIT> ; case D2_D4 : return <NUM_LIT> ; case D3_D4 : case D3_D5 : return <NUM_LIT> ; case D4_D6 : return <NUM_LIT> ; case D5_D6 : case D5_D7 : return <NUM_LIT> ; case D6_D8 : return <NUM_LIT> ; case D7_D8 : case D7_D9 : return <NUM_LIT> ; case D8_D10 : return <NUM_LIT> ; case D9_D10 : case D9_D11 : return <NUM_LIT> ; case D10_D12 : return <NUM_LIT> ; case D11_D12 : case D11_D13 : return <NUM_LIT> ; case D12_D14 : return <NUM_LIT> ; case D13_D14 : case D13_D15 : return <NUM_LIT> ; case D14_D16 : return <NUM_LIT> ; case D15_D16 : case D15_D17 : return <NUM_LIT> ;


<s> switch ( NumInsts ) { case <NUM_LIT> : return <STR_LIT> ; case <NUM_LIT> : return <STR_LIT> ; case <NUM_LIT> : return <STR_LIT> ; case <NUM_LIT> : return <STR_LIT> ; default : break ;


<s> switch ( NumInsts ) { case <NUM_LIT> : return <STR_LIT> ; case <NUM_LIT> : return <STR_LIT> ; case <NUM_LIT> :


<s> <STR_LIT> expandPredBlockMask ( <STR_LIT> BlockMask , <STR_LIT> Kind ) { using PredBlockMask = <STR_LIT> ; assert ( Kind != <STR_LIT> && <STR_LIT> ) ; assert ( countTrailingZeros ( ( unsigned ) BlockMask ) != <NUM_LIT> && <STR_LIT> ) ; auto ChooseMask = [ & ] ( PredBlockMask AddedThen , PredBlockMask AddedElse ) { return Kind == <STR_LIT> ? AddedThen : AddedElse ; } ; switch ( BlockMask ) { case PredBlockMask :: T :

return ChooseMask ( PredBlockMask :: TT , PredBlockMask :: TE ) ;


<s> inline static const char * AddrModeToString ( AddrMode addrmode ) { switch ( addrmode ) { case AddrModeNone : return <STR_LIT> ; case AddrMode1 : return <STR_LIT> ; case AddrMode2 : return <STR_LIT> ; case AddrMode3 : return <STR_LIT> ; case AddrMode4 : return <STR_LIT> ; case AddrMode5 : return <STR_LIT> ; case AddrMode5FP16 : return <STR_LIT> ; case AddrMode6 : return <STR_LIT> ; case AddrModeT1_1 : return <STR_LIT> ; case AddrModeT1_2 : return <STR_LIT> ; case AddrModeT1_4 : return <STR_LIT> ; case AddrModeT1_s : return <STR_LIT> ; case AddrModeT2_i12 : return <STR_LIT> ; case AddrModeT2_i8 : return <STR_LIT> ;


<s> case AddrModeT2_i8neg : return <STR_LIT> ; case AddrModeT2_so : return <STR_LIT> ; case AddrModeT2_pc : return <STR_LIT> ; case AddrModeT2_i8s4 : return <STR_LIT> ; case AddrMode_i12 : return <STR_LIT> ; case AddrModeT2_ldrex : return <STR_LIT> ; case AddrModeT2_i7s4 : return <STR_LIT> ; case AddrModeT2_i7s2 : return <STR_LIT> ; case AddrModeT2_i7 : return <STR_LIT> ; }


<s> case RESERVED_10 : return <STR_LIT> ; case RESERVED_11 : return <STR_LIT> ; case RESERVED_12 : return <STR_LIT> ; case RESERVED_13 : return <STR_LIT> ; case RESERVED_14 : return <STR_LIT> ; case SY : return <STR_LIT> ; }


<s> case AddrMode4 : return <STR_LIT> ; case AddrMode5 : return <STR_LIT> ; case AddrMode6 : return <STR_LIT> ; case AddrModeT1_1 : return <STR_LIT> ; case AddrModeT1_2 : return <STR_LIT> ; case AddrModeT1_4 : return <STR_LIT> ; case AddrModeT1_s : return <STR_LIT> ; case AddrModeT2_i12 : return <STR_LIT> ; case AddrModeT2_i8 : return <STR_LIT> ; case AddrModeT2_so : return <STR_LIT> ; case AddrModeT2_pc : return <STR_LIT> ;

case AddrModeT2_i8s4 : return <STR_LIT> ;


<s> inline static const char * AddrModeToString ( AddrMode addrmode ) { switch ( addrmode ) { case AddrModeNone : return <STR_LIT> ; case AddrMode1 : return <STR_LIT> ; case AddrMode2 : return <STR_LIT> ; case AddrMode3 : return <STR_LIT> ; case AddrMode4 : return <STR_LIT> ; case AddrMode5 : return <STR_LIT> ; case AddrMode6 : return <STR_LIT> ; case AddrModeT1_1 : return <STR_LIT> ; case AddrModeT1_2 : return <STR_LIT> ; case AddrModeT1_4 : return <STR_LIT> ; case AddrModeT1_s : return <STR_LIT> ; case AddrModeT2_i12 : return <STR_LIT> ; case AddrModeT2_i8 : return <STR_LIT> ; case AddrModeT2_so : return <STR_LIT> ; case AddrModeT2_pc : return <STR_LIT> ; case AddrModeT2_i8s4 : return <STR_LIT> ; case AddrMode_i12 : return <STR_LIT> ;


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


<s> inline static const char * IFlagsToString ( unsigned val ) { switch ( val ) { default : llvm_unreachable ( <STR_LIT> ) ; case F : return <STR_LIT> ; case I : return <STR_LIT> ; case A : return <STR_LIT> ; }


<s> inline static const char * IModToString ( unsigned val ) { switch ( val ) { default : llvm_unreachable ( <STR_LIT> ) ; case IE : return <STR_LIT> ;


<s> switch ( val ) { default : llvm_unreachable ( <STR_LIT> ) ; case IE : return <STR_LIT> ; case ID : return <STR_LIT> ; }


<s> static inline bool is<ISA_LIT>LowRegister ( unsigned Reg ) { using namespace <ISA_LIT> ; switch ( Reg ) { case R0 : case R1 : case R2 : case R3 : case R4 : case R5 : case R6 : case R7 : return true ; default :


<s> return lookupMClassSysRegByM2M3Encoding8 ( ( <NUM_LIT> << <NUM_LIT> ) | ( SYSm & <NUM_LIT> ) ) ;


<s> const MClassSysReg * lookupMClassSysRegBy12bitSYSmValue ( unsigned SYSm ) {

return lookupMClassSysRegByM1Encoding12 ( SYSm ) ;


<s> const MClassSysReg * lookupMClassSysRegBy12bitSYSmValue ( unsigned SYSm ) { return lookupMClassSysRegByM1Encoding12 ( SYSm ) ;


<s> const MClassSysReg * lookupMClassSysRegBy8bitSYSmValue ( unsigned SYSm ) {

return <STR_LIT> ( ( <NUM_LIT> << <NUM_LIT> ) | ( SYSm & <NUM_LIT> ) ) ;


<s> case ISHLD : return HasV8 ? <STR_LIT> : <STR_LIT> ; case RESERVED_8 : return <STR_LIT> ; case NSH : return <STR_LIT> ; case NSHST : return <STR_LIT> ; case NSHLD : return HasV8 ? <STR_LIT> : <STR_LIT> ; case RESERVED_4 : return <STR_LIT> ; case OSH : return <STR_LIT> ; case OSHST : return <STR_LIT> ; case OSHLD : return HasV8 ? <STR_LIT> : <STR_LIT> ; case RESERVED_0 : return <STR_LIT> ;


<s> case NSHST : return <STR_LIT> ; case NSHLD : return HasV8 ? <STR_LIT> : <STR_LIT> ; case RESERVED_4 : return <STR_LIT> ; case OSH : return <STR_LIT> ; case OSHST : return <STR_LIT> ;

case OSHLD : return HasV8 ? <STR_LIT> : <STR_LIT> ;


<s> return MIB . addImm ( ( int64_t ) <STR_LIT> ) . addReg ( <NUM_LIT> ) ;


<s> static inline const MachineInstrBuilder & AddDefaultT1CC ( const MachineInstrBuilder & MIB , bool isDead = false ) { return MIB . addReg ( <STR_LIT> , getDefRegState ( true ) | getDeadRegState ( isDead ) ) ;


<s> static inline const MachineInstrBuilder & AddNoT1CC ( const MachineInstrBuilder & MIB ) {


<s> break ; } switch ( Load2 -> getMachineOpcode ( ) ) { default : return false ; 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> : break ; } if ( Load1 -> getOperand ( <NUM_LIT> ) != Load2 -> getOperand ( <NUM_LIT> ) || Load1 -> getOperand ( <NUM_LIT> ) != Load2 -> getOperand ( <NUM_LIT> ) ) return false ; if ( Load1 -> getOperand ( <NUM_LIT> ) != Load2 -> getOperand ( <NUM_LIT> ) ) return false ; if ( isa < ConstantSDNode > ( Load1 -> getOperand ( <NUM_LIT> ) ) && isa < ConstantSDNode > ( Load2 -> getOperand ( <NUM_LIT> ) ) ) {

Offset1 = cast < ConstantSDNode > ( Load1 -> getOperand ( <NUM_LIT> ) ) -> getSExtValue ( ) ;


<s> void <ISA_LIT>BaseInstrInfo :: copyPhysReg ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator I , DebugLoc DL , unsigned DestReg , unsigned SrcReg , bool KillSrc ) const { bool GPRDest = <STR_LIT> . contains ( DestReg ) ; bool GPRSrc = <STR_LIT> . contains ( SrcReg ) ; if ( GPRDest && GPRSrc ) { AddDefaultCC ( AddDefaultPred ( BuildMI ( MBB , I , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ) ) ; return ; } bool SPRDest = <STR_LIT> . contains ( DestReg ) ; bool SPRSrc = <STR_LIT> . contains ( SrcReg ) ; unsigned Opc = <NUM_LIT> ; if ( SPRDest && SPRSrc ) Opc = <STR_LIT> ; else if ( GPRDest && SPRSrc ) Opc = <STR_LIT> ; else if ( SPRDest && GPRSrc ) Opc = <STR_LIT> ; else if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) Opc = <STR_LIT> ; else if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) Opc = <STR_LIT> ; if ( Opc ) { MachineInstrBuilder MIB = BuildMI ( MBB , I , DL , get ( Opc ) , DestReg ) ; MIB . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; if ( Opc == <STR_LIT> ) MIB . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; AddDefaultPred ( MIB ) ; return ; } unsigned BeginIdx = <NUM_LIT> ; unsigned SubRegs = <NUM_LIT> ; int Spacing = <NUM_LIT> ; if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) Opc = <STR_LIT> , BeginIdx = <STR_LIT> , SubRegs = <NUM_LIT> ;

else if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) Opc = <STR_LIT> , BeginIdx = <STR_LIT> , SubRegs = <NUM_LIT> ;


<s> unsigned Opc = isSub ? <STR_LIT> : <STR_LIT> ;

BuildMI ( MBB , MBBI , dl , TII . get ( Opc ) , DestReg ) . addReg ( BaseReg , RegState :: Kill ) . addImm ( ThisVal ) . addImm ( ( unsigned ) Pred ) . addReg ( PredReg ) . addReg ( <NUM_LIT> ) . setMIFlags ( MIFlags ) ;


<s> static const MachineInstr * getBundledDefMI ( const TargetRegisterInfo * TRI , const MachineInstr * MI , unsigned Reg , unsigned & DefIdx , unsigned & Dist ) { Dist = <NUM_LIT> ;

MachineBasicBlock :: const_iterator I = MI ; ++ I ;