<s> assert ( ( & ( MF -> getContext ( ) ) == & ( AsmPrinter :: OutContext ) ) && <STR_LIT> ) ; if ( MI -> isPseudo ( ) ) llvm_unreachable ( <STR_LIT> ) ;


<s> if ( MI -> isPseudo ( ) ) llvm_unreachable ( <STR_LIT> ) ; MCInst TmpInst0 ;

MCInstLowering . lower ( MI , TmpInst0 ) ;


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


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


<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> case <STR_LIT> : assert ( hasReservedCallFrame ( MF ) && <STR_LIT> ) ; MBB . erase ( MI ) ; break ; default : llvm_unreachable ( <STR_LIT> ) ;


<s> void <ISA_LIT>FrameLowering :: emitEpilogue ( MachineFunction & MF , MachineBasicBlock & MBB ) const { MachineFrameInfo * MFrmInf = MF . getFrameInfo ( ) ; MachineBasicBlock :: iterator MBBI = std :: prev ( MBB . end ( ) ) ; const <ISA_LIT>InstrInfo & TII = * static_cast < const <ISA_LIT>InstrInfo * > ( MF . getSubtarget ( ) . getInstrInfo ( ) ) ; <ISA_LIT>FunctionInfo * MFuncInf = MF . getInfo < <ISA_LIT>FunctionInfo > ( ) ; assert ( MBBI -> getOpcode ( ) == <STR_LIT> && <STR_LIT> ) ; DebugLoc dl = MBBI -> getDebugLoc ( ) ; bool FP = hasFP ( MF ) ; int FrameSize = MFrmInf -> getStackSize ( ) ; if ( FrameSize ) { if ( FP ) { int FPSpillOffset = MFrmInf -> getObjectOffset ( MFuncInf -> getFPSpillSlot ( ) ) + FrameSize ; FPSpillOffset += Subtarget . hasSPBias ( ) ? <NUM_LIT> : <NUM_LIT> ; BuildMI ( MBB , MBBI , dl , TII . get ( <STR_LIT> ) ) . addReg ( <STR_LIT> ) . addReg ( <STR_LIT> ) . addImm ( FPSpillOffset ) ; } if ( MFuncInf -> getUsesLR ( ) ) { int LRSpillOffset = MFrmInf -> getObjectOffset ( MFuncInf -> getLRSpillSlot ( ) ) + FrameSize ;

LRSpillOffset += Subtarget . hasSPBias ( ) ? <NUM_LIT> : <NUM_LIT> ;


<s> const TargetRegisterInfo * RegInfo = MF . getSubtarget ( ) . getRegisterInfo ( ) ; const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ;

return ( MF . getTarget ( ) . Options . DisableFramePointerElim ( MF ) || RegInfo -> needsStackRealignment ( MF ) || MF . getFrameInfo ( ) -> hasVarSizedObjects ( ) || MFI -> isFrameAddressTaken ( ) ) ;


<s> bool <ISA_LIT>FrameLowering :: hasFP ( const MachineFunction & MF ) const {

const TargetRegisterInfo * RegInfo = MF . getSubtarget ( ) . getRegisterInfo ( ) ;


<s> bool hasReservedCallFrame ( const MachineFunction & MF ) const override {


<s> <ISA_LIT>FrameLowering :: <ISA_LIT>FrameLowering ( const <ISA_LIT>Subtarget & subtarget ) : TargetFrameLowering ( TargetFrameLowering :: StackGrowsDown , <NUM_LIT> , <NUM_LIT> , <NUM_LIT> ) , Subtarget ( subtarget ) {


<s> processFunctionBeforeFrameFinalized ( MachineFunction & MF , RegScavenger * ) const {


<s> <ISA_LIT>InstPrinter ( const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI ) : MCInstPrinter ( MAI , MII , MRI ) {


<s> O << * MO . getExpr ( ) ; } else if ( MO . isImm ( ) ) { O << MI -> getOperand ( OpNo ) . getImm ( ) ;


<s> void <ISA_LIT>InstPrinter :: printInst ( const MCInst * MI , raw_ostream & O , StringRef Annot ) { printInstruction ( MI , O ) ;


<s> printInst ( const MCInst * MI , raw_ostream & O , StringRef Annot ) {


<s> void <ISA_LIT>InstPrinter :: printMemOperand ( const MCInst * MI , int opNum , raw_ostream & O ) { O << <STR_LIT> ;


<s> O << <STR_LIT> ; printOperand ( MI , opNum , O ) ;


<s> void <ISA_LIT>InstPrinter :: printOperand ( const MCInst * MI , unsigned OpNo , raw_ostream & O ) const { const MCOperand & MO = MI -> getOperand ( OpNo ) ; if ( MO . isReg ( ) ) { O << getRegisterName ( MO . getReg ( ) ) ; } else if ( MO . isExpr ( ) ) { O << * MO . getExpr ( ) ;


<s> printRegName ( raw_ostream & O , unsigned RegNo ) const { O << '%' << getRegisterName ( RegNo ) ;


printRegName ( raw_ostream & O , unsigned RegNo ) const {


<s> O << ( short ) MI -> getOperand ( OpNo ) . getImm ( ) ;


<s> printSymbol ( const MCInst * MI , unsigned OpNo , raw_ostream & O , bool hi ) const { assert ( ( MI -> getOperand ( OpNo ) . isImm ( ) || MI -> getOperand ( OpNo ) . isExpr ( ) ) && <STR_LIT> ) ; O << ( hi ? <STR_LIT> : <STR_LIT> ) << <STR_LIT> ;


<s> printSymbol ( MI , OpNo , O , true ) ;


<s> printSymbol ( MI , OpNo , O , false ) ;


<s> const MCOperand & MO = MI -> getOperand ( opNum ) ;

if ( MO . isImm ( ) ) O << ( uint32_t ) MO . getImm ( ) ;


<s> printUnsignedImm ( const MCInst * MI , int opNum , raw_ostream & O ) { const MCOperand & MO = MI -> getOperand ( opNum ) ;


<s> const <ISA_LIT>RegisterInfo & getRegisterInfo ( ) const { return RI ;


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


<s> switch ( Opc ) { default : return false ; case <STR_LIT> : case <STR_LIT> : return true ;


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


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

return new <ISA_LIT>DAGToDAGISel ( TM , OptLevel ) ;


<s> assert ( <NUM_LIT> && <STR_LIT> ) ; unsigned GlobalBaseReg = getInstrInfo ( ) -> getGlobalBaseReg ( MF ) ;

return CurDAG -> getRegister ( GlobalBaseReg , TLI . getPointerTy ( ) ) . getNode ( ) ;


<s> unsigned GlobalBaseReg = getInstrInfo ( ) -> getGlobalBaseReg ( MF ) ;


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


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


<s> explicit <ISA_LIT>DAGToDAGISel ( <ISA_LIT>TargetMachine & TM , CodeGenOpt :: Level OptLevel ) : SelectionDAGISel ( TM , OptLevel ) , Subtarget ( * TM . getSubtargetImpl ( ) ) {


<s> if ( Node -> hasOneUse ( ) ) return CurDAG -> SelectNodeTo ( Node , Opc , VT , TFI , imm ) ; return CurDAG -> getMachineNode ( Opc , dl , VT , TFI , imm ) ; } case <STR_LIT> : { if ( TM . getRelocationModel ( ) == Reloc :: PIC_ ) { SDValue Chain = Node -> getOperand ( <NUM_LIT> ) ; SDValue Callee = Node -> getOperand ( <NUM_LIT> ) ; SDValue R20Reg = CurDAG -> getRegister ( <STR_LIT> , <STR_LIT> ) ; SDValue InFlag ( <NUM_LIT> , <NUM_LIT> ) ; if ( ( isa < GlobalAddressSDNode > ( Callee ) ) || ( isa < ExternalSymbolSDNode > ( Callee ) ) ) { SDValue GPReg = CurDAG -> getRegister ( <STR_LIT> , <STR_LIT> ) ; SDValue Ops [ ] = { Callee , GPReg , Chain } ; SDValue Load = SDValue ( CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , Ops , <NUM_LIT> ) , <NUM_LIT> ) ; Chain = Load . getValue ( <NUM_LIT> ) ; Chain = CurDAG -> getCopyToReg ( Chain , dl , R20Reg , Load , InFlag ) ; } else Chain = CurDAG -> getCopyToReg ( Chain , dl , R20Reg , Callee , InFlag ) ; SDNode * ResNode = CurDAG -> getMachineNode ( <STR_LIT> , dl , <STR_LIT> , <STR_LIT> , R20Reg , Chain ) ; Chain = SDValue ( ResNode , <NUM_LIT> ) ; InFlag = SDValue ( ResNode , <NUM_LIT> ) ;

ReplaceUses ( SDValue ( Node , <NUM_LIT> ) , Chain ) ;


<s> return true ; } if ( Addr . getOpcode ( ) == <STR_LIT> || Addr . getOpcode ( ) == <STR_LIT> ) return false ; if ( Addr . getOpcode ( ) == <STR_LIT> ) { if ( ConstantSDNode * CN = dyn_cast < ConstantSDNode > ( Addr . getOperand ( <NUM_LIT> ) ) ) { if ( isInt < <NUM_LIT> > ( CN -> getSExtValue ( ) ) ) { if ( FrameIndexSDNode * FIN = dyn_cast < FrameIndexSDNode > ( Addr . getOperand ( <NUM_LIT> ) ) ) { Base = CurDAG -> getTargetFrameIndex ( FIN -> getIndex ( ) , <STR_LIT> ) ; } else { Base = Addr . getOperand ( <NUM_LIT> ) ; } Offset = CurDAG -> getTargetConstant ( CN -> getZExtValue ( ) , <STR_LIT> ) ; return true ; } } if ( Addr . getOperand ( <NUM_LIT> ) . getOpcode ( ) == MonarchISD :: Lo ) { assert ( <NUM_LIT> && <STR_LIT> ) ; Base = Addr . getOperand ( <NUM_LIT> ) ;

Offset = Addr . getOperand ( <NUM_LIT> ) . getOperand ( <NUM_LIT> ) ;


<s> MachineFunction * F = MBB -> getParent ( ) ; MachineBasicBlock * flsBB = F -> CreateMachineBasicBlock ( LLVM_BB ) ; MachineBasicBlock * sinkBB = F -> CreateMachineBasicBlock ( LLVM_BB ) ; F -> insert ( It , flsBB ) ; F -> insert ( It , sinkBB ) ; sinkBB -> splice ( sinkBB -> begin ( ) , MBB , std :: next ( MachineBasicBlock :: iterator ( MI ) ) , MBB -> end ( ) ) ; sinkBB -> transferSuccessorsAndUpdatePHIs ( MBB ) ; MBB -> addSuccessor ( flsBB ) ;


<s> MachineBasicBlock * <ISA_LIT>TargetLowering :: EmitInstrWithCustomInserter ( MachineInstr * MI , MachineBasicBlock * MBB ) const {


<s> switch ( Constraint [ <NUM_LIT> ] ) { default : break ; case 'd' : case 'y' :


<s> unsigned <ISA_LIT>TargetLowering :: getFunctionAlignment ( const Function * ) const { return <NUM_LIT> ;


<s> unsigned <ISA_LIT>TargetLowering :: getFunctionAlignment ( const Function * ) const {


<s> default : llvm_unreachable ( <STR_LIT> ) ; case EQ : return NE ; case NE : return EQ ; case GT : return LE ; case LT : return GE ; case GE : return LT ; case LE : return GE ;


<s> switch ( cc ) { default : llvm_unreachable ( <STR_LIT> ) ; case EQ : return NE ; case NE : return EQ ; case GT : return LE ; case LT : return GE ; case GE : return LT ; case LE : return GE ;


<s> case 'r' : return std :: make_pair ( <NUM_LIT> , & <STR_LIT> ) ; case 'd' : case 'y' : case 'f' :

if ( VT == <STR_LIT> ) return std :: make_pair ( <NUM_LIT> , & <STR_LIT> ) ;


<s> std :: pair < unsigned , const TargetRegisterClass * > <ISA_LIT>TargetLowering :: getRegForInlineAsmConstraint ( const std :: string & Constraint , MVT VT ) const {

if ( Constraint . size ( ) == <NUM_LIT> ) {


<s> EVT <ISA_LIT>TargetLowering :: getSetCCResultType ( LLVMContext & Context , EVT VT ) const {


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


<s> case 'y' : if ( type -> isIntegerTy ( ) ) weight = CW_Register ; break ; case 'f' : if ( type -> isFloatTy ( ) ) weight = CW_Register ; break ; }


<s> const char * <ISA_LIT>TargetLowering :: getTargetNodeName ( unsigned Opcode ) const { switch ( Opcode ) { case <STR_LIT> : return <STR_LIT> ;


<s> unsigned NumWords = ( Size + <NUM_LIT> ) / <NUM_LIT> ; unsigned NewSize = <NUM_LIT> ; for ( unsigned i = <NUM_LIT> ; i < NumWords ; ++ i ) {

if ( ! State -> AllocateReg ( ArgRegList , <NUM_LIT> ) ) {


<s> <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> , <STR_LIT> } ; unsigned NumWords = ( Size + <NUM_LIT> ) / <NUM_LIT> ; unsigned NewSize = <NUM_LIT> ;

for ( unsigned i = <NUM_LIT> ; i < NumWords ; ++ i ) {


isOffsetFoldingLegal ( const GlobalAddressSDNode * GA ) const {


<s> case NE : return <STR_LIT> ; case GT : return <STR_LIT> ; case LT : return <STR_LIT> ; case GE : return <STR_LIT> ; case LE : return <STR_LIT> ; }


<s> SDValue SizeNode = DAG . getConstant ( NumWords * <NUM_LIT> , <STR_LIT> ) ; MemOpChains . push_back ( DAG . getMemcpy ( Chain , dl , Dst , Arg , SizeNode , Flags . getByValAlign ( ) , false , false , MachinePointerInfo ( ) , MachinePointerInfo ( ) ) ) ; } else { assert ( VA . isMemLoc ( ) ) ; SDValue StackPtr = DAG . getRegister ( <STR_LIT> , <STR_LIT> ) ; int offset = VA . getLocMemOffset ( ) ; offset += Subtarget . hasSPBias ( ) ? <NUM_LIT> : <NUM_LIT> ; SDValue PtrOff = DAG . getIntPtrConstant ( offset ) ; PtrOff = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , StackPtr , PtrOff ) ; 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 ) ; 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> ) ; } if ( GlobalAddressSDNode * G = dyn_cast < GlobalAddressSDNode > ( Callee ) ) Callee = DAG . getTargetGlobalAddress ( G -> getGlobal ( ) , dl , getPointerTy ( ) ) ; else if ( ExternalSymbolSDNode * E = dyn_cast < ExternalSymbolSDNode > ( Callee ) ) Callee = DAG . getTargetExternalSymbol ( E -> getSymbol ( ) , getPointerTy ( ) ) ; 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 ) { assert ( i < <NUM_LIT> ) ; Ops . push_back ( DAG . getRegister ( RegsToPass [ i ] . first , RegsToPass [ i ] . second . getValueType ( ) ) ) ; }

if ( InFlag . getNode ( ) ) Ops . push_back ( InFlag ) ;


<s> CCInfo . AnalyzeCallResult ( Ins , RetCC_<ISA_LIT> ) ; for ( unsigned i = <NUM_LIT> ; i != RVLocs . size ( ) ; ++ i ) { Chain = DAG . getCopyFromReg ( Chain , dl , RVLocs [ i ] . getLocReg ( ) , RVLocs [ i ] . getValVT ( ) , InFlag ) . getValue ( <NUM_LIT> ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; InVals . push_back ( Chain . getValue ( <NUM_LIT> ) ) ;


<s> SDValue <ISA_LIT>TargetLowering :: LowerCallResult ( SDValue Chain , SDValue InFlag , CallingConv :: ID CallConv , bool isVarArg , const SmallVectorImpl < <STR_LIT> > & Ins , SDLoc dl , SelectionDAG & DAG , SmallVectorImpl < SDValue > & InVals ) const { SmallVector < CCValAssign , <NUM_LIT> > RVLocs ; CCState CCInfo ( CallConv , isVarArg , DAG . getMachineFunction ( ) , RVLocs , * DAG . getContext ( ) ) ; CCInfo . AnalyzeCallResult ( Ins , RetCC_<ISA_LIT> ) ; for ( unsigned i = <NUM_LIT> ; i != RVLocs . size ( ) ; ++ i ) { Chain = DAG . getCopyFromReg ( Chain , dl , RVLocs [ i ] . getLocReg ( ) , RVLocs [ i ] . getValVT ( ) , InFlag ) . getValue ( <NUM_LIT> ) ; InFlag = Chain . getValue ( <NUM_LIT> ) ; InVals . push_back ( Chain . getValue ( <NUM_LIT> ) ) ; } return Chain ;


<s> ConstantPoolSDNode * N = cast < ConstantPoolSDNode > ( Op ) ; SDLoc dl ( Op ) ; const Constant * C = N -> getConstVal ( ) ; SDValue CP = DAG . getTargetConstantPool ( C , <STR_LIT> , N -> getAlignment ( ) ) ; SDValue Hi = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , CP ) ; SDValue Lo = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , CP ) ;

return DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , Lo , Hi ) ;


<s> SDLoc dl ( Op ) ; SDValue GA = DAG . getTargetGlobalAddress ( GV , dl , <STR_LIT> ) ; if ( DAG . isVerifiedDebugInfoDesc ( Op ) ) return GA ; SDValue Hi = DAG . getNode ( <STR_LIT> , dl , <STR_LIT> , GA ) ;

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


<s> llvm_unreachable ( <STR_LIT> ) ; return SDValue ( ) ;


<s> SDValue JTI = DAG . getTargetJumpTable ( JT -> getIndex ( ) , <STR_LIT> ) ; SDValue Hi = DAG . getNode ( <STR_LIT> , SDLoc ( JT ) , <STR_LIT> , JTI ) ;

SDValue Lo = DAG . getNode ( <STR_LIT> , SDLoc ( JT ) , <STR_LIT> , JTI ) ;


<s> case <STR_LIT> : return LowerConstantPool ( Op , DAG ) ; case <STR_LIT> : return LowerGlobalAddress ( Op , DAG ) ; case <STR_LIT> : return LowerGlobalTLSAddress ( Op , DAG ) ; case <STR_LIT> : return LowerJumpTable ( Op , DAG ) ;

case <STR_LIT> : return LowerSELECT_CC ( Op , DAG ) ;


<s> case <STR_LIT> : return LowerConstantPool ( Op , DAG ) ; case <STR_LIT> : return LowerGlobalAddress ( Op , DAG ) ; case <STR_LIT> : return LowerGlobalTLSAddress ( Op , DAG ) ; case <STR_LIT> : return LowerJumpTable ( Op , DAG ) ; case <STR_LIT> : return LowerSELECT_CC ( Op , DAG ) ;

case <STR_LIT> : return LowerVASTART ( Op , DAG ) ;


<s> SDValue TrueVal = Op . getOperand ( <NUM_LIT> ) ; SDValue FalseVal = Op . getOperand ( <NUM_LIT> ) ; SDLoc dl ( Op ) ; EVT ResultTy = getSetCCResultType ( * DAG . getContext ( ) , Op . getOperand ( <NUM_LIT> ) . getValueType ( ) ) ; SDValue Cond = DAG . getNode ( <STR_LIT> , dl , ResultTy , LHS , RHS , CC ) ;

return DAG . getNode ( <STR_LIT> , dl , TrueVal . getValueType ( ) , Cond , TrueVal , FalseVal , DAG . getRegister ( <STR_LIT> , <STR_LIT> ) ) ;


<s> SDValue RHS = Op . getOperand ( <NUM_LIT> ) ; SDValue CC = Op . getOperand ( <NUM_LIT> ) ; SDValue TrueVal = Op . getOperand ( <NUM_LIT> ) ; SDValue FalseVal = Op . getOperand ( <NUM_LIT> ) ; SDLoc dl ( Op ) ;

EVT ResultTy = getSetCCResultType ( * DAG . getContext ( ) , Op . getOperand ( <NUM_LIT> ) . getValueType ( ) ) ;


<s> SDValue FI = DAG . getFrameIndex ( FuncInfo -> getVarArgsFrameIndex ( ) , getPointerTy ( ) ) ;

const Value * SV = cast < SrcValueSDNode > ( Op . getOperand ( <NUM_LIT> ) ) -> getValue ( ) ;


<s> const Value * SV = cast < SrcValueSDNode > ( Op . getOperand ( <NUM_LIT> ) ) -> getValue ( ) ; return DAG . getStore ( Op . getOperand ( <NUM_LIT> ) , dl , FI , Op . getOperand ( <NUM_LIT> ) , MachinePointerInfo ( SV ) , false , false , <NUM_LIT> ) ;


<s> int getFPSpillSlot ( ) const { return FPSpillSlot ;


<s> bool getUsesLR ( ) const { return UsesLR ;


<s> int getVarArgsFrameIndex ( ) const {


<s> UsesLR ( false ) , LRSpillSlot ( <NUM_LIT> ) , FPSpillSlot ( <NUM_LIT> ) , VarArgsFrameIndex ( <NUM_LIT> ) {


<s> void setFPSpillSlot ( int off ) { FPSpillSlot = off ;


<s> void setUsesLR ( bool val ) { UsesLR = val ;


<s> void <ISA_LIT>MCAsmInfo :: anchor ( ) {


<s> SupportsDebugInformation = true ; AlignmentIsInBytes = true ; PrivateGlobalPrefix = <STR_LIT> ; PrivateLabelPrefix = <STR_LIT> ; WeakRefDirective = <STR_LIT> ; GPRel32Directive = <STR_LIT> ; UsesELFSectionDirectiveForBSS = true ;


<s> WeakRefDirective = <STR_LIT> ; GPRel32Directive = <STR_LIT> ; UsesELFSectionDirectiveForBSS = true ;


<s> public : <ISA_LIT>MCInstLower ( <ISA_LIT>AsmPrinter & asmPrinter ) ; void lower ( const MachineInstr * MI , MCInst & OutMI ) const ; MCOperand lowerOperand ( const MachineOperand & MO ) const ;


<s> <ISA_LIT>MCInstLower :: <ISA_LIT>MCInstLower ( <ISA_LIT>AsmPrinter & asmprinter ) : AsmPrinter ( asmprinter ) {


<s> OutMI . setOpcode ( MI -> getOpcode ( ) ) ; for ( unsigned I = <NUM_LIT> , E = MI -> getNumOperands ( ) ; I != E ; ++ I ) {

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


<s> MCAsmInfo * MAI = new <ISA_LIT>MCAsmInfo ( TT ) ;

MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( nullptr , <STR_LIT> , <NUM_LIT> ) ;


<s> MCCFIInstruction Inst = MCCFIInstruction :: createDefCfa ( nullptr , <STR_LIT> , <NUM_LIT> ) ;


<s> static MCInstPrinter * create<ISA_LIT>MCInstPrinter ( const Target & T , unsigned SyntaxVariant , const MCAsmInfo & MAI , const MCInstrInfo & MII , const MCRegisterInfo & MRI , const MCSubtargetInfo & STI ) { return new <ISA_LIT>InstPrinter ( MAI , MII , MRI ) ;


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


<s> static MCInstrInfo * create<ISA_LIT>MCInstrInfo ( ) {


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


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


<s> static MCRegisterInfo * create<ISA_LIT>MCRegisterInfo ( StringRef TT ) {

MCRegisterInfo * X = new MCRegisterInfo ( ) ;


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


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


<s> MCSubtargetInfo * X = new MCSubtargetInfo ( ) ; Init<ISA_LIT>MCSubtargetInfo ( X , TT , CPU , FS ) ;


<s> TargetRegistry :: RegisterMCObjectStreamer ( The<ISA_LIT>Target , create<ISA_LIT>MCObjStreamer ) ; TargetRegistry :: RegisterMCInstrInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCInstrInfo ) ;

TargetRegistry :: RegisterMCRegInfo ( The<ISA_LIT>Target , create<ISA_LIT>MCRegisterInfo ) ;


<s> const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ;

return ( MF . getFunction ( ) -> hasFnAttribute ( <STR_LIT> ) && ! MFI -> hasVarSizedObjects ( ) ) ;


<s> FPRegToUse = <STR_LIT> ; } int FrameIndex = MI . getOperand ( FIOperandNum ) . getIndex ( ) ; int Offset = MF . getFrameInfo ( ) -> getObjectOffset ( FrameIndex ) ; assert ( Offset % <NUM_LIT> == <NUM_LIT> && <STR_LIT> ) ; int StackSize = MF . getFrameInfo ( ) -> getStackSize ( ) ; DEBUG ( dbgs ( ) << <STR_LIT> << MF . getFunction ( ) -> getName ( ) << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> ) ; DEBUG ( MI . print ( dbgs ( ) ) ) ; DEBUG ( dbgs ( ) << <STR_LIT> << FrameIndex << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << Offset << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << StackSize << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << Offset + StackSize << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << ( ( <STR_LIT> == FPRegToUse ) ? <STR_LIT> : <STR_LIT> ) << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << MI . getOperand ( FIOperandNum + <NUM_LIT> ) . getImm ( ) << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << MFrmInf -> isFixedObjectIndex ( FrameIndex ) << <STR_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << MFrmInf -> isSpillSlotObjectIndex ( FrameIndex ) << <STR_LIT> ) ; if ( ! useFP ) { Offset += StackSize ; assert ( Offset % <NUM_LIT> == <NUM_LIT> && <STR_LIT> ) ; Offset += Subtarget . hasSPBias ( ) ? <NUM_LIT> : <NUM_LIT> ; DEBUG ( dbgs ( ) << <STR_LIT> << Offset << <STR_LIT> ) ; } Offset += MI . getOperand ( FIOperandNum + <NUM_LIT> ) . getImm ( ) ; MI . getOperand ( FIOperandNum + <NUM_LIT> ) . ChangeToImmediate ( <NUM_LIT> ) ; DEBUG ( dbgs ( ) << <STR_LIT> << Offset << <STR_LIT> ) ; if ( Offset >= - <NUM_LIT> && Offset <= <NUM_LIT> ) { MI . getOperand ( FIOperandNum ) . ChangeToRegister ( FPRegToUse , false ) ; MI . getOperand ( FIOperandNum + <NUM_LIT> ) . ChangeToImmediate ( Offset ) ; } else { assert ( <NUM_LIT> && <STR_LIT> ) ; } DEBUG ( errs ( ) << <STR_LIT> ) ;


<s> unsigned <ISA_LIT>RegisterInfo :: getEHExceptionRegister ( ) const { llvm_unreachable ( <STR_LIT> ) ; return <NUM_LIT> ;


<s> unsigned <ISA_LIT>RegisterInfo :: getRARegister ( ) const {


<s> getReservedRegs ( const MachineFunction & MF ) const { BitVector Reserved ( getNumRegs ( ) ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ;


<s> getReservedRegs ( const MachineFunction & MF ) const { BitVector Reserved ( getNumRegs ( ) ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ; Reserved . set ( <STR_LIT> ) ;


<s> <ISA_LIT>RegisterInfo ( <ISA_LIT>Subtarget & st ) : <ISA_LIT>GenRegisterInfo ( <STR_LIT> ) , Subtarget ( st ) {


<s> needsStackRealignment ( const MachineFunction & MF ) const { const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; const Function * F = MF . getFunction ( ) ; unsigned StackAlign = MF . getTarget ( ) . getSubtargetImpl ( ) -> getFrameLowering ( ) -> getStackAlignment ( ) ;

DEBUG ( if ( ! ( MFI -> getMaxAlignment ( ) <= StackAlign ) ) errs ( ) << <STR_LIT> << MF . getFunction ( ) -> getName ( ) << <STR_LIT> ) ;


<s> const MachineFrameInfo * MFI = MF . getFrameInfo ( ) ; const Function * F = MF . getFunction ( ) ; unsigned StackAlign = MF . getTarget ( ) . getSubtargetImpl ( ) -> getFrameLowering ( ) -> getStackAlignment ( ) ; DEBUG ( if ( ! ( MFI -> getMaxAlignment ( ) <= StackAlign ) ) errs ( ) << <STR_LIT> << MF . getFunction ( ) -> getName ( ) << <STR_LIT> ) ; assert ( ( MFI -> getMaxAlignment ( ) <= StackAlign ) && <STR_LIT> ) ; assert ( ( ( MFI -> getMaxAlignment ( ) <= StackAlign ) || MF . getFunction ( ) -> hasFnAttribute ( <STR_LIT> ) ) && <STR_LIT> ) ; bool requiresRealignment = ( ( MFI -> getMaxAlignment ( ) > StackAlign ) || F -> getAttributes ( ) . hasAttribute ( AttributeSet :: FunctionIndex , Attribute :: StackAlignment ) ) ; if ( <NUM_LIT> && requiresRealignment && MFI -> hasVarSizedObjects ( ) ) report_fatal_error ( <STR_LIT> ) ; return requiresRealignment && canRealignStack ( MF ) ;


<s> <ISA_LIT>SelectionDAGInfo :: <ISA_LIT>SelectionDAGInfo ( const DataLayout & DL ) : TargetSelectionDAGInfo ( & DL ) {


<s> <ISA_LIT>SelectionDAGInfo :: ~ <ISA_LIT>SelectionDAGInfo ( ) {


<s> void <ISA_LIT>Subtarget :: anchor ( ) {


<s> const DataLayout * getDataLayout ( ) const override {


<s> void LLVMInitialize<ISA_LIT>TargetInfo ( ) {

RegisterTarget < Triple :: lm32 , false > X ( The<ISA_LIT>Target , <STR_LIT> , <STR_LIT> ) ;


<s> RegisterTarget < Triple :: lm32 , false > X ( The<ISA_LIT>Target , <STR_LIT> , <STR_LIT> ) ;


<s> bool <ISA_LIT>PassConfig :: addInstSelector ( ) { addPass ( create<ISA_LIT>ISelDag ( get<ISA_LIT>TargetMachine ( ) , getOptLevel ( ) ) ) ; return false ;


<s> addPass ( create<ISA_LIT>ISelDag ( get<ISA_LIT>TargetMachine ( ) , getOptLevel ( ) ) ) ; return false ;


<s> TargetPassConfig * <ISA_LIT>TargetMachine :: createPassConfig ( PassManagerBase & PM ) { return new <ISA_LIT>PassConfig ( this , PM ) ;


<s> <ISA_LIT>TargetMachine & get<ISA_LIT>TargetMachine ( ) const {

return getTM < <ISA_LIT>TargetMachine > ( ) ;


<s> TargetLoweringObjectFile * getObjFileLowering ( ) const override { return TLOF . get ( ) ;


<s> RegisterTargetMachine < <ISA_LIT>TargetMachine > X ( The<ISA_LIT>Target ) ;


<s> <ISA_LIT>PassConfig ( <ISA_LIT>TargetMachine * TM , PassManagerBase & PM ) : TargetPassConfig ( TM , PM ) {


<s> <ISA_LIT>TargetMachine :: ~ <ISA_LIT>TargetMachine ( ) {


<s> TargetLoweringObjectFileELF :: Initialize ( Ctx , TM ) ; SmallDataSection = getContext ( ) . getELFSection ( <STR_LIT> , ELF :: SHT_PROGBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC , SectionKind :: getDataRel ( ) ) ; SmallBSSSection = getContext ( ) . getELFSection ( <STR_LIT> , ELF :: SHT_NOBITS , ELF :: SHF_WRITE | ELF :: SHF_ALLOC , SectionKind :: getBSS ( ) ) ;


<s> IsGlobalInSmallSection ( const GlobalValue * GV , const TargetMachine & TM , SectionKind Kind ) const { const GlobalVariable * GVA = dyn_cast < GlobalVariable > ( GV ) ; if ( ! GVA ) return false ; if ( ! Kind . isBSS ( ) && ! Kind . isDataRel ( ) ) return false ;

if ( Kind . isMergeable1ByteCString ( ) ) return false ;


<s> Type * Ty = GV -> getType ( ) -> getElementType ( ) ; return IsInSmallSection ( TM . getSubtargetImpl ( ) -> getDataLayout ( ) -> getTypeAllocSize ( Ty ) ) ;


<s> static bool IsInSmallSection ( uint64_t Size ) {

return Size > <NUM_LIT> && Size <= <NUM_LIT> ;


<s> if ( Kind . isBSS ( ) && IsGlobalInSmallSection ( GV , TM , Kind ) ) return SmallBSSSection ;

if ( Kind . isDataNoRel ( ) && IsGlobalInSmallSection ( GV , TM , Kind ) ) return SmallDataSection ;