<s> explicit <ISA_LIT>AsmPrinter ( formatted_raw_ostream & o , TargetMachine & tm , const TargetAsmInfo * T , bool V ) : AsmPrinter ( o , tm , T , V ) {


<s> bool <ISA_LIT>AsmPrinter :: doInitialization ( Module & M ) { if ( TM . getSubtarget < <ISA_LIT>Subtarget > ( ) . hasCT ( ) ) O << <STR_LIT> ; else O << <STR_LIT> ; O << <STR_LIT> ; return AsmPrinter :: doInitialization ( M ) ;


<s> if ( ExtraCode && ExtraCode [ <NUM_LIT> ] ) return true ; O << <STR_LIT> ; printOperand ( MI , OpNo ) ; O << <STR_LIT> ;


<s> printOperand ( MI , OpNo ) ; return false ;


<s> O << RI . get ( MO . getReg ( ) ) . AsmName ; return ; case MachineOperand :: MO_Immediate : llvm_unreachable ( <STR_LIT> ) ; return ; case MachineOperand :: MO_MachineBasicBlock : printBasicBlockLabel ( MO . getMBB ( ) ) ; return ; case MachineOperand :: MO_ConstantPoolIndex : O << TAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << MO . getIndex ( ) ; return ; case MachineOperand :: MO_ExternalSymbol : O << MO . getSymbolName ( ) ; return ; case MachineOperand :: MO_GlobalAddress : O << Mang -> getMangledName ( MO . getGlobal ( ) ) ; return ; case MachineOperand :: MO_JumpTableIndex : O << TAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << '_' << MO . getIndex ( ) ; return ; default :

O << <STR_LIT> << MO . getType ( ) << <STR_LIT> ;


<s> return ; case MachineOperand :: MO_MachineBasicBlock : printBasicBlockLabel ( MO . getMBB ( ) ) ; return ; case MachineOperand :: MO_ConstantPoolIndex : O << TAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << MO . getIndex ( ) ; return ; case MachineOperand :: MO_ExternalSymbol : O << MO . getSymbolName ( ) ; return ; case MachineOperand :: MO_GlobalAddress : O << Mang -> getMangledName ( MO . getGlobal ( ) ) ; return ; case MachineOperand :: MO_JumpTableIndex : O << TAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << '_' << MO . getIndex ( ) ; return ; default :


<s> if ( MO . getType ( ) == MachineOperand :: MO_Register ) { assert ( TargetRegisterInfo :: isPhysicalRegister ( MO . getReg ( ) ) && <STR_LIT> ) ; O << TM . getRegisterInfo ( ) -> get ( MO . getReg ( ) ) . AsmName ; } else if ( MO . isImm ( ) ) { O << MO . getImm ( ) ; assert ( MO . getImm ( ) < ( <NUM_LIT> << <NUM_LIT> ) ) ;


<s> O << <STR_LIT> ; EmitConstantPool ( MF . getConstantPool ( ) ) ; EmitJumpTableInfo ( MF . getJumpTableInfo ( ) , MF ) ; const Function * F = MF . getFunction ( ) ; OutStreamer . SwitchSection ( getObjFileLowering ( ) . SectionForGlobal ( F , Mang , TM ) ) ; EmitAlignment ( MF . getAlignment ( ) , F ) ; switch ( F -> getLinkage ( ) ) { default : llvm_unreachable ( <STR_LIT> ) ; case Function :: InternalLinkage : case Function :: PrivateLinkage : case Function :: LinkerPrivateLinkage : break ; case Function :: ExternalLinkage : O << <STR_LIT> << CurrentFnName << <STR_LIT> ; break ; case Function :: WeakAnyLinkage : case Function :: WeakODRLinkage : case Function :: LinkOnceAnyLinkage : case Function :: LinkOnceODRLinkage : O << TAI -> getWeakRefDirective ( ) << CurrentFnName << <STR_LIT> ; break ; } printVisibility ( CurrentFnName , F -> getVisibility ( ) ) ; O << <STR_LIT> << CurrentFnName << <STR_LIT> ; O << CurrentFnName << <STR_LIT> ; for ( MachineFunction :: const_iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) { if ( I != MF . begin ( ) ) { printBasicBlockLabel ( I , true , true ) ; O << '\n' ; } for ( MachineBasicBlock :: const_iterator II = I -> begin ( ) , E = I -> end ( ) ; II != E ; ++ II ) { ++ EmittedInsts ; printInstruction ( II ) ; }


<s> assert ( TargetRegisterInfo :: isPhysicalRegister ( MO . getReg ( ) ) && <STR_LIT> ) ; O << getRegisterName ( MO . getReg ( ) ) ; } else if ( MO . isImm ( ) ) { O << MO . getImm ( ) ; assert ( MO . getImm ( ) < ( <NUM_LIT> << <NUM_LIT> ) ) ;


<s> explicit <ISA_LIT>AsmPrinter ( raw_ostream & o , TargetMachine & tm , const TargetAsmInfo * T , CodeGenOpt :: Level OL , bool V ) : AsmPrinter ( o , tm , T , OL , V ) {


<s> return new <ISA_LIT>AsmPrinter ( o , tm , tm . getTargetAsmInfo ( ) , OptLevel , verbose ) ;


<s> bool <ISA_LIT>AsmPrinter :: doFinalization ( Module & M ) {

for ( Module :: const_global_iterator I = M . global_begin ( ) , E = M . global_end ( ) ;


<s> for ( Module :: const_global_iterator I = M . global_begin ( ) , E = M . global_end ( ) ;

I != E ; ++ I ) printModuleLevelGV ( I ) ;


<s> unsigned Size = TD -> getTypeAllocSize ( C -> getType ( ) ) ; unsigned Align = TD -> getPreferredAlignmentLog ( GVar ) ; SwitchToSection ( TAI -> SectionForGlobal ( GVar ) ) ; printVisibility ( name , GVar -> getVisibility ( ) ) ; switch ( GVar -> getLinkage ( ) ) { case GlobalValue :: LinkOnceAnyLinkage : case GlobalValue :: LinkOnceODRLinkage : case GlobalValue :: WeakAnyLinkage : case GlobalValue :: WeakODRLinkage : case GlobalValue :: CommonLinkage : O << TAI -> getWeakRefDirective ( ) << name << '\n' ; break ; case GlobalValue :: AppendingLinkage : case GlobalValue :: ExternalLinkage : O << TAI -> getGlobalDirective ( ) << name << <STR_LIT> ; break ; case GlobalValue :: InternalLinkage : case GlobalValue :: PrivateLinkage : break ;


<s> void <ISA_LIT>AsmPrinter :: printOp ( const MachineOperand & MO , bool IsCallOp ) { const TargetRegisterInfo & RI = * TM . getRegisterInfo ( ) ; switch ( MO . getType ( ) ) { case MachineOperand :: MO_Register : O << RI . get ( MO . getReg ( ) ) . AsmName ; return ; case MachineOperand :: MO_Immediate : cerr << <STR_LIT> ; abort ( ) ; return ; case MachineOperand :: MO_MachineBasicBlock : printBasicBlockLabel ( MO . getMBB ( ) ) ; return ; case MachineOperand :: MO_ConstantPoolIndex : O << TAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << MO . getIndex ( ) ; return ; case MachineOperand :: MO_ExternalSymbol : O << MO . getSymbolName ( ) ; return ; case MachineOperand :: MO_GlobalAddress : { GlobalValue * GV = MO . getGlobal ( ) ; O << Mang -> getValueName ( GV ) ; if ( GV -> isDeclaration ( ) && GV -> hasExternalWeakLinkage ( ) ) ExtWeakSymbols . insert ( GV ) ; return ; } case MachineOperand :: MO_JumpTableIndex : O << TAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << '_' << MO . getIndex ( ) ; return ; default : O << <STR_LIT> << MO . getType ( ) << <STR_LIT> ; return ;


<s> O << TAI -> getWeakRefDirective ( ) << CurrentFnName << <STR_LIT> ; break ; } printVisibility ( CurrentFnName , F -> getVisibility ( ) ) ; O << <STR_LIT> << CurrentFnName << <STR_LIT> ; O << CurrentFnName << <STR_LIT> ; for ( MachineFunction :: const_iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) { if ( I != MF . begin ( ) ) { printBasicBlockLabel ( I , true , true ) ; O << '\n' ; } for ( MachineBasicBlock :: const_iterator II = I -> begin ( ) , E = I -> end ( ) ; II != E ; ++ II ) { ++ EmittedInsts ; if ( ! printInstruction ( II ) ) { assert ( <NUM_LIT> && <STR_LIT> ) ; abort ( ) ;


<s> O << TAI -> getWeakRefDirective ( ) << CurrentFnName << <STR_LIT> ; break ; } printVisibility ( CurrentFnName , F -> getVisibility ( ) ) ; O << <STR_LIT> << CurrentFnName << <STR_LIT> ; O << CurrentFnName << <STR_LIT> ; for ( MachineFunction :: const_iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) { if ( I != MF . begin ( ) ) { printBasicBlockLabel ( I , true , true ) ; O << '\n' ; } for ( MachineBasicBlock :: const_iterator II = I -> begin ( ) , E = I -> end ( ) ; II != E ; ++ II ) { ++ EmittedInsts ; if ( ! printInstruction ( II ) ) { assert ( <NUM_LIT> && <STR_LIT> ) ;


<s> explicit <ISA_LIT>AsmPrinter ( formatted_raw_ostream & o , TargetMachine & tm , MCContext & Ctx , MCStreamer & Streamer , const MCAsmInfo * T ) : AsmPrinter ( o , tm , Ctx , Streamer , T ) {


<s> O << <STR_LIT> << * CurrentFnSym << <STR_LIT> ;


<s> void <ISA_LIT>AsmPrinter :: EmitFunctionBodyStart ( ) { O << <STR_LIT> << * CurrentFnSym << <STR_LIT> ;


<s> void <ISA_LIT>AsmPrinter :: EmitFunctionBodyStart ( ) {

O << <STR_LIT> << * CurrentFnSym << <STR_LIT> ;


<s> printInstruction ( MI ) ; OutStreamer . AddBlankLine ( ) ;


<s> void <ISA_LIT>AsmPrinter :: EmitStartOfAsmFile ( Module & M ) { if ( TM . getSubtarget < <ISA_LIT>Subtarget > ( ) . hasCT ( ) ) O << <STR_LIT> ;


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

if ( MO . getType ( ) == MachineOperand :: MO_Register ) {


<s> const MachineOperand & MO = MI -> getOperand ( opNum ) ; if ( MO . getType ( ) == MachineOperand :: MO_Register ) { assert ( TargetRegisterInfo :: isPhysicalRegister ( MO . getReg ( ) ) && <STR_LIT> ) ; O << getRegisterName ( MO . getReg ( ) ) ;


<s> <ISA_LIT>AsmPrinter ( raw_ostream & o , TargetMachine & tm , const TargetAsmInfo * T , bool F ) : AsmPrinter ( o , tm , T , F ) {


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


<s> const TargetData * TD = TM . getTargetData ( ) ; if ( ! GVar -> hasInitializer ( ) ) return ; if ( EmitSpecialLLVMGlobal ( GVar ) ) return ; std :: string name = Mang -> getValueName ( GVar ) ; Constant * C = GVar -> getInitializer ( ) ; unsigned Size = TD -> getTypePaddedSize ( C -> getType ( ) ) ; unsigned Align = TD -> getPreferredAlignmentLog ( GVar ) ; SwitchToSection ( TAI -> SectionForGlobal ( GVar ) ) ;

printVisibility ( name , GVar -> getVisibility ( ) ) ;


<s> const TargetData * TD = TM . getTargetData ( ) ; if ( ! GVar -> hasInitializer ( ) ) return ; if ( EmitSpecialLLVMGlobal ( GVar ) ) return ; std :: string name = Mang -> getValueName ( GVar ) ; Constant * C = GVar -> getInitializer ( ) ; unsigned Size = TD -> getTypePaddedSize ( C -> getType ( ) ) ; unsigned Align = TD -> getPreferredAlignmentLog ( GVar ) ; SwitchToSection ( TAI -> SectionForGlobal ( GVar ) ) ; printVisibility ( name , GVar -> getVisibility ( ) ) ; switch ( GVar -> getLinkage ( ) ) { case GlobalValue :: LinkOnceAnyLinkage : case GlobalValue :: LinkOnceODRLinkage : case GlobalValue :: WeakAnyLinkage :


<s> explicit <ISA_LIT>AsmPrinter ( formatted_raw_ostream & o , TargetMachine & tm , MCStreamer & Streamer ) : AsmPrinter ( o , tm , Streamer ) {


<s> case MachineOperand :: MO_ConstantPoolIndex : O << MAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << MO . getIndex ( ) ; return ; case MachineOperand :: MO_ExternalSymbol : O << MO . getSymbolName ( ) ; return ; case MachineOperand :: MO_GlobalAddress : O << * Mang -> getSymbol ( MO . getGlobal ( ) ) ; return ; case MachineOperand :: MO_JumpTableIndex : O << MAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << '_' << MO . getIndex ( ) ;


<s> O << getRegisterName ( MO . getReg ( ) ) ; return ; case MachineOperand :: MO_Immediate : assert ( <NUM_LIT> && <STR_LIT> ) ; return ; case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_ConstantPoolIndex : O << MAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << MO . getIndex ( ) ; return ; case MachineOperand :: MO_ExternalSymbol : O << MO . getSymbolName ( ) ; return ;

case MachineOperand :: MO_GlobalAddress :


<s> explicit <ISA_LIT>AsmPrinter ( TargetMachine & tm , MCStreamer & Streamer ) : AsmPrinter ( tm , Streamer ) {


<s> void <ISA_LIT>AsmPrinter :: EmitFunctionBodyEnd ( ) {

OutStreamer . EmitRawText ( <STR_LIT> + Twine ( CurrentFnSym -> getName ( ) ) ) ;


<s> OutStreamer . EmitRawText ( <STR_LIT> + Twine ( CurrentFnSym -> getName ( ) ) ) ;


<s> void <ISA_LIT>AsmPrinter :: EmitFunctionBodyStart ( ) { OutStreamer . EmitRawText ( <STR_LIT> + Twine ( CurrentFnSym -> getName ( ) ) ) ;


<s> raw_svector_ostream OS ( Str ) ; printInstruction ( MI , OS ) ;

OutStreamer . EmitRawText ( OS . str ( ) ) ;


<s> printInstruction ( MI , OS ) ; OutStreamer . EmitRawText ( OS . str ( ) ) ;


<s> void <ISA_LIT>AsmPrinter :: EmitStartOfAsmFile ( Module & M ) {

OutStreamer . EmitRawText ( StringRef ( <STR_LIT> ) ) ;


<s> OutStreamer . EmitRawText ( StringRef ( <STR_LIT> ) ) ; OutStreamer . EmitRawText ( StringRef ( <STR_LIT> ) ) ;


<s> virtual const char * getPassName ( ) const { return <STR_LIT> ;


<s> virtual const char * getPassName ( ) const {


<s> RegisterAsmPrinter < <ISA_LIT>AsmPrinter > X ( The<ISA_LIT>Target ) ;


<s> void LLVMInitialize<ISA_LIT>AsmPrinter ( ) { RegisterAsmPrinter < <ISA_LIT>AsmPrinter > X ( The<ISA_LIT>Target ) ;


<s> if ( ExtraCode && ExtraCode [ <NUM_LIT> ] ) return true ; O << <STR_LIT> ; printOperand ( MI , OpNo , O ) ;


<s> O << getRegisterName ( MO . getReg ( ) ) ; return ; case MachineOperand :: MO_Immediate : llvm_unreachable ( <STR_LIT> ) ; return ; case MachineOperand :: MO_MachineBasicBlock : O << * MO . getMBB ( ) -> getSymbol ( ) ; return ; case MachineOperand :: MO_ConstantPoolIndex : O << MAI -> getPrivateGlobalPrefix ( ) << <STR_LIT> << getFunctionNumber ( ) << <STR_LIT> << MO . getIndex ( ) ; return ; case MachineOperand :: MO_ExternalSymbol : O << MO . getSymbolName ( ) ; return ; case MachineOperand :: MO_GlobalAddress : O << * Mang -> getSymbol ( MO . getGlobal ( ) ) ;


<s> assert ( TargetRegisterInfo :: isPhysicalRegister ( MO . getReg ( ) ) && <STR_LIT> ) ; O << getRegisterName ( MO . getReg ( ) ) ; } else if ( MO . isImm ( ) ) { O << MO . getImm ( ) ; assert ( MO . getImm ( ) < ( <NUM_LIT> << <NUM_LIT> ) ) ; } else { printOp ( MO , O ) ;


<s> <ISA_LIT>BSel ( ) : MachineFunctionPass ( & ID ) {


<s> <ISA_LIT>BSel ( ) : MachineFunctionPass ( ID ) {


<s> for ( MachineBasicBlock :: iterator MBBI = MBB -> begin ( ) , EE = MBB -> end ( ) ; MBBI != EE ; ++ MBBI ) { if ( MBBI -> getOpcode ( ) == <STR_LIT> || MBBI -> getOpcode ( ) == <STR_LIT> ) { const TargetInstrInfo * TII = Fn . getTarget ( ) . getInstrInfo ( ) ; MBBI -> setDesc ( TII -> get ( MBBI -> getOperand ( <NUM_LIT> ) . getImm ( ) ) ) ; }


<s> for ( MachineFunction :: iterator MFI = Fn . begin ( ) , E = Fn . end ( ) ; MFI != E ; ++ MFI ) { MachineBasicBlock * MBB = MFI ; for ( MachineBasicBlock :: iterator MBBI = MBB -> begin ( ) , EE = MBB -> end ( ) ;


<s> <ISA_LIT>CodeEmitter ( JITCodeEmitter & mce ) : MachineFunctionPass ( ID ) , MCE ( mce ) {


<s> <ISA_LIT>CodeEmitter ( MachineCodeEmitter & mce ) : MCE ( mce ) {


<s> FunctionPass * llvm :: create<ISA_LIT>CodeEmitterPass ( <ISA_LIT>TargetMachine & TM , MachineCodeEmitter & MCE ) { return new Emitter < MachineCodeEmitter > ( TM , MCE ) ;


<s> return new Emitter < JITCodeEmitter > ( TM , JCE ) ;


<s> for ( MachineBasicBlock :: iterator I = MBB . begin ( ) , E = MBB . end ( ) ; I != E ; ++ I ) { const MachineInstr & MI = * I ; switch ( MI . getOpcode ( ) ) { default : MCE . emitWordLE ( getBinaryCodeForInstr ( * I ) ) ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case TargetInstrInfo :: IMPLICIT_DEF : break ; } }


<s> Emitter ( TargetMachine & tm , CodeEmitter & mce , const <ISA_LIT>InstrInfo & ii ) : MachineFunctionPass ( & ID ) , <ISA_LIT>CodeEmitter ( mce ) , II ( & ii ) , TM ( tm ) , MCE ( mce ) {


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


<s> case <STR_LIT> : Reloc = <STR_LIT> ; useGOT = true ; break ; case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; Offset = MI . getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; default : assert ( <NUM_LIT> && <STR_LIT> ) ; abort ( ) ; } if ( MO . isGlobal ( ) ) MCE . addRelocation ( MachineRelocation :: getGV ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getGlobal ( ) , Offset , isa < Function > ( MO . getGlobal ( ) ) , useGOT ) ) ; else if ( MO . isSymbol ( ) ) MCE . addRelocation ( MachineRelocation :: getExtSym ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getSymbolName ( ) , Offset , true ) ) ;

else MCE . addRelocation ( MachineRelocation :: getConstPool ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getIndex ( ) , Offset ) ) ;


<s> do { MCE . startFunction ( MF ) ; for ( MachineFunction :: iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) emitBasicBlock ( * I ) ; } while ( MCE . finishFunction ( MF ) ) ;


<s> FunctionPass * llvm :: create<ISA_LIT>ObjectCodeEmitterPass ( <ISA_LIT>TargetMachine & TM , ObjectCodeEmitter & OCE ) {

return new Emitter < ObjectCodeEmitter > ( TM , OCE ) ;


<s> void Emitter < CodeEmitter > :: emitBasicBlock ( MachineBasicBlock & MBB ) { MCE . StartMachineBasicBlock ( & MBB ) ; for ( MachineBasicBlock :: iterator I = MBB . begin ( ) , E = MBB . end ( ) ; I != E ; ++ I ) { const MachineInstr & MI = * I ; MCE . processDebugLoc ( MI . getDebugLoc ( ) ) ; switch ( MI . getOpcode ( ) ) { default : MCE . emitWordLE ( getBinaryCodeForInstr ( * I ) ) ; break ;


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; useGOT = true ; break ; case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; Offset = MI . getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; default : llvm_unreachable ( <STR_LIT> ) ; } if ( MO . isGlobal ( ) ) MCE . addRelocation ( MachineRelocation :: getGV ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getGlobal ( ) , Offset , isa < Function > ( MO . getGlobal ( ) ) , useGOT ) ) ; else if ( MO . isSymbol ( ) ) MCE . addRelocation ( MachineRelocation :: getExtSym ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getSymbolName ( ) , Offset , true ) ) ; else MCE . addRelocation ( MachineRelocation :: getConstPool ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getIndex ( ) , Offset ) ) ; } else if ( MO . isMBB ( ) ) { MCE . addRelocation ( MachineRelocation :: getBB ( MCE . getCurrentPCOffset ( ) , <STR_LIT> , MO . getMBB ( ) ) ) ; } else {


<s> if ( MO . isGlobal ( ) ) MCE . addRelocation ( MachineRelocation :: getGV ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getGlobal ( ) , Offset , isa < Function > ( MO . getGlobal ( ) ) , useGOT ) ) ; else if ( MO . isSymbol ( ) ) MCE . addRelocation ( MachineRelocation :: getExtSym ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getSymbolName ( ) , Offset , true ) ) ; else MCE . addRelocation ( MachineRelocation :: getConstPool ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getIndex ( ) , Offset ) ) ; } else if ( MO . isMBB ( ) ) { MCE . addRelocation ( MachineRelocation :: getBB ( MCE . getCurrentPCOffset ( ) , <STR_LIT> , MO . getMBB ( ) ) ) ; } else { cerr << <STR_LIT> << MO << <STR_LIT> ; llvm_unreachable ( <NUM_LIT> ) ; }


<s> } else if ( MO . isImm ( ) ) { rv = MO . getImm ( ) ; } else if ( MO . isGlobal ( ) || MO . isSymbol ( ) || MO . isCPI ( ) ) { DEBUG ( errs ( ) << MO << <STR_LIT> << MI << <STR_LIT> ) ; unsigned Reloc = <NUM_LIT> ; int Offset = <NUM_LIT> ; bool useGOT = false ; switch ( MI . getOpcode ( ) ) { case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; useGOT = true ; break ; case <STR_LIT> : case <STR_LIT> :


<s> <ISA_LIT>CodeEmitter ( TargetMachine & tm , MachineCodeEmitter & mce , const <ISA_LIT>InstrInfo & ii ) : MachineFunctionPass ( & ID ) , II ( & ii ) , TM ( tm ) , MCE ( mce ) {


<s> return new <ISA_LIT>CodeEmitter ( TM , MCE ) ;


<s> void <ISA_LIT>CodeEmitter :: emitBasicBlock ( MachineBasicBlock & MBB ) { MCE . StartMachineBasicBlock ( & MBB ) ; for ( MachineBasicBlock :: iterator I = MBB . begin ( ) , E = MBB . end ( ) ; I != E ; ++ I ) { const MachineInstr & MI = * I ; switch ( MI . getOpcode ( ) ) { default : MCE . emitWordLE ( getBinaryCodeForInstr ( * I ) ) ; break ; case <STR_LIT> : case <STR_LIT> :


<s> void <ISA_LIT>CodeEmitter :: emitBasicBlock ( MachineBasicBlock & MBB ) { MCE . StartMachineBasicBlock ( & MBB ) ; for ( MachineBasicBlock :: iterator I = MBB . begin ( ) , E = MBB . end ( ) ;


<s> unsigned rv = <NUM_LIT> ; if ( MO . isReg ( ) ) { rv = get<ISA_LIT>RegNumber ( MO . getReg ( ) ) ; } else if ( MO . isImm ( ) ) { rv = MO . getImm ( ) ; } else if ( MO . isGlobal ( ) || MO . isSymbol ( ) || MO . isCPI ( ) ) { DOUT ( llvm :: dbgs ( ) << MO << <STR_LIT> << MI << <STR_LIT> ; unsigned Reloc = <NUM_LIT> ; int Offset = <NUM_LIT> ; bool useGOT = false ; switch ( MI . getOpcode ( ) ) { case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; break ;


<s> <ISA_LIT>CodeEmitter ( JITCodeEmitter & mce ) : MachineFunctionPass ( & ID ) , MCE ( mce ) {


<s> void <ISA_LIT>CodeEmitter :: emitBasicBlock ( MachineBasicBlock & MBB ) { MCE . StartMachineBasicBlock ( & MBB ) ; for ( MachineBasicBlock :: iterator I = MBB . begin ( ) , E = MBB . end ( ) ; I != E ; ++ I ) { const MachineInstr & MI = * I ; MCE . processDebugLoc ( MI . getDebugLoc ( ) , true ) ; switch ( MI . getOpcode ( ) ) { default : MCE . emitWordLE ( getBinaryCodeForInstr ( * I ) ) ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case TargetOpcode :: IMPLICIT_DEF : case TargetOpcode :: KILL : break ; }

MCE . processDebugLoc ( MI . getDebugLoc ( ) , false ) ;


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


<s> } else if ( MO . isImm ( ) ) { rv = MO . getImm ( ) ; } else if ( MO . isGlobal ( ) || MO . isSymbol ( ) || MO . isCPI ( ) ) { DEBUG ( errs ( ) << MO << <STR_LIT> << MI << <STR_LIT> ) ; unsigned Reloc = <NUM_LIT> ; int Offset = <NUM_LIT> ; bool useGOT = false ; switch ( MI . getOpcode ( ) ) { case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; break ; case <STR_LIT> : Reloc = <STR_LIT> ; useGOT = true ; break ; case <STR_LIT> : case <STR_LIT> : Reloc = <STR_LIT> ; Offset = MI . getOperand ( <NUM_LIT> ) . getImm ( ) ; break ; default : llvm_unreachable ( <STR_LIT> ) ; } if ( MO . isGlobal ( ) ) MCE . addRelocation ( MachineRelocation :: getGV ( MCE . getCurrentPCOffset ( ) , Reloc , const_cast < GlobalValue * > ( MO . getGlobal ( ) ) , Offset , isa < Function > ( MO . getGlobal ( ) ) , useGOT ) ) ; else if ( MO . isSymbol ( ) ) MCE . addRelocation ( MachineRelocation :: getExtSym ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getSymbolName ( ) , Offset , true ) ) ; else MCE . addRelocation ( MachineRelocation :: getConstPool ( MCE . getCurrentPCOffset ( ) , Reloc , MO . getIndex ( ) , Offset ) ) ; } else if ( MO . isMBB ( ) ) { MCE . addRelocation ( MachineRelocation :: getBB ( MCE . getCurrentPCOffset ( ) , <STR_LIT> , MO . getMBB ( ) ) ) ; } else { errs ( ) << <STR_LIT> << MO << <STR_LIT> ;


<s> virtual const char * getPassName ( ) const { return <STR_LIT> ;


<s> do { MCE . startFunction ( MF ) ; for ( MachineFunction :: iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) emitBasicBlock ( * I ) ; } while ( MCE . finishFunction ( MF ) ) ; return false ;


<s> MCE . startFunction ( MF ) ; for ( MachineFunction :: iterator I = MF . begin ( ) , E = MF . end ( ) ; I != E ; ++ I ) emitBasicBlock ( * I ) ; } while ( MCE . finishFunction ( MF ) ) ;


<s> explicit <ISA_LIT>FrameInfo ( const <ISA_LIT>Subtarget & sti ) : TargetFrameInfo ( StackGrowsDown , <NUM_LIT> , <NUM_LIT> ) , STI ( sti ) , curgpdist ( <NUM_LIT> ) {


<s> long NumBytes = MFI -> getStackSize ( ) ; if ( FP ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> ) ; } if ( NumBytes != <NUM_LIT> ) { if ( NumBytes <= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( NumBytes ) . addReg ( <STR_LIT> ) ; } else if ( getUpper16 ( NumBytes ) <= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getUpper16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getLower16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; } else {

report_fatal_error ( <STR_LIT> + Twine ( NumBytes ) ) ;


<s> DebugLoc dl = ( MBBI != MBB . end ( ) ? MBBI -> getDebugLoc ( ) : DebugLoc ( ) ) ; bool FP = hasFP ( MF ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addGlobalAddress ( MF . getFunction ( ) ) . addReg ( <STR_LIT> ) . addImm ( ++ curgpdist ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addGlobalAddress ( MF . getFunction ( ) ) . addReg ( <STR_LIT> ) . addImm ( curgpdist ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) ) . addGlobalAddress ( MF . getFunction ( ) ) ; long NumBytes = MFI -> getStackSize ( ) ; if ( FP ) NumBytes += <NUM_LIT> ; if ( NumBytes == <NUM_LIT> ) return ; unsigned Align = getStackAlignment ( ) ; NumBytes = ( NumBytes + Align - <NUM_LIT> ) / Align * Align ; MFI -> setStackSize ( NumBytes ) ; NumBytes = - NumBytes ; if ( NumBytes >= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( NumBytes ) . addReg ( <STR_LIT> ) ; } else if ( getUpper16 ( NumBytes ) >= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getUpper16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getLower16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ;


<s> MachineBasicBlock :: iterator MBBI = MBB . begin ( ) ; MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; const TargetInstrInfo & TII = * MF . getTarget ( ) . getInstrInfo ( ) ; DebugLoc dl = ( MBBI != MBB . end ( ) ? MBBI -> getDebugLoc ( ) : DebugLoc ( ) ) ; bool FP = hasFP ( MF ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addGlobalAddress ( MF . getFunction ( ) ) . addReg ( <STR_LIT> ) . addImm ( ++ curgpdist ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addGlobalAddress ( MF . getFunction ( ) ) . addReg ( <STR_LIT> ) . addImm ( curgpdist ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) ) . addGlobalAddress ( MF . getFunction ( ) ) ; long NumBytes = MFI -> getStackSize ( ) ; if ( FP ) NumBytes += <NUM_LIT> ; if ( NumBytes == <NUM_LIT> ) return ; unsigned Align = getStackAlignment ( ) ; NumBytes = ( NumBytes + Align - <NUM_LIT> ) / Align * Align ; MFI -> setStackSize ( NumBytes ) ; NumBytes = - NumBytes ; if ( NumBytes >= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( NumBytes ) . addReg ( <STR_LIT> ) ; } else if ( getUpper16 ( NumBytes ) >= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getUpper16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getLower16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; } else { report_fatal_error ( <STR_LIT> + Twine ( NumBytes ) ) ; } if ( FP ) {

BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) ) . addReg ( <STR_LIT> ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> ) ;


<s> bool <ISA_LIT>FrameInfo :: hasFP ( const MachineFunction & MF ) const { const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; return MFI -> hasVarSizedObjects ( ) ;


<s> explicit <ISA_LIT>FrameLowering ( const <ISA_LIT>Subtarget & sti ) : TargetFrameLowering ( StackGrowsDown , <NUM_LIT> , <NUM_LIT> ) , STI ( sti ) , curgpdist ( <NUM_LIT> ) {


<s> const TargetInstrInfo & TII = * MF . getTarget ( ) . getInstrInfo ( ) ; assert ( ( MBBI -> getOpcode ( ) == <STR_LIT> || MBBI -> getOpcode ( ) == <STR_LIT> ) && <STR_LIT> ) ; DebugLoc dl = MBBI -> getDebugLoc ( ) ; bool FP = hasFP ( MF ) ; long NumBytes = MFI -> getStackSize ( ) ; if ( FP ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> ) ; } if ( NumBytes != <NUM_LIT> ) { if ( NumBytes <= <STR_LIT> ) {

BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( NumBytes ) . addReg ( <STR_LIT> ) ;


<s> const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; MachineBasicBlock :: iterator MBBI = MBB . getLastNonDebugInstr ( ) ; const TargetInstrInfo & TII = * MF . getTarget ( ) . getInstrInfo ( ) ; assert ( ( MBBI -> getOpcode ( ) == <STR_LIT> || MBBI -> getOpcode ( ) == <STR_LIT> ) && <STR_LIT> ) ; DebugLoc dl = MBBI -> getDebugLoc ( ) ; bool FP = hasFP ( MF ) ; long NumBytes = MFI -> getStackSize ( ) ; if ( FP ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> ) ; } if ( NumBytes != <NUM_LIT> ) {


<s> BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addGlobalAddress ( MF . getFunction ( ) ) . addReg ( <STR_LIT> ) . addImm ( curgpdist ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) ) . addGlobalAddress ( MF . getFunction ( ) ) ; long NumBytes = MFI -> getStackSize ( ) ; if ( FP ) NumBytes += <NUM_LIT> ; if ( NumBytes == <NUM_LIT> ) return ; unsigned Align = getStackAlignment ( ) ; NumBytes = ( NumBytes + Align - <NUM_LIT> ) / Align * Align ; MFI -> setStackSize ( NumBytes ) ; NumBytes = - NumBytes ; if ( NumBytes >= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( NumBytes ) . addReg ( <STR_LIT> ) ; } else if ( getUpper16 ( NumBytes ) >= <STR_LIT> ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getUpper16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addImm ( getLower16 ( NumBytes ) ) . addReg ( <STR_LIT> ) ; } else { report_fatal_error ( <STR_LIT> + Twine ( NumBytes ) ) ; } if ( FP ) { BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) ) . addReg ( <STR_LIT> ) . addImm ( <NUM_LIT> ) . addReg ( <STR_LIT> ) ;

BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ;


<s> <ISA_LIT>InstrInfo :: <ISA_LIT>InstrInfo ( ) : TargetInstrInfoImpl ( <ISA_LIT>Insts , array_lengthof ( <ISA_LIT>Insts ) ) , RI ( * this ) {


<s> if ( DestRC == <STR_LIT> ) { BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg ) . addReg ( SrcReg ) ; } else if ( DestRC == <STR_LIT> ) { BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg ) . addReg ( SrcReg ) ;


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : if ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) == MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ) { if ( Ops [ <NUM_LIT> ] == <NUM_LIT> ) { unsigned InReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; bool isKill = MI -> getOperand ( <NUM_LIT> ) . isKill ( ) ; bool isUndef = MI -> getOperand ( <NUM_LIT> ) . isUndef ( ) ; Opc = ( Opc == <STR_LIT> ) ? <STR_LIT> : ( ( Opc == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; NewMI = BuildMI ( MF , MI -> getDebugLoc ( ) , get ( Opc ) ) . addReg ( InReg , getKillRegState ( isKill ) | getUndefRegState ( isUndef ) ) . addFrameIndex ( FrameIndex ) . addReg ( <STR_LIT> ) ; } else { unsigned OutReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; bool isDead = MI -> getOperand ( <NUM_LIT> ) . isDead ( ) ; bool isUndef = MI -> getOperand ( <NUM_LIT> ) . isUndef ( ) ; Opc = ( Opc == <STR_LIT> ) ? <STR_LIT> : ( ( Opc == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; NewMI = BuildMI ( MF , MI -> getDebugLoc ( ) , get ( Opc ) ) . addReg ( OutReg , RegState :: Define | getDeadRegState ( isDead ) | getUndefRegState ( isUndef ) ) . addFrameIndex ( FrameIndex ) . addReg ( <STR_LIT> ) ;


<s> const TargetInstrInfo * TII = MF -> getTarget ( ) . getInstrInfo ( ) ; GlobalBaseReg = RegInfo . createVirtualRegister ( & <STR_LIT> ) ; bool Ok = TII -> copyRegToReg ( FirstMBB , MBBI , GlobalBaseReg , <STR_LIT> , & <STR_LIT> , & <STR_LIT> ) ;


<s> if ( GlobalRetAddr != <NUM_LIT> ) return GlobalRetAddr ; MachineBasicBlock & FirstMBB = MF -> front ( ) ; MachineBasicBlock :: iterator MBBI = FirstMBB . begin ( ) ; MachineRegisterInfo & RegInfo = MF -> getRegInfo ( ) ; const TargetInstrInfo * TII = MF -> getTarget ( ) . getInstrInfo ( ) ; GlobalRetAddr = RegInfo . createVirtualRegister ( & <STR_LIT> ) ; bool Ok = TII -> copyRegToReg ( FirstMBB , MBBI , GlobalRetAddr , <STR_LIT> , & <STR_LIT> , & <STR_LIT> ) ; assert ( Ok && <STR_LIT> ) ; Ok = Ok ;


<s> if ( FBB == <NUM_LIT> ) { if ( Cond . empty ( ) ) BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addMBB ( TBB ) ; else if ( is<ISA_LIT>IntCondCode ( Cond [ <NUM_LIT> ] . getImm ( ) ) ) BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addImm ( Cond [ <NUM_LIT> ] . getImm ( ) ) . addReg ( Cond [ <NUM_LIT> ] . getReg ( ) ) . addMBB ( TBB ) ; else BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addImm ( Cond [ <NUM_LIT> ] . getImm ( ) ) . addReg ( Cond [ <NUM_LIT> ] . getReg ( ) ) . addMBB ( TBB ) ; return <NUM_LIT> ; } if ( is<ISA_LIT>IntCondCode ( Cond [ <NUM_LIT> ] . getImm ( ) ) ) BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addImm ( Cond [ <NUM_LIT> ] . getImm ( ) ) . addReg ( Cond [ <NUM_LIT> ] . getReg ( ) ) . addMBB ( TBB ) ; else BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addImm ( Cond [ <NUM_LIT> ] . getImm ( ) ) . addReg ( Cond [ <NUM_LIT> ] . getReg ( ) ) . addMBB ( TBB ) ; BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addMBB ( FBB ) ;


<s> DebugLoc DL ; if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ; BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ;


<s> BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ;


<s> assert ( MI . getNumOperands ( ) >= <NUM_LIT> && MI . getOperand ( <NUM_LIT> ) . isReg ( ) && MI . getOperand ( <NUM_LIT> ) . isReg ( ) && MI . getOperand ( <NUM_LIT> ) . isReg ( ) && <STR_LIT> ) ; if ( MI . getOperand ( <NUM_LIT> ) . getReg ( ) == MI . getOperand ( <NUM_LIT> ) . getReg ( ) ) { sourceReg = MI . getOperand ( <NUM_LIT> ) . getReg ( ) ; destReg = MI . getOperand ( <NUM_LIT> ) . getReg ( ) ; SrcSR = DstSR = <NUM_LIT> ;


<s> if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> void <ISA_LIT>InstrInfo :: storeRegToStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , unsigned SrcReg , bool isKill , int FrameIdx , const TargetRegisterClass * RC ) const { DebugLoc DL ; if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ; if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> } return true ; } MachineInstr * SecondLastInst = I ; if ( SecondLastInst && I != MBB . begin ( ) && isUnpredicatedTerminator ( -- I ) ) return true ; if ( ( SecondLastInst -> getOpcode ( ) == <STR_LIT> || SecondLastInst -> getOpcode ( ) == <STR_LIT> ) && LastInst -> getOpcode ( ) == <STR_LIT> ) { TBB = SecondLastInst -> getOperand ( <NUM_LIT> ) . getMBB ( ) ; Cond . push_back ( SecondLastInst -> getOperand ( <NUM_LIT> ) ) ; Cond . push_back ( SecondLastInst -> getOperand ( <NUM_LIT> ) ) ; FBB = LastInst -> getOperand ( <NUM_LIT> ) . getMBB ( ) ;


<s> if ( MBB . empty ( ) ) return false ; switch ( MBB . back ( ) . getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return true ; default : return false ;


<s> if ( DestRC != SrcRC ) { return false ; } DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ; if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ; if ( DestRC == <STR_LIT> ) { BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg ) . addReg ( SrcReg ) ; } else if ( DestRC == <STR_LIT> ) { BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg ) . addReg ( SrcReg ) ;


<s> else BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addImm ( Cond [ <NUM_LIT> ] . getImm ( ) ) . addReg ( Cond [ <NUM_LIT> ] . getReg ( ) ) . addMBB ( TBB ) ; return <NUM_LIT> ; } if ( is<ISA_LIT>IntCondCode ( Cond [ <NUM_LIT> ] . getImm ( ) ) ) BuildMI ( & MBB , dl , get ( <STR_LIT> ) ) . addImm ( Cond [ <NUM_LIT> ] . getImm ( ) ) . addReg ( Cond [ <NUM_LIT> ] . getReg ( ) ) . addMBB ( TBB ) ;


<s> if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ;

BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ;


<s> if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ; if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> -- I ; if ( I -> getOpcode ( ) != <STR_LIT> && I -> getOpcode ( ) != <STR_LIT> && I -> getOpcode ( ) != <STR_LIT> ) return <NUM_LIT> ; I -> eraseFromParent ( ) ; I = MBB . end ( ) ;

if ( I == MBB . begin ( ) ) return <NUM_LIT> ;


<s> else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else llvm_unreachable ( <STR_LIT> ) ;


<s> DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ; if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ;

if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> MachineInstr * <ISA_LIT>InstrInfo :: foldMemoryOperandImpl ( MachineFunction & MF , MachineInstr * MI , const SmallVectorImpl < unsigned > & Ops , int FrameIndex ) const { if ( Ops . size ( ) != <NUM_LIT> ) return NULL ; unsigned Opc = MI -> getOpcode ( ) ; MachineInstr * NewMI = NULL ; switch ( Opc ) { default : break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : if ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) == MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ) { if ( Ops [ <NUM_LIT> ] == <NUM_LIT> ) { unsigned InReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; bool isKill = MI -> getOperand ( <NUM_LIT> ) . isKill ( ) ; Opc = ( Opc == <STR_LIT> ) ? <STR_LIT> : ( ( Opc == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; NewMI = BuildMI ( MF , MI -> getDebugLoc ( ) , get ( Opc ) ) . addReg ( InReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIndex ) . addReg ( <STR_LIT> ) ; } else { unsigned OutReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; bool isDead = MI -> getOperand ( <NUM_LIT> ) . isDead ( ) ; Opc = ( Opc == <STR_LIT> ) ? <STR_LIT> : ( ( Opc == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; NewMI = BuildMI ( MF , MI -> getDebugLoc ( ) , get ( Opc ) ) . addReg ( OutReg , RegState :: Define | getDeadRegState ( isDead ) ) . addFrameIndex ( FrameIndex ) . addReg ( <STR_LIT> ) ; } } break ; }


<s> DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ; MachineInstrBuilder MIB = BuildMI ( MF , DL , get ( Opc ) , DestReg ) ; for ( unsigned i = <NUM_LIT> , e = Addr . size ( ) ; i != e ; ++ i ) MIB . addOperand ( Addr [ i ] ) ;


<s> unsigned Opc = <NUM_LIT> ; if ( RC == <STR_LIT> ) Opc = <STR_LIT> ; else if ( RC == <STR_LIT> ) Opc = <STR_LIT> ; else if ( RC == <STR_LIT> ) Opc = <STR_LIT> ; else abort ( ) ; DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ; MachineInstrBuilder MIB = BuildMI ( MF , DL , get ( Opc ) , DestReg ) ;

for ( unsigned i = <NUM_LIT> , e = Addr . size ( ) ; i != e ; ++ i ) MIB . addOperand ( Addr [ i ] ) ;


<s> if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ; if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ; MachineInstrBuilder MIB = BuildMI ( MF , DL , get ( Opc ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) ; for ( unsigned i = <NUM_LIT> , e = Addr . size ( ) ; i != e ; ++ i ) MIB . addOperand ( Addr [ i ] ) ;


<s> if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ; if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ; if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , getKillRegState ( isKill ) ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else abort ( ) ;


<s> MachineInstr * <ISA_LIT>InstrInfo :: foldMemoryOperandImpl ( MachineFunction & MF , MachineInstr * MI , const SmallVectorImpl < unsigned > & Ops , int FrameIndex ) const { if ( Ops . size ( ) != <NUM_LIT> ) return NULL ; unsigned Opc = MI -> getOpcode ( ) ; MachineInstr * NewMI = NULL ; switch ( Opc ) { default : break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : if ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) == MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ) { if ( Ops [ <NUM_LIT> ] == <NUM_LIT> ) { unsigned InReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; bool isKill = MI -> getOperand ( <NUM_LIT> ) . isKill ( ) ; Opc = ( Opc == <STR_LIT> ) ? <STR_LIT> : ( ( Opc == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; NewMI = BuildMI ( MF , MI -> getDebugLoc ( ) , get ( Opc ) ) . addReg ( InReg , false , false , isKill ) . addFrameIndex ( FrameIndex ) . addReg ( <STR_LIT> ) ; } else { unsigned OutReg = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ; bool isDead = MI -> getOperand ( <NUM_LIT> ) . isDead ( ) ; Opc = ( Opc == <STR_LIT> ) ? <STR_LIT> : ( ( Opc == <STR_LIT> ) ? <STR_LIT> : <STR_LIT> ) ; NewMI = BuildMI ( MF , MI -> getDebugLoc ( ) , get ( Opc ) ) . addReg ( OutReg , true , false , false , isDead ) . addFrameIndex ( FrameIndex ) . addReg ( <STR_LIT> ) ; } } break ;


<s> else if ( RC == <STR_LIT> ) Opc = <STR_LIT> ; else if ( RC == <STR_LIT> ) Opc = <STR_LIT> ; else abort ( ) ; DebugLoc DL = DebugLoc :: getUnknownLoc ( ) ;

MachineInstrBuilder MIB = BuildMI ( MF , DL , get ( Opc ) ) . addReg ( SrcReg , false , false , isKill ) ;


<s> MachineInstrBuilder MIB = BuildMI ( MF , DL , get ( Opc ) ) . addReg ( SrcReg , false , false , isKill ) ; for ( unsigned i = <NUM_LIT> , e = Addr . size ( ) ; i != e ; ++ i ) MIB . addOperand ( Addr [ i ] ) ; NewMIs . push_back ( MIB ) ;


<s> if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , false , false , isKill ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , false , false , isKill ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) ) . addReg ( SrcReg , false , false , isKill ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> <ISA_LIT>InstrInfo :: <ISA_LIT>InstrInfo ( ) : <ISA_LIT>GenInstrInfo ( <STR_LIT> , <STR_LIT> ) , RI ( * this ) {


<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> ; default : llvm_unreachable ( <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> ; default : llvm_unreachable ( <STR_LIT> ) ;


<s> if ( ! isUnpredicatedTerminator ( I ) ) return false ; MachineInstr * LastInst = I ; if ( I == MBB . begin ( ) || ! isUnpredicatedTerminator ( -- I ) ) { if ( LastInst -> getOpcode ( ) == <STR_LIT> ) { TBB = LastInst -> getOperand ( <NUM_LIT> ) . getMBB ( ) ; return false ; } else if ( LastInst -> getOpcode ( ) == <STR_LIT> || LastInst -> getOpcode ( ) == <STR_LIT> ) { TBB = LastInst -> getOperand ( <NUM_LIT> ) . getMBB ( ) ; Cond . push_back ( LastInst -> getOperand ( <NUM_LIT> ) ) ; Cond . push_back ( LastInst -> getOperand ( <NUM_LIT> ) ) ; return false ; } return true ; } MachineInstr * SecondLastInst = I ; if ( SecondLastInst && I != MBB . begin ( ) && isUnpredicatedTerminator ( -- I ) ) return true ; if ( ( SecondLastInst -> getOpcode ( ) == <STR_LIT> || SecondLastInst -> getOpcode ( ) == <STR_LIT> ) && LastInst -> getOpcode ( ) == <STR_LIT> ) { TBB = SecondLastInst -> getOperand ( <NUM_LIT> ) . getMBB ( ) ; Cond . push_back ( SecondLastInst -> getOperand ( <NUM_LIT> ) ) ;


<s> if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) { BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; } else if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) { BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addReg ( SrcReg ) . addReg ( SrcReg , getKillRegState ( KillSrc ) ) ; } else if ( <STR_LIT> . contains ( DestReg , SrcReg ) ) {


<s> virtual MachineInstr * foldMemoryOperandImpl ( MachineFunction & MF , MachineInstr * MI , const SmallVectorImpl < unsigned > & Ops , MachineInstr * LoadMI ) const {


<s> <ISA_LIT>MachineFunctionInfo * <ISA_LIT>FI = MF -> getInfo < <ISA_LIT>MachineFunctionInfo > ( ) ; unsigned GlobalBaseReg = <ISA_LIT>FI -> getGlobalBaseReg ( ) ; if ( GlobalBaseReg != <NUM_LIT> ) return GlobalBaseReg ; MachineBasicBlock & FirstMBB = MF -> front ( ) ;

MachineBasicBlock :: iterator MBBI = FirstMBB . begin ( ) ;


<s> MachineBasicBlock :: iterator MBBI = FirstMBB . begin ( ) ; MachineRegisterInfo & RegInfo = MF -> getRegInfo ( ) ; const TargetInstrInfo * TII = MF -> getTarget ( ) . getInstrInfo ( ) ; GlobalRetAddr = RegInfo . createVirtualRegister ( & <STR_LIT> ) ; BuildMI ( FirstMBB , MBBI , DebugLoc ( ) , TII -> get ( TargetOpcode :: COPY ) , GlobalRetAddr ) . addReg ( <STR_LIT> ) ; RegInfo . addLiveIn ( <STR_LIT> ) ;

<ISA_LIT>FI -> setGlobalRetAddr ( GlobalRetAddr ) ;


<s> virtual const <ISA_LIT>RegisterInfo & getRegisterInfo ( ) const {


<s> BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , <STR_LIT> ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) ;


<s> void <ISA_LIT>InstrInfo :: insertNoop ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI ) const {


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : return true ; default : return false ; }


<s> static bool is<ISA_LIT>IntCondCode ( unsigned Opcode ) { switch ( Opcode ) { case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> :


<s> case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : if ( MI -> getOperand ( <NUM_LIT> ) . isFI ( ) ) { FrameIndex = MI -> getOperand ( <NUM_LIT> ) . getIndex ( ) ; return MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ;


<s> else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ;


<s> else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else if ( RC == <STR_LIT> ) BuildMI ( MBB , MI , DL , get ( <STR_LIT> ) , DestReg ) . addFrameIndex ( FrameIdx ) . addReg ( <STR_LIT> ) ; else llvm_unreachable ( <STR_LIT> ) ;


<s> bool <ISA_LIT>InstrInfo :: ReverseBranchCondition ( SmallVectorImpl < MachineOperand > & Cond ) const {

assert ( Cond . size ( ) == <NUM_LIT> && <STR_LIT> ) ;


<s> void <ISA_LIT>InstrInfo :: storeRegToStackSlot ( MachineBasicBlock & MBB , MachineBasicBlock :: iterator MI , unsigned SrcReg , bool isKill , int FrameIdx , const TargetRegisterClass * RC , const TargetRegisterInfo * TRI ) const { DebugLoc DL ; if ( MI != MBB . end ( ) ) DL = MI -> getDebugLoc ( ) ;


<s> explicit <ISA_LIT>DAGToDAGISel ( <ISA_LIT>TargetMachine & TM ) : SelectionDAGISel ( TM ) {


<s> uint64_t y = getNearPower2 ( x ) ; if ( swap ) return ( y - x ) == r ; else return ( x - y ) == r ;


<s> static bool chkRemNearPower2 ( uint64_t x , uint64_t r , bool swap ) { uint64_t y = getNearPower2 ( x ) ; if ( swap ) return ( y - x ) == r ; else return ( x - y ) == r ;


<s> FunctionPass * llvm :: create<ISA_LIT>ISelDag ( <ISA_LIT>TargetMachine & TM ) {

return new <ISA_LIT>DAGToDAGISel ( TM ) ;


<s> return new <ISA_LIT>DAGToDAGISel ( TM ) ;


<s> SDNode * <ISA_LIT>DAGToDAGISel :: getGlobalBaseReg ( ) { unsigned GlobalBaseReg = getInstrInfo ( ) -> getGlobalBaseReg ( MF ) ; return CurDAG -> getRegister ( GlobalBaseReg , TLI . getPointerTy ( ) ) . getNode ( ) ;


<s> return CurDAG -> getRegister ( GlobalRetAddr , TLI . getPointerTy ( ) ) . getNode ( ) ;


<s> unsigned GlobalRetAddr = getInstrInfo ( ) -> getGlobalRetAddr ( MF ) ; return CurDAG -> getRegister ( GlobalRetAddr , TLI . getPointerTy ( ) ) . getNode ( ) ;


<s> inline SDValue getI64Imm ( int64_t Imm ) { return CurDAG -> getTargetConstant ( Imm , <STR_LIT> ) ;


<s> return CurDAG -> getTargetConstant ( Imm , <STR_LIT> ) ;


<s> return getTargetMachine ( ) . getInstrInfo ( ) ;


<s> unsigned at = CountLeadingZeros_64 ( x ) ; uint64_t complow = <NUM_LIT> << ( <NUM_LIT> - at ) ; uint64_t comphigh = <NUM_LIT> << ( <NUM_LIT> - at ) ; if ( abs64 ( complow - x ) <= abs64 ( comphigh - x ) ) return complow ;


<s> const <ISA_LIT>TargetMachine & getTargetMachine ( ) { return static_cast < const <ISA_LIT>TargetMachine & > ( TM ) ;


<s> static int64_t get_lda16 ( int64_t x ) {

return x - get_ldah16 ( x ) * IMM_MULT ;


<s> if ( x % IMM_MULT > IMM_HIGH ) ++ y ; return y ;


<s> static int64_t get_ldah16 ( int64_t x ) { int64_t y = x / IMM_MULT ; if ( x % IMM_MULT > IMM_HIGH ) ++ y ;


<s> static uint64_t get_zapImm ( uint64_t x ) { unsigned build = <NUM_LIT> ; for ( int i = <NUM_LIT> ; i != <NUM_LIT> ; ++ i ) { if ( ( x & <NUM_LIT> ) == <NUM_LIT> ) build |= <NUM_LIT> << i ; else if ( ( x & <NUM_LIT> ) != <NUM_LIT> ) return <NUM_LIT> ; x >>= <NUM_LIT> ; } return build ;


<s> return ( CN && ( CN -> getValueAPF ( ) . isZero ( ) ) ) ;


<s> static bool isFPZ ( SDValue N ) { ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; return ( CN && ( CN -> getValueAPF ( ) . isZero ( ) ) ) ;


ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ;


<s> ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ;

return ( CN && CN -> getValueAPF ( ) . isNegZero ( ) ) ;


<s> static bool isFPZp ( SDValue N ) { ConstantFPSDNode * CN = dyn_cast < ConstantFPSDNode > ( N ) ; return ( CN && CN -> getValueAPF ( ) . isPosZero ( ) ) ;


<s> switch ( CC ) { default : DEBUG ( N -> dump ( CurDAG ) ) ; llvm_unreachable ( <STR_LIT> ) ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Opc = <STR_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Opc = <STR_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Opc = <STR_LIT> ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Opc = <STR_LIT> ; rev = true ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Opc = <STR_LIT> ; rev = true ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : Opc = <STR_LIT> ; inv = true ; break ; case <STR_LIT> : Opc = <STR_LIT> ; inv = true ; break ; case <STR_LIT> : Opc = <STR_LIT> ; break ; } ; SDValue tmp1 = N -> getOperand ( rev ? <NUM_LIT> : <NUM_LIT> ) ; SDValue tmp2 = N -> getOperand ( rev ? <NUM_LIT> : <NUM_LIT> ) ; SDNode * cmp = CurDAG -> getMachineNode ( Opc , dl , <STR_LIT> , tmp1 , tmp2 ) ; if ( inv ) cmp = CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , SDValue ( cmp , <NUM_LIT> ) , CurDAG -> getRegister ( <STR_LIT> , <STR_LIT> ) ) ; switch ( CC ) { case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : { SDNode * cmp2 = CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , tmp1 , tmp2 ) ; cmp = CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , SDValue ( cmp2 , <NUM_LIT> ) , SDValue ( cmp , <NUM_LIT> ) ) ; break ; } default : break ; } SDNode * LD = CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , SDValue ( cmp , <NUM_LIT> ) ) ; return CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , CurDAG -> getRegister ( <STR_LIT> , <STR_LIT> ) , SDValue ( LD , <NUM_LIT> ) ) ; } break ; case <STR_LIT> : { ConstantSDNode * SC = NULL ; ConstantSDNode * MC = NULL ; if ( N -> getOperand ( <NUM_LIT> ) . getOpcode ( ) == <STR_LIT> && ( MC = dyn_cast < ConstantSDNode > ( N -> getOperand ( <NUM_LIT> ) ) ) && ( SC = dyn_cast < ConstantSDNode > ( N -> getOperand ( <NUM_LIT> ) . getOperand ( <NUM_LIT> ) ) ) ) { uint64_t sval = SC -> getZExtValue ( ) ; uint64_t mval = MC -> getZExtValue ( ) ; if ( get_zapImm ( N -> getOperand ( <NUM_LIT> ) , mval ) ) break ;

uint64_t dontcare = ( ~ <NUM_LIT> ) >> ( <NUM_LIT> - sval ) ;


<s> Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , GOT , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; Chain = SDValue ( CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , Addr . getOperand ( <NUM_LIT> ) , Chain , InFlag ) , <NUM_LIT> ) ; } else { Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , Addr , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; Chain = SDValue ( CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , Chain , InFlag ) , <NUM_LIT> ) ; }


<s> unsigned at = CountLeadingZeros_64 ( x ) ; uint64_t complow = <NUM_LIT> << ( <NUM_LIT> - at ) ;

uint64_t comphigh = <NUM_LIT> << ( <NUM_LIT> - at ) ;


<s> SDValue <ISA_LIT>DAGToDAGISel :: getGlobalBaseReg ( ) { unsigned GP = <NUM_LIT> ; for ( MachineRegisterInfo :: livein_iterator ii = RegInfo -> livein_begin ( ) , ee = RegInfo -> livein_end ( ) ; ii != ee ; ++ ii ) if ( ii -> first == <STR_LIT> ) { GP = ii -> second ; break ;


return CurDAG -> getCopyFromReg ( CurDAG -> getEntryNode ( ) , DebugLoc :: getUnknownLoc ( ) , RA , <STR_LIT> ) ;


<s> if ( abs ( complow - x ) <= abs ( comphigh - x ) ) return complow ; else return comphigh ;


<s> if ( abs ( complow - x ) <= abs ( comphigh - x ) ) return complow ;


<s> Result |= <NUM_LIT> << i ; if ( ( ( Constant >> <NUM_LIT> * i ) & <NUM_LIT> ) == <NUM_LIT> ) { } else if ( LHS . getNode ( ) == <NUM_LIT> ) { } else { BitsToCheck |= ~ Constant & ( <NUM_LIT> << <NUM_LIT> * i ) ; } } } if ( BitsToCheck && ! CurDAG -> MaskedValueIsZero ( LHS , APInt ( LHS . getValueSizeInBits ( ) , BitsToCheck ) ) ) return <NUM_LIT> ;


<s> void <ISA_LIT>DAGToDAGISel :: InstructionSelect ( ) {


<s> } else { Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , Addr , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; Chain = SDValue ( CurDAG -> getTargetNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , Chain , InFlag ) , <NUM_LIT> ) ; } InFlag = Chain . getValue ( <NUM_LIT> ) ; ReplaceUses ( Op . getValue ( <NUM_LIT> ) , Chain ) ; ReplaceUses ( Op . getValue ( <NUM_LIT> ) , InFlag ) ;


<s> DebugLoc dl = N -> getDebugLoc ( ) ; if ( Addr . getOpcode ( ) == <STR_LIT> ) { SDValue GOT = SDValue ( getGlobalBaseReg ( ) , <NUM_LIT> ) ; Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , GOT , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; Chain = SDValue ( CurDAG -> getTargetNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , Addr . getOperand ( <NUM_LIT> ) , Chain , InFlag ) , <NUM_LIT> ) ; } else { Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , Addr , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; Chain = SDValue ( CurDAG -> getTargetNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , Chain , InFlag ) , <NUM_LIT> ) ; } InFlag = Chain . getValue ( <NUM_LIT> ) ;

ReplaceUses ( Op . getValue ( <NUM_LIT> ) , Chain ) ;


<s> static uint64_t getNearPower2 ( uint64_t x ) { if ( ! x ) return <NUM_LIT> ;

unsigned at = CountLeadingZeros_64 ( x ) ;


<s> uint64_t complow = <NUM_LIT> << ( <NUM_LIT> - at ) ; uint64_t comphigh = complow << <NUM_LIT> ; if ( x - complow <= comphigh - x ) return complow ; else return comphigh ;


<s> Result |= <NUM_LIT> << i ; if ( ( ( Constant >> <NUM_LIT> * i ) & <NUM_LIT> ) == <NUM_LIT> ) { } else if ( LHS . getNode ( ) == <NUM_LIT> ) { } else { BitsToCheck |= ~ Constant & ( <NUM_LIT> << <NUM_LIT> * i ) ; } } } if ( BitsToCheck && ! CurDAG -> MaskedValueIsZero ( LHS , APInt ( LHS . getValueSizeInBits ( ) , BitsToCheck ) ) ) return <NUM_LIT> ; return Result ;


<s> BitsToCheck |= ~ Constant & ( <NUM_LIT> << <NUM_LIT> * i ) ; } } } if ( BitsToCheck && ! CurDAG -> MaskedValueIsZero ( LHS , APInt ( LHS . getValueSizeInBits ( ) , BitsToCheck ) ) ) return <NUM_LIT> ;


<s> SDValue Chain = N -> getOperand ( <NUM_LIT> ) ; SDValue Addr = N -> getOperand ( <NUM_LIT> ) ; SDValue InFlag = N -> getOperand ( N -> getNumOperands ( ) - <NUM_LIT> ) ; DebugLoc dl = N -> getDebugLoc ( ) ; if ( Addr . getOpcode ( ) == <STR_LIT> ) { SDValue GOT = SDValue ( getGlobalBaseReg ( ) , <NUM_LIT> ) ;

Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , GOT , InFlag ) ;


<s> SDValue InFlag = N -> getOperand ( N -> getNumOperands ( ) - <NUM_LIT> ) ; DebugLoc dl = N -> getDebugLoc ( ) ; if ( Addr . getOpcode ( ) == <STR_LIT> ) { SDValue GOT = SDValue ( getGlobalBaseReg ( ) , <NUM_LIT> ) ; Chain = CurDAG -> getCopyToReg ( Chain , dl , <STR_LIT> , GOT , InFlag ) ;


<s> unsigned VReg = MF . getRegInfo ( ) . createVirtualRegister ( RC ) ; MF . getRegInfo ( ) . addLiveIn ( PReg , VReg ) ;


<s> MachineFunction :: iterator It = BB ; ++ It ; MachineBasicBlock * thisMBB = BB ; MachineFunction * F = BB -> getParent ( ) ; MachineBasicBlock * llscMBB = F -> CreateMachineBasicBlock ( LLVM_BB ) ; MachineBasicBlock * sinkMBB = F -> CreateMachineBasicBlock ( LLVM_BB ) ; for ( MachineBasicBlock :: succ_iterator I = BB -> succ_begin ( ) , E = BB -> succ_end ( ) ; I != E ; ++ I ) EM -> insert ( std :: make_pair ( * I , sinkMBB ) ) ; sinkMBB -> transferSuccessors ( thisMBB ) ; F -> insert ( It , llscMBB ) ; F -> insert ( It , sinkMBB ) ; BuildMI ( thisMBB , dl , TII -> get ( <STR_LIT> ) ) . addMBB ( llscMBB ) ; unsigned reg_res = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) , reg_ptr = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) , reg_v2 = MI -> getOperand ( <NUM_LIT> ) . getReg ( ) , reg_store = F -> getRegInfo ( ) . createVirtualRegister ( & <STR_LIT> ) ; BuildMI ( llscMBB , dl , TII -> get ( is32 ? <STR_LIT> : <STR_LIT> ) , reg_res ) . addImm ( <NUM_LIT> ) . addReg ( reg_ptr ) ; switch ( MI -> getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : { unsigned reg_cmp = F -> getRegInfo ( ) . createVirtualRegister ( & <STR_LIT> ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_cmp ) . addReg ( reg_v2 ) . addReg ( reg_res ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) ) . addImm ( <NUM_LIT> ) . addReg ( reg_cmp ) . addMBB ( sinkMBB ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_store ) . addReg ( <STR_LIT> ) . addReg ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ) ;


<s> <STR_LIT> <ISA_LIT>TargetLowering :: getSetCCResultType ( EVT VT ) const { return <STR_LIT> ;


<s> <STR_LIT> <ISA_LIT>TargetLowering :: getSetCCResultType ( EVT VT ) const {


<s> virtual MVT getShiftAmountTy ( EVT LHSTy ) const { return <STR_LIT> ;


<s> return Imm . isZero ( ) || Imm . isNegZero ( ) ;


<s> bool <ISA_LIT>TargetLowering :: isOffsetFoldingLegal ( const GlobalAddressSDNode * GA ) const {


<s> CCValAssign & VA = ArgLocs [ i ] ; SDValue Arg = Outs [ i ] . Val ; switch ( VA . getLocInfo ( ) ) { default : assert ( <NUM_LIT> && <STR_LIT> ) ; case CCValAssign :: Full : break ; case CCValAssign :: SExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: ZExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: AExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; } if ( VA . isRegLoc ( ) ) { RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; } else { assert ( VA . isMemLoc ( ) ) ; if ( StackPtr . getNode ( ) == <NUM_LIT> ) StackPtr = DAG . getCopyFromReg ( Chain , dl , <STR_LIT> , <STR_LIT> ) ; SDValue PtrOff = DAG . getNode ( <STR_LIT> , dl , getPointerTy ( ) , StackPtr , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) ) ) ; MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , PseudoSourceValue :: getStack ( ) , <NUM_LIT> , false , false , <NUM_LIT> ) ) ; } } if ( ! MemOpChains . empty ( ) ) Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & MemOpChains [ <NUM_LIT> ] , MemOpChains . size ( ) ) ; SDValue InFlag ; for ( unsigned i = <NUM_LIT> , e = RegsToPass . size ( ) ; i != e ; ++ i ) { Chain = DAG . getCopyToReg ( Chain , dl , RegsToPass [ i ] . first , RegsToPass [ i ] . second , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; } SDVTList NodeTys = DAG . getVTList ( <STR_LIT> , <STR_LIT> ) ; SmallVector < SDValue , <NUM_LIT> > Ops ; Ops . push_back ( Chain ) ; Ops . push_back ( Callee ) ;

for ( unsigned i = <NUM_LIT> , e = RegsToPass . size ( ) ; i != e ; ++ i ) Ops . push_back ( DAG . getRegister ( RegsToPass [ i ] . first , RegsToPass [ i ] . second . getValueType ( ) ) ) ;


<s> Chain = DAG . getCopyFromReg ( Chain , dl , VA . getLocReg ( ) , VA . getLocVT ( ) , InFlag ) . getValue ( <NUM_LIT> ) ; SDValue RetValue = Chain . getValue ( <NUM_LIT> ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , RetValue , DAG . getValueType ( VA . getValVT ( ) ) ) ; else if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , RetValue , DAG . getValueType ( VA . getValVT ( ) ) ) ; if ( VA . getLocInfo ( ) != CCValAssign :: Full ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getValVT ( ) , RetValue ) ; InVals . push_back ( RetValue ) ; }


<s> } } else { int FI = MFI -> CreateFixedObject ( <NUM_LIT> , <NUM_LIT> * ( ArgNo - <NUM_LIT> ) , true , false ) ; SDValue FIN = DAG . getFrameIndex ( FI , <STR_LIT> ) ; ArgVal = DAG . getLoad ( ObjectVT , dl , Chain , FIN , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ; } InVals . push_back ( ArgVal ) ; } if ( isVarArg ) { VarArgsOffset = Ins . size ( ) * <NUM_LIT> ; std :: vector < SDValue > LS ; for ( int i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i ) { if ( TargetRegisterInfo :: isPhysicalRegister ( args_int [ i ] ) ) args_int [ i ] = AddLiveIn ( MF , args_int [ i ] , & <STR_LIT> ) ; SDValue argt = DAG . getCopyFromReg ( Chain , dl , args_int [ i ] , <STR_LIT> ) ; int FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true , false ) ; if ( i == <NUM_LIT> ) VarArgsBase = FI ; SDValue SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ) ; if ( TargetRegisterInfo :: isPhysicalRegister ( args_float [ i ] ) ) args_float [ i ] = AddLiveIn ( MF , args_float [ i ] , & <STR_LIT> ) ;

argt = DAG . getCopyFromReg ( Chain , dl , args_float [ i ] , <STR_LIT> ) ;


<s> SDValue JTI = DAG . getTargetJumpTable ( JT -> getIndex ( ) , PtrVT ) ; DebugLoc dl = Op . getDebugLoc ( ) ; SDValue Hi = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , JTI , DAG . getGLOBAL_OFFSET_TABLE ( <STR_LIT> ) ) ; SDValue Lo = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , JTI , Hi ) ;


<s> EVT PtrVT = Op . getValueType ( ) ; JumpTableSDNode * JT = cast < JumpTableSDNode > ( Op ) ; SDValue JTI = DAG . getTargetJumpTable ( JT -> getIndex ( ) , PtrVT ) ; DebugLoc dl = Op . getDebugLoc ( ) ; SDValue Hi = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , JTI , DAG . getGLOBAL_OFFSET_TABLE ( <STR_LIT> ) ) ;

SDValue Lo = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , JTI , Hi ) ;


<s> ArgReg1 = <STR_LIT> ; ArgReg2 = <STR_LIT> ; } Copy = DAG . getCopyToReg ( Copy , dl , ArgReg1 , Outs [ <NUM_LIT> ] . Val , Copy . getValue ( <NUM_LIT> ) ) ; if ( std :: find ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_begin ( ) , DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) , ArgReg1 ) == DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) ) DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( ArgReg1 ) ; Copy = DAG . getCopyToReg ( Copy , dl , ArgReg2 , Outs [ <NUM_LIT> ] . Val , Copy . getValue ( <NUM_LIT> ) ) ; if ( std :: find ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_begin ( ) , DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) , ArgReg2 ) == DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) ) DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( ArgReg2 ) ; break ;


<s> case <NUM_LIT> : break ; case <NUM_LIT> : { EVT ArgVT = Outs [ <NUM_LIT> ] . Val . getValueType ( ) ; unsigned ArgReg ; if ( ArgVT . isInteger ( ) ) ArgReg = <STR_LIT> ; else { assert ( ArgVT . isFloatingPoint ( ) ) ; ArgReg = <STR_LIT> ; } Copy = DAG . getCopyToReg ( Copy , dl , ArgReg , Outs [ <NUM_LIT> ] . Val , Copy . getValue ( <NUM_LIT> ) ) ; if ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_empty ( ) ) DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( ArgReg ) ; break ; } case <NUM_LIT> : { EVT ArgVT = Outs [ <NUM_LIT> ] . Val . getValueType ( ) ; unsigned ArgReg1 , ArgReg2 ; if ( ArgVT . isInteger ( ) ) { ArgReg1 = <STR_LIT> ; ArgReg2 = <STR_LIT> ; } else { assert ( ArgVT . isFloatingPoint ( ) ) ; ArgReg1 = <STR_LIT> ;


<s> DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Base , Offset ) ; if ( N -> getValueType ( <NUM_LIT> ) . isFloatingPoint ( ) ) { SDValue FPDataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , DataPtr , DAG . getConstant ( <NUM_LIT> * <NUM_LIT> , <STR_LIT> ) ) ; SDValue CC = DAG . getSetCC ( dl , <STR_LIT> , Offset , DAG . getConstant ( <NUM_LIT> * <NUM_LIT> , <STR_LIT> ) , <STR_LIT> ) ; DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , CC , FPDataPtr , DataPtr ) ; } SDValue NewOffset = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Offset , DAG . getConstant ( <NUM_LIT> , <STR_LIT> ) ) ; Chain = DAG . getTruncStore ( Offset . getValue ( <NUM_LIT> ) , dl , NewOffset , Tmp , NULL , <NUM_LIT> , <STR_LIT> , false , false , <NUM_LIT> ) ;


<s> LowerVAARG ( N , Chain , DataPtr , DAG ) ; SDValue Res = DAG . getLoad ( N -> getValueType ( <NUM_LIT> ) , dl , Chain , DataPtr , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ;


<s> LowerVAARG ( N , Chain , DataPtr , DAG ) ; SDValue Res = DAG . getLoad ( N -> getValueType ( <NUM_LIT> ) , dl , Chain , DataPtr , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ; Results . push_back ( Res ) ;

Results . push_back ( SDValue ( Res . getNode ( ) , <NUM_LIT> ) ) ;


<s> setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; if ( ! TM . getSubtarget < <ISA_LIT>Subtarget > ( ) . hasCT ( ) ) { setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; } setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Promote ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Promote ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ;


<s> switch ( MI -> getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : { unsigned reg_cmp = F -> getRegInfo ( ) . createVirtualRegister ( & <STR_LIT> ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_cmp ) . addReg ( reg_v2 ) . addReg ( reg_res ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) ) . addImm ( <NUM_LIT> ) . addReg ( reg_cmp ) . addMBB ( sinkMBB ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_store ) . addReg ( <STR_LIT> ) . addReg ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ) ; break ; } case <STR_LIT> : case <STR_LIT> : { BuildMI ( llscMBB , dl , TII -> get ( is32 ? <STR_LIT> : <STR_LIT> ) , reg_store ) . addReg ( reg_res ) . addReg ( reg_v2 ) ; break ; } case <STR_LIT> : case <STR_LIT> : { BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_store ) . addReg ( reg_v2 ) . addReg ( reg_v2 ) ; break ; } } BuildMI ( llscMBB , dl , TII -> get ( is32 ? <STR_LIT> : <STR_LIT> ) , reg_store ) . addReg ( reg_store ) . addImm ( <NUM_LIT> ) . addReg ( reg_ptr ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) ) . addImm ( <NUM_LIT> ) . addReg ( reg_store ) . addMBB ( llscMBB ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) ) . addMBB ( sinkMBB ) ; thisMBB -> addSuccessor ( llscMBB ) ; llscMBB -> addSuccessor ( llscMBB ) ; llscMBB -> addSuccessor ( sinkMBB ) ; MI -> eraseFromParent ( ) ; return sinkMBB ;


<s> case 'f' : return VT == <STR_LIT> ? std :: make_pair ( <NUM_LIT> , <STR_LIT> ) : std :: make_pair ( <NUM_LIT> , <STR_LIT> ) ; } }

return TargetLowering :: getRegForInlineAsmConstraint ( Constraint , VT ) ;


<s> ConstraintWeight weight = CW_Invalid ; Value * CallOperandVal = info . CallOperandVal ; if ( CallOperandVal == NULL ) return CW_Default ; switch ( * constraint ) { default : weight = TargetLowering :: getSingleConstraintMatchWeight ( info , constraint ) ;


<s> Value * CallOperandVal = info . CallOperandVal ; if ( CallOperandVal == NULL ) return CW_Default ; switch ( * constraint ) { default : weight = TargetLowering :: getSingleConstraintMatchWeight ( info , constraint ) ; break ; case 'f' : weight = CW_Register ; break ; }


<s> break ; case CCValAssign :: ZExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: AExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; } if ( VA . isRegLoc ( ) ) { RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; } else { assert ( VA . isMemLoc ( ) ) ; if ( StackPtr . getNode ( ) == <NUM_LIT> ) StackPtr = DAG . getCopyFromReg ( Chain , dl , <STR_LIT> , <STR_LIT> ) ; SDValue PtrOff = DAG . getNode ( <STR_LIT> , dl , getPointerTy ( ) , StackPtr , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) ) ) ; MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , <NUM_LIT> ) ) ; } } if ( ! MemOpChains . empty ( ) ) Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & MemOpChains [ <NUM_LIT> ] , MemOpChains . size ( ) ) ; SDValue InFlag ; for ( unsigned i = <NUM_LIT> , e = RegsToPass . size ( ) ; i != e ; ++ i ) {

Chain = DAG . getCopyToReg ( Chain , dl , RegsToPass [ i ] . first , RegsToPass [ i ] . second , InFlag ) ;


<s> Chain = DAG . getCopyFromReg ( Chain , dl , VA . getLocReg ( ) , VA . getLocVT ( ) , InFlag ) . getValue ( <NUM_LIT> ) ; SDValue RetValue = Chain . getValue ( <NUM_LIT> ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , RetValue , DAG . getValueType ( VA . getValVT ( ) ) ) ; else if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , RetValue , DAG . getValueType ( VA . getValVT ( ) ) ) ; if ( VA . getLocInfo ( ) != CCValAssign :: Full ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getValVT ( ) , RetValue ) ; InVals . push_back ( RetValue ) ; } return Chain ;


<s> args_float [ ArgNo ] = AddLiveIn ( MF , args_float [ ArgNo ] , & <STR_LIT> ) ; ArgVal = DAG . getCopyFromReg ( Chain , dl , args_float [ ArgNo ] , ObjectVT ) ; break ; case <STR_LIT> : args_float [ ArgNo ] = AddLiveIn ( MF , args_float [ ArgNo ] , & <STR_LIT> ) ; ArgVal = DAG . getCopyFromReg ( Chain , dl , args_float [ ArgNo ] , ObjectVT ) ; break ; case <STR_LIT> : args_int [ ArgNo ] = AddLiveIn ( MF , args_int [ ArgNo ] , & <STR_LIT> ) ; ArgVal = DAG . getCopyFromReg ( Chain , dl , args_int [ ArgNo ] , <STR_LIT> ) ; break ; } } else { int FI = MFI -> CreateFixedObject ( <NUM_LIT> , <NUM_LIT> * ( ArgNo - <NUM_LIT> ) , true ) ; SDValue FIN = DAG . getFrameIndex ( FI , <STR_LIT> ) ; ArgVal = DAG . getLoad ( ObjectVT , dl , Chain , FIN , MachinePointerInfo ( ) , false , false , <NUM_LIT> ) ; } InVals . push_back ( ArgVal ) ; } if ( isVarArg ) { FuncInfo -> setVarArgsOffset ( Ins . size ( ) * <NUM_LIT> ) ; std :: vector < SDValue > LS ; for ( int i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i ) { if ( TargetRegisterInfo :: isPhysicalRegister ( args_int [ i ] ) ) args_int [ i ] = AddLiveIn ( MF , args_int [ i ] , & <STR_LIT> ) ; SDValue argt = DAG . getCopyFromReg ( Chain , dl , args_int [ i ] , <STR_LIT> ) ; int FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true ) ; if ( i == <NUM_LIT> ) FuncInfo -> setVarArgsBase ( FI ) ; SDValue SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , MachinePointerInfo ( ) , false , false , <NUM_LIT> ) ) ; if ( TargetRegisterInfo :: isPhysicalRegister ( args_float [ i ] ) ) args_float [ i ] = AddLiveIn ( MF , args_float [ i ] , & <STR_LIT> ) ; argt = DAG . getCopyFromReg ( Chain , dl , args_float [ i ] , <STR_LIT> ) ; FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true ) ; SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , MachinePointerInfo ( ) , false , false , <NUM_LIT> ) ) ; } Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & LS [ <NUM_LIT> ] , LS . size ( ) ) ; } return Chain ;


<s> ArgReg2 = <STR_LIT> ; } Copy = DAG . getCopyToReg ( Copy , dl , ArgReg1 , OutVals [ <NUM_LIT> ] , Copy . getValue ( <NUM_LIT> ) ) ; if ( std :: find ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_begin ( ) , DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) , ArgReg1 ) == DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) ) DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( ArgReg1 ) ; Copy = DAG . getCopyToReg ( Copy , dl , ArgReg2 , OutVals [ <NUM_LIT> ] , Copy . getValue ( <NUM_LIT> ) ) ; if ( std :: find ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_begin ( ) , DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) , ArgReg2 ) == DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_end ( ) ) DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( ArgReg2 ) ; break ; } }

return DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Copy , Copy . getValue ( <NUM_LIT> ) ) ;


<s> SDValue Chain , DataPtr ; LowerVAARG ( N , Chain , DataPtr , DAG ) ; SDValue Res = DAG . getLoad ( N -> getValueType ( <NUM_LIT> ) , dl , Chain , DataPtr , MachinePointerInfo ( ) , false , false , <NUM_LIT> ) ;


<s> CCValAssign & VA = ArgLocs [ i ] ; SDValue Arg = OutVals [ i ] ; switch ( VA . getLocInfo ( ) ) { default : assert ( <NUM_LIT> && <STR_LIT> ) ; case CCValAssign :: Full : break ; case CCValAssign :: SExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: ZExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: AExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; } if ( VA . isRegLoc ( ) ) { RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; } else { assert ( VA . isMemLoc ( ) ) ; if ( StackPtr . getNode ( ) == <NUM_LIT> ) StackPtr = DAG . getCopyFromReg ( Chain , dl , <STR_LIT> , <STR_LIT> ) ; SDValue PtrOff = DAG . getNode ( <STR_LIT> , dl , getPointerTy ( ) , StackPtr , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) ) ) ; MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , PseudoSourceValue :: getStack ( ) , <NUM_LIT> , false , false , <NUM_LIT> ) ) ; } } if ( ! MemOpChains . empty ( ) ) Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & MemOpChains [ <NUM_LIT> ] , MemOpChains . size ( ) ) ; SDValue InFlag ; for ( unsigned i = <NUM_LIT> , e = RegsToPass . size ( ) ; i != e ; ++ i ) { Chain = DAG . getCopyToReg ( Chain , dl , RegsToPass [ i ] . first , RegsToPass [ i ] . second , InFlag ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; }

SDVTList NodeTys = DAG . getVTList ( <STR_LIT> , <STR_LIT> ) ;


<s> SDValue RetValue = Chain . getValue ( <NUM_LIT> ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; if ( VA . getLocInfo ( ) == CCValAssign :: SExt ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , RetValue , DAG . getValueType ( VA . getValVT ( ) ) ) ; else if ( VA . getLocInfo ( ) == CCValAssign :: ZExt ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , RetValue , DAG . getValueType ( VA . getValVT ( ) ) ) ; if ( VA . getLocInfo ( ) != CCValAssign :: Full ) RetValue = DAG . getNode ( <STR_LIT> , dl , VA . getValVT ( ) , RetValue ) ;


<s> if ( TargetRegisterInfo :: isPhysicalRegister ( args_int [ i ] ) ) args_int [ i ] = AddLiveIn ( MF , args_int [ i ] , & <STR_LIT> ) ; SDValue argt = DAG . getCopyFromReg ( Chain , dl , args_int [ i ] , <STR_LIT> ) ; int FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true ) ; if ( i == <NUM_LIT> ) FuncInfo -> setVarArgsBase ( FI ) ; SDValue SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ) ; if ( TargetRegisterInfo :: isPhysicalRegister ( args_float [ i ] ) ) args_float [ i ] = AddLiveIn ( MF , args_float [ i ] , & <STR_LIT> ) ; argt = DAG . getCopyFromReg ( Chain , dl , args_float [ i ] , <STR_LIT> ) ; FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true ) ; SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ) ;


<s> } else { int FI = MFI -> CreateFixedObject ( <NUM_LIT> , <NUM_LIT> * ( ArgNo - <NUM_LIT> ) , true ) ; SDValue FIN = DAG . getFrameIndex ( FI , <STR_LIT> ) ; ArgVal = DAG . getLoad ( ObjectVT , dl , Chain , FIN , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ; } InVals . push_back ( ArgVal ) ; } if ( isVarArg ) { FuncInfo -> setVarArgsOffset ( Ins . size ( ) * <NUM_LIT> ) ; std :: vector < SDValue > LS ; for ( int i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i ) { if ( TargetRegisterInfo :: isPhysicalRegister ( args_int [ i ] ) ) args_int [ i ] = AddLiveIn ( MF , args_int [ i ] , & <STR_LIT> ) ; SDValue argt = DAG . getCopyFromReg ( Chain , dl , args_int [ i ] , <STR_LIT> ) ; int FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true ) ; if ( i == <NUM_LIT> ) FuncInfo -> setVarArgsBase ( FI ) ; SDValue SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ) ; if ( TargetRegisterInfo :: isPhysicalRegister ( args_float [ i ] ) ) args_float [ i ] = AddLiveIn ( MF , args_float [ i ] , & <STR_LIT> ) ; argt = DAG . getCopyFromReg ( Chain , dl , args_float [ i ] , <STR_LIT> ) ; FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) , true ) ; SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Chain , dl , argt , SDFI , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ) ; }

Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & LS [ <NUM_LIT> ] , LS . size ( ) ) ;


<s> SDValue VAListP = N -> getOperand ( <NUM_LIT> ) ; const Value * VAListS = cast < SrcValueSDNode > ( N -> getOperand ( <NUM_LIT> ) ) -> getValue ( ) ; DebugLoc dl = N -> getDebugLoc ( ) ; SDValue Base = DAG . getLoad ( <STR_LIT> , dl , Chain , VAListP , VAListS , <NUM_LIT> , false , false , <NUM_LIT> ) ; SDValue Tmp = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , VAListP , DAG . getConstant ( <NUM_LIT> , <STR_LIT> ) ) ; SDValue Offset = DAG . getExtLoad ( <STR_LIT> , <STR_LIT> , dl , Base . getValue ( <NUM_LIT> ) , Tmp , NULL , <NUM_LIT> , <STR_LIT> , false , false , <NUM_LIT> ) ; DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Base , Offset ) ;

if ( N -> getValueType ( <NUM_LIT> ) . isFloatingPoint ( ) ) {


<s> SDValue Res = DAG . getLoad ( N -> getValueType ( <NUM_LIT> ) , dl , Chain , DataPtr , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ; Results . push_back ( Res ) ; Results . push_back ( SDValue ( Res . getNode ( ) , <NUM_LIT> ) ) ;


<s> DebugLoc dl = N -> getDebugLoc ( ) ; assert ( N -> getValueType ( <NUM_LIT> ) == <STR_LIT> && N -> getOpcode ( ) == <STR_LIT> && <STR_LIT> ) ; SDValue Chain , DataPtr ; LowerVAARG ( N , Chain , DataPtr , DAG ) ;

SDValue Res = DAG . getLoad ( N -> getValueType ( <NUM_LIT> ) , dl , Chain , DataPtr , NULL , <NUM_LIT> , false , false , <NUM_LIT> ) ;


<s> setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; if ( ! TM . getSubtarget < <ISA_LIT>Subtarget > ( ) . hasCT ( ) ) { setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; } setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Promote ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Promote ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Expand ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ; setOperationAction ( <STR_LIT> , <STR_LIT> , Custom ) ;

setStackPointerRegisterToSaveRestore ( <STR_LIT> ) ;


<s> BuildMI ( llscMBB , dl , TII -> get ( is32 ? <STR_LIT> : <STR_LIT> ) , reg_res ) . addImm ( <NUM_LIT> ) . addReg ( reg_ptr ) ; switch ( MI -> getOpcode ( ) ) { case <STR_LIT> : case <STR_LIT> : { unsigned reg_cmp = F -> getRegInfo ( ) . createVirtualRegister ( & <STR_LIT> ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_cmp ) . addReg ( reg_v2 ) . addReg ( reg_res ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) ) . addImm ( <NUM_LIT> ) . addReg ( reg_cmp ) . addMBB ( sinkMBB ) ; BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_store ) . addReg ( <STR_LIT> ) . addReg ( MI -> getOperand ( <NUM_LIT> ) . getReg ( ) ) ; break ; } case <STR_LIT> : case <STR_LIT> : { BuildMI ( llscMBB , dl , TII -> get ( is32 ? <STR_LIT> : <STR_LIT> ) , reg_store ) . addReg ( reg_res ) . addReg ( reg_v2 ) ; break ; } case <STR_LIT> : case <STR_LIT> : { BuildMI ( llscMBB , dl , TII -> get ( <STR_LIT> ) , reg_store ) . addReg ( reg_v2 ) . addReg ( reg_v2 ) ; break ;


<s> MVT <ISA_LIT>TargetLowering :: getSetCCResultType ( MVT VT ) const { return <STR_LIT> ;


<s> else Args [ i ] . Node = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Args [ i ] . Node ) ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : break ; } args_to_use . push_back ( Args [ i ] . Node ) ; } std :: vector < MVT > RetVals ; MVT RetTyVT = getValueType ( RetTy ) ; MVT ActualRetTyVT = RetTyVT ; if ( RetTyVT . getSimpleVT ( ) >= <STR_LIT> && RetTyVT . getSimpleVT ( ) <= <STR_LIT> ) ActualRetTyVT = <STR_LIT> ; if ( RetTyVT != <STR_LIT> ) RetVals . push_back ( ActualRetTyVT ) ; RetVals . push_back ( <STR_LIT> ) ; std :: vector < SDValue > Ops ; Ops . push_back ( Chain ) ; Ops . push_back ( Callee ) ; Ops . insert ( Ops . end ( ) , args_to_use . begin ( ) , args_to_use . end ( ) ) ; SDValue TheCall = DAG . getNode ( <STR_LIT> , dl , RetVals , & Ops [ <NUM_LIT> ] , Ops . size ( ) ) ; Chain = TheCall . getValue ( RetTyVT != <STR_LIT> ) ;

Chain = DAG . getCALLSEQ_END ( Chain , DAG . getIntPtrConstant ( NumBytes , true ) , DAG . getIntPtrConstant ( <NUM_LIT> , true ) , SDValue ( ) ) ;


<s> int NumBytes = <NUM_LIT> ; if ( Args . size ( ) > <NUM_LIT> ) NumBytes = ( Args . size ( ) - <NUM_LIT> ) * <NUM_LIT> ; Chain = DAG . getCALLSEQ_START ( Chain , DAG . getIntPtrConstant ( NumBytes , true ) ) ; std :: vector < SDValue > args_to_use ; for ( unsigned i = <NUM_LIT> , e = Args . size ( ) ; i != e ; ++ i ) { switch ( getValueType ( Args [ i ] . Ty ) . getSimpleVT ( ) ) { default : assert ( <NUM_LIT> && <STR_LIT> ) ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : if ( Args [ i ] . isSExt ) Args [ i ] . Node = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Args [ i ] . Node ) ; else if ( Args [ i ] . isZExt ) Args [ i ] . Node = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Args [ i ] . Node ) ; else Args [ i ] . Node = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Args [ i ] . Node ) ; break ; case <STR_LIT> : case <STR_LIT> : case <STR_LIT> : break ; } args_to_use . push_back ( Args [ i ] . Node ) ; } std :: vector < MVT > RetVals ; MVT RetTyVT = getValueType ( RetTy ) ; MVT ActualRetTyVT = RetTyVT ; if ( RetTyVT . getSimpleVT ( ) >= <STR_LIT> && RetTyVT . getSimpleVT ( ) <= <STR_LIT> ) ActualRetTyVT = <STR_LIT> ; if ( RetTyVT != <STR_LIT> ) RetVals . push_back ( ActualRetTyVT ) ; RetVals . push_back ( <STR_LIT> ) ; std :: vector < SDValue > Ops ; Ops . push_back ( Chain ) ; Ops . push_back ( Callee ) ;

Ops . insert ( Ops . end ( ) , args_to_use . begin ( ) , args_to_use . end ( ) ) ;


<s> break ; case <STR_LIT> : args_float [ ArgNo ] = AddLiveIn ( MF , args_float [ ArgNo ] , & <STR_LIT> ) ; ArgVal = DAG . getCopyFromReg ( Root , dl , args_float [ ArgNo ] , ObjectVT ) ; break ; case <STR_LIT> : args_int [ ArgNo ] = AddLiveIn ( MF , args_int [ ArgNo ] , & <STR_LIT> ) ; ArgVal = DAG . getCopyFromReg ( Root , dl , args_int [ ArgNo ] , <STR_LIT> ) ; break ; } } else { int FI = MFI -> CreateFixedObject ( <NUM_LIT> , <NUM_LIT> * ( ArgNo - <NUM_LIT> ) ) ; SDValue FIN = DAG . getFrameIndex ( FI , <STR_LIT> ) ; ArgVal = DAG . getLoad ( ObjectVT , dl , Root , FIN , NULL , <NUM_LIT> ) ; } ArgValues . push_back ( ArgVal ) ; } bool isVarArg = cast < ConstantSDNode > ( Op . getOperand ( <NUM_LIT> ) ) -> getZExtValue ( ) != <NUM_LIT> ; if ( isVarArg ) { VarArgsOffset = ( Op . getNode ( ) -> getNumValues ( ) - <NUM_LIT> ) * <NUM_LIT> ; std :: vector < SDValue > LS ; for ( int i = <NUM_LIT> ; i < <NUM_LIT> ; ++ i ) { if ( TargetRegisterInfo :: isPhysicalRegister ( args_int [ i ] ) ) args_int [ i ] = AddLiveIn ( MF , args_int [ i ] , & <STR_LIT> ) ; SDValue argt = DAG . getCopyFromReg ( Root , dl , args_int [ i ] , <STR_LIT> ) ; int FI = MFI -> CreateFixedObject ( <NUM_LIT> , - <NUM_LIT> * ( <NUM_LIT> - i ) ) ; if ( i == <NUM_LIT> ) VarArgsBase = FI ; SDValue SDFI = DAG . getFrameIndex ( FI , <STR_LIT> ) ; LS . push_back ( DAG . getStore ( Root , dl , argt , SDFI , NULL , <NUM_LIT> ) ) ;

if ( TargetRegisterInfo :: isPhysicalRegister ( args_float [ i ] ) ) args_float [ i ] = AddLiveIn ( MF , args_float [ i ] , & <STR_LIT> ) ;


<s> SDValue Hi = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , JTI , DAG . getGLOBAL_OFFSET_TABLE ( <STR_LIT> ) ) ;


<s> static SDValue LowerRET ( SDValue Op , SelectionDAG & DAG ) { DebugLoc dl = Op . getDebugLoc ( ) ; SDValue Copy = DAG . getCopyToReg ( Op . getOperand ( <NUM_LIT> ) , dl , <STR_LIT> , DAG . getNode ( <STR_LIT> , DebugLoc :: getUnknownLoc ( ) , <STR_LIT> ) , SDValue ( ) ) ; switch ( Op . getNumOperands ( ) ) { default : assert ( <NUM_LIT> && <STR_LIT> ) ; abort ( ) ; case <NUM_LIT> : break ; case <NUM_LIT> : { MVT ArgVT = Op . getOperand ( <NUM_LIT> ) . getValueType ( ) ; unsigned ArgReg ; if ( ArgVT . isInteger ( ) ) ArgReg = <STR_LIT> ; else { assert ( ArgVT . isFloatingPoint ( ) ) ; ArgReg = <STR_LIT> ; } Copy = DAG . getCopyToReg ( Copy , dl , ArgReg , Op . getOperand ( <NUM_LIT> ) , Copy . getValue ( <NUM_LIT> ) ) ; if ( DAG . getMachineFunction ( ) . getRegInfo ( ) . liveout_empty ( ) ) DAG . getMachineFunction ( ) . getRegInfo ( ) . addLiveOut ( ArgReg ) ; break ; } case <NUM_LIT> : { MVT ArgVT = Op . getOperand ( <NUM_LIT> ) . getValueType ( ) ; unsigned ArgReg1 , ArgReg2 ; if ( ArgVT . isInteger ( ) ) { ArgReg1 = <STR_LIT> ; ArgReg2 = <STR_LIT> ;


<s> DebugLoc dl = N -> getDebugLoc ( ) ; SDValue Base = DAG . getLoad ( <STR_LIT> , dl , Chain , VAListP , VAListS , <NUM_LIT> ) ; SDValue Tmp = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , VAListP , DAG . getConstant ( <NUM_LIT> , <STR_LIT> ) ) ; SDValue Offset = DAG . getExtLoad ( <STR_LIT> , dl , <STR_LIT> , Base . getValue ( <NUM_LIT> ) , Tmp , NULL , <NUM_LIT> , <STR_LIT> ) ; DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Base , Offset ) ; if ( N -> getValueType ( <NUM_LIT> ) . isFloatingPoint ( ) ) { SDValue FPDataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , DataPtr , DAG . getConstant ( <NUM_LIT> * <NUM_LIT> , <STR_LIT> ) ) ; SDValue CC = DAG . getSetCC ( dl , <STR_LIT> , Offset , DAG . getConstant ( <NUM_LIT> * <NUM_LIT> , <STR_LIT> ) , <STR_LIT> ) ; DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , CC , FPDataPtr , DataPtr ) ; } SDValue NewOffset = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Offset , DAG . getConstant ( <NUM_LIT> , <STR_LIT> ) ) ;

Chain = DAG . getTruncStore ( Offset . getValue ( <NUM_LIT> ) , dl , NewOffset , Tmp , NULL , <NUM_LIT> , <STR_LIT> ) ;


<s> SDValue Chain , DataPtr ; LowerVAARG ( N , Chain , DataPtr , DAG ) ; SDValue Res = DAG . getLoad ( N -> getValueType ( <NUM_LIT> ) , dl , Chain , DataPtr , NULL , <NUM_LIT> ) ;


<s> case CCValAssign :: SExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: ZExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; case CCValAssign :: AExt : Arg = DAG . getNode ( <STR_LIT> , dl , VA . getLocVT ( ) , Arg ) ; break ; } if ( VA . isRegLoc ( ) ) { RegsToPass . push_back ( std :: make_pair ( VA . getLocReg ( ) , Arg ) ) ; } else { assert ( VA . isMemLoc ( ) ) ; if ( StackPtr . getNode ( ) == <NUM_LIT> ) StackPtr = DAG . getCopyFromReg ( Chain , dl , <STR_LIT> , <STR_LIT> ) ; SDValue PtrOff = DAG . getNode ( <STR_LIT> , dl , getPointerTy ( ) , StackPtr , DAG . getIntPtrConstant ( VA . getLocMemOffset ( ) ) ) ; MemOpChains . push_back ( DAG . getStore ( Chain , dl , Arg , PtrOff , MachinePointerInfo ( ) , false , false , <NUM_LIT> ) ) ; } } if ( ! MemOpChains . empty ( ) ) Chain = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , & MemOpChains [ <NUM_LIT> ] , MemOpChains . size ( ) ) ; SDValue InFlag ; for ( unsigned i = <NUM_LIT> , e = RegsToPass . size ( ) ; i != e ; ++ i ) { Chain = DAG . getCopyToReg ( Chain , dl , RegsToPass [ i ] . first , RegsToPass [ i ] . second , InFlag ) ;

InFlag = Chain . getValue ( <NUM_LIT> ) ;


<s> SDValue Offset = DAG . getExtLoad ( <STR_LIT> , <STR_LIT> , dl , Base . getValue ( <NUM_LIT> ) , Tmp , MachinePointerInfo ( ) , <STR_LIT> , false , false , <NUM_LIT> ) ; DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Base , Offset ) ; if ( N -> getValueType ( <NUM_LIT> ) . isFloatingPoint ( ) ) { SDValue FPDataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , DataPtr , DAG . getConstant ( <NUM_LIT> * <NUM_LIT> , <STR_LIT> ) ) ; SDValue CC = DAG . getSetCC ( dl , <STR_LIT> , Offset , DAG . getConstant ( <NUM_LIT> * <NUM_LIT> , <STR_LIT> ) , <STR_LIT> ) ; DataPtr = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , CC , FPDataPtr , DataPtr ) ; }

SDValue NewOffset = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Offset , DAG . getConstant ( <NUM_LIT> , <STR_LIT> ) ) ;