mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Fix coding style violations. Remove white spaces and tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1418045472
commit
864f66085c
@ -115,7 +115,8 @@ public:
|
||||
CurVal |= (uint64_t)((uint8_t)Data[Offset + Idx]) << (i*8);
|
||||
}
|
||||
|
||||
uint64_t Mask = ((uint64_t)(-1) >> (64 - getFixupKindInfo(Kind).TargetSize));
|
||||
uint64_t Mask = ((uint64_t)(-1) >>
|
||||
(64 - getFixupKindInfo(Kind).TargetSize));
|
||||
CurVal |= Value & Mask;
|
||||
|
||||
// Write out the fixed up bytes back to the code/data bits.
|
||||
|
@ -187,7 +187,7 @@ void MipsELFObjectWriter::sortRelocs(const MCAssembler &Asm,
|
||||
// Call the defualt function first. Relocations are sorted in descending
|
||||
// order of r_offset.
|
||||
MCELFObjectTargetWriter::sortRelocs(Asm, Relocs);
|
||||
|
||||
|
||||
RelLs RelocLs;
|
||||
std::vector<RelLsIter> Unmatched;
|
||||
|
||||
|
@ -181,7 +181,7 @@ getMachineOpValue(const MCInst &MI, const MCOperand &MO,
|
||||
} else if (MO.isFPImm()) {
|
||||
return static_cast<unsigned>(APFloat(MO.getFPImm())
|
||||
.bitcastToAPInt().getHiBits(32).getLimitedValue());
|
||||
}
|
||||
}
|
||||
|
||||
// MO must be an Expr.
|
||||
assert(MO.isExpr());
|
||||
@ -195,7 +195,7 @@ getMachineOpValue(const MCInst &MI, const MCOperand &MO,
|
||||
}
|
||||
|
||||
assert (Kind == MCExpr::SymbolRef);
|
||||
|
||||
|
||||
Mips::Fixups FixupKind = Mips::Fixups(0);
|
||||
|
||||
switch(cast<MCSymbolRefExpr>(Expr)->getKind()) {
|
||||
|
@ -386,7 +386,7 @@ void MipsAsmPrinter::printOperand(const MachineInstr *MI, int opNum,
|
||||
break;
|
||||
|
||||
case MachineOperand::MO_BlockAddress: {
|
||||
MCSymbol* BA = GetBlockAddressSymbol(MO.getBlockAddress());
|
||||
MCSymbol *BA = GetBlockAddressSymbol(MO.getBlockAddress());
|
||||
O << BA->getName();
|
||||
break;
|
||||
}
|
||||
@ -447,7 +447,7 @@ printMemOperandEA(const MachineInstr *MI, int opNum, raw_ostream &O) {
|
||||
void MipsAsmPrinter::
|
||||
printFCCOperand(const MachineInstr *MI, int opNum, raw_ostream &O,
|
||||
const char *Modifier) {
|
||||
const MachineOperand& MO = MI->getOperand(opNum);
|
||||
const MachineOperand &MO = MI->getOperand(opNum);
|
||||
O << Mips::MipsFCCToString((Mips::CondCode)MO.getImm());
|
||||
}
|
||||
|
||||
|
@ -76,14 +76,14 @@ namespace {
|
||||
InstrIter candidate);
|
||||
|
||||
void insertCallUses(InstrIter MI,
|
||||
SmallSet<unsigned, 32>& RegDefs,
|
||||
SmallSet<unsigned, 32>& RegUses);
|
||||
SmallSet<unsigned, 32> &RegDefs,
|
||||
SmallSet<unsigned, 32> &RegUses);
|
||||
|
||||
void insertDefsUses(InstrIter MI,
|
||||
SmallSet<unsigned, 32>& RegDefs,
|
||||
SmallSet<unsigned, 32>& RegUses);
|
||||
SmallSet<unsigned, 32> &RegDefs,
|
||||
SmallSet<unsigned, 32> &RegUses);
|
||||
|
||||
bool IsRegInSet(SmallSet<unsigned, 32>& RegSet,
|
||||
bool IsRegInSet(SmallSet<unsigned, 32> &RegSet,
|
||||
unsigned Reg);
|
||||
|
||||
bool delayHasHazard(InstrIter candidate,
|
||||
@ -230,8 +230,8 @@ bool Filler::delayHasHazard(InstrIter candidate,
|
||||
|
||||
// Insert Defs and Uses of MI into the sets RegDefs and RegUses.
|
||||
void Filler::insertDefsUses(InstrIter MI,
|
||||
SmallSet<unsigned, 32>& RegDefs,
|
||||
SmallSet<unsigned, 32>& RegUses) {
|
||||
SmallSet<unsigned, 32> &RegDefs,
|
||||
SmallSet<unsigned, 32> &RegUses) {
|
||||
// If MI is a call or return, just examine the explicit non-variadic operands.
|
||||
MCInstrDesc MCID = MI->getDesc();
|
||||
unsigned e = MI->isCall() || MI->isReturn() ? MCID.getNumOperands() :
|
||||
@ -256,7 +256,7 @@ void Filler::insertDefsUses(InstrIter MI,
|
||||
}
|
||||
|
||||
//returns true if the Reg or its alias is in the RegSet.
|
||||
bool Filler::IsRegInSet(SmallSet<unsigned, 32>& RegSet, unsigned Reg) {
|
||||
bool Filler::IsRegInSet(SmallSet<unsigned, 32> &RegSet, unsigned Reg) {
|
||||
// Check Reg and all aliased Registers.
|
||||
for (MCRegAliasIterator AI(Reg, TM.getRegisterInfo(), true);
|
||||
AI.isValid(); ++AI)
|
||||
|
@ -248,7 +248,7 @@ void MipsFrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
void MipsFrameLowering::
|
||||
processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
RegScavenger *RS) const {
|
||||
MachineRegisterInfo& MRI = MF.getRegInfo();
|
||||
MachineRegisterInfo &MRI = MF.getRegInfo();
|
||||
unsigned FP = STI.isABI_N64() ? Mips::FP_64 : Mips::FP;
|
||||
|
||||
// FIXME: remove this code if register allocator can correctly mark
|
||||
|
@ -144,7 +144,8 @@ void MipsDAGToDAGISel::InitGlobalBaseReg(MachineFunction &MF) {
|
||||
const GlobalValue *FName = MF.getFunction();
|
||||
BuildMI(MBB, I, DL, TII.get(Mips::LUi64), V0)
|
||||
.addGlobalAddress(FName, 0, MipsII::MO_GPOFF_HI);
|
||||
BuildMI(MBB, I, DL, TII.get(Mips::DADDu), V1).addReg(V0).addReg(Mips::T9_64);
|
||||
BuildMI(MBB, I, DL, TII.get(Mips::DADDu), V1).addReg(V0)
|
||||
.addReg(Mips::T9_64);
|
||||
BuildMI(MBB, I, DL, TII.get(Mips::DADDiu), GlobalBaseReg).addReg(V1)
|
||||
.addGlobalAddress(FName, 0, MipsII::MO_GPOFF_LO);
|
||||
MII->storeRegToStackSlot(MBB, I, GlobalBaseReg, false, FI, RC,
|
||||
@ -281,7 +282,7 @@ SelectAddr(SDNode *Parent, SDValue Addr, SDValue &Base, SDValue &Offset) {
|
||||
|
||||
// If Parent is an unaligned f32 load or store, select a (base + index)
|
||||
// floating point load/store instruction (luxc1 or suxc1).
|
||||
const LSBaseSDNode* LS = 0;
|
||||
const LSBaseSDNode *LS = 0;
|
||||
|
||||
if (Parent && (LS = dyn_cast<LSBaseSDNode>(Parent))) {
|
||||
EVT VT = LS->getMemoryVT();
|
||||
@ -352,7 +353,8 @@ SelectAddr(SDNode *Parent, SDValue Addr, SDValue &Base, SDValue &Offset) {
|
||||
}
|
||||
|
||||
// If an indexed floating point load/store can be emitted, return false.
|
||||
if (LS && (LS->getMemoryVT() == MVT::f32 || LS->getMemoryVT() == MVT::f64) &&
|
||||
if (LS &&
|
||||
(LS->getMemoryVT() == MVT::f32 || LS->getMemoryVT() == MVT::f64) &&
|
||||
Subtarget.hasMips32r2Or64())
|
||||
return false;
|
||||
}
|
||||
|
@ -334,17 +334,17 @@ EVT MipsTargetLowering::getSetCCResultType(EVT VT) const {
|
||||
// Lo0: initial value of Lo register
|
||||
// Hi0: initial value of Hi register
|
||||
// Return true if pattern matching was successful.
|
||||
static bool SelectMadd(SDNode* ADDENode, SelectionDAG* CurDAG) {
|
||||
static bool SelectMadd(SDNode *ADDENode, SelectionDAG *CurDAG) {
|
||||
// ADDENode's second operand must be a flag output of an ADDC node in order
|
||||
// for the matching to be successful.
|
||||
SDNode* ADDCNode = ADDENode->getOperand(2).getNode();
|
||||
SDNode *ADDCNode = ADDENode->getOperand(2).getNode();
|
||||
|
||||
if (ADDCNode->getOpcode() != ISD::ADDC)
|
||||
return false;
|
||||
|
||||
SDValue MultHi = ADDENode->getOperand(0);
|
||||
SDValue MultLo = ADDCNode->getOperand(0);
|
||||
SDNode* MultNode = MultHi.getNode();
|
||||
SDNode *MultNode = MultHi.getNode();
|
||||
unsigned MultOpc = MultHi.getOpcode();
|
||||
|
||||
// MultHi and MultLo must be generated by the same node,
|
||||
@ -407,17 +407,17 @@ static bool SelectMadd(SDNode* ADDENode, SelectionDAG* CurDAG) {
|
||||
// Lo0: initial value of Lo register
|
||||
// Hi0: initial value of Hi register
|
||||
// Return true if pattern matching was successful.
|
||||
static bool SelectMsub(SDNode* SUBENode, SelectionDAG* CurDAG) {
|
||||
static bool SelectMsub(SDNode *SUBENode, SelectionDAG *CurDAG) {
|
||||
// SUBENode's second operand must be a flag output of an SUBC node in order
|
||||
// for the matching to be successful.
|
||||
SDNode* SUBCNode = SUBENode->getOperand(2).getNode();
|
||||
SDNode *SUBCNode = SUBENode->getOperand(2).getNode();
|
||||
|
||||
if (SUBCNode->getOpcode() != ISD::SUBC)
|
||||
return false;
|
||||
|
||||
SDValue MultHi = SUBENode->getOperand(1);
|
||||
SDValue MultLo = SUBCNode->getOperand(1);
|
||||
SDNode* MultNode = MultHi.getNode();
|
||||
SDNode *MultNode = MultHi.getNode();
|
||||
unsigned MultOpc = MultHi.getOpcode();
|
||||
|
||||
// MultHi and MultLo must be generated by the same node,
|
||||
@ -472,9 +472,9 @@ static bool SelectMsub(SDNode* SUBENode, SelectionDAG* CurDAG) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static SDValue PerformADDECombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformADDECombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
if (DCI.isBeforeLegalize())
|
||||
return SDValue();
|
||||
|
||||
@ -485,9 +485,9 @@ static SDValue PerformADDECombine(SDNode *N, SelectionDAG& DAG,
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
static SDValue PerformSUBECombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformSUBECombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
if (DCI.isBeforeLegalize())
|
||||
return SDValue();
|
||||
|
||||
@ -498,9 +498,9 @@ static SDValue PerformSUBECombine(SDNode *N, SelectionDAG& DAG,
|
||||
return SDValue();
|
||||
}
|
||||
|
||||
static SDValue PerformDivRemCombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformDivRemCombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
if (DCI.isBeforeLegalizeOps())
|
||||
return SDValue();
|
||||
|
||||
@ -575,7 +575,7 @@ static bool InvertFPCondCode(Mips::CondCode CC) {
|
||||
|
||||
// Creates and returns an FPCmp node from a setcc node.
|
||||
// Returns Op if setcc is not a floating point comparison.
|
||||
static SDValue CreateFPCmp(SelectionDAG& DAG, const SDValue& Op) {
|
||||
static SDValue CreateFPCmp(SelectionDAG &DAG, const SDValue &Op) {
|
||||
// must be a SETCC node
|
||||
if (Op.getOpcode() != ISD::SETCC)
|
||||
return Op;
|
||||
@ -597,7 +597,7 @@ static SDValue CreateFPCmp(SelectionDAG& DAG, const SDValue& Op) {
|
||||
}
|
||||
|
||||
// Creates and returns a CMovFPT/F node.
|
||||
static SDValue CreateCMovFP(SelectionDAG& DAG, SDValue Cond, SDValue True,
|
||||
static SDValue CreateCMovFP(SelectionDAG &DAG, SDValue Cond, SDValue True,
|
||||
SDValue False, DebugLoc DL) {
|
||||
bool invert = InvertFPCondCode((Mips::CondCode)
|
||||
cast<ConstantSDNode>(Cond.getOperand(2))
|
||||
@ -607,9 +607,9 @@ static SDValue CreateCMovFP(SelectionDAG& DAG, SDValue Cond, SDValue True,
|
||||
True.getValueType(), True, False, Cond);
|
||||
}
|
||||
|
||||
static SDValue PerformSELECTCombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformSELECTCombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
if (DCI.isBeforeLegalizeOps())
|
||||
return SDValue();
|
||||
|
||||
@ -633,16 +633,16 @@ static SDValue PerformSELECTCombine(SDNode *N, SelectionDAG& DAG,
|
||||
const DebugLoc DL = N->getDebugLoc();
|
||||
ISD::CondCode CC = cast<CondCodeSDNode>(SetCC.getOperand(2))->get();
|
||||
SDValue True = N->getOperand(1);
|
||||
|
||||
|
||||
SetCC = DAG.getSetCC(DL, SetCC.getValueType(), SetCC.getOperand(0),
|
||||
SetCC.getOperand(1), ISD::getSetCCInverse(CC, true));
|
||||
|
||||
|
||||
return DAG.getNode(ISD::SELECT, DL, FalseTy, SetCC, False, True);
|
||||
}
|
||||
|
||||
static SDValue PerformANDCombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformANDCombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
// Pattern match EXT.
|
||||
// $dst = and ((sra or srl) $src , pos), (2**size - 1)
|
||||
// => ext $dst, $src, size, pos
|
||||
@ -680,9 +680,9 @@ static SDValue PerformANDCombine(SDNode *N, SelectionDAG& DAG,
|
||||
DAG.getConstant(SMSize, MVT::i32));
|
||||
}
|
||||
|
||||
static SDValue PerformORCombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformORCombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
// Pattern match INS.
|
||||
// $dst = or (and $src1 , mask0), (and (shl $src, pos), mask1),
|
||||
// where mask1 = (2**size - 1) << pos, mask0 = ~mask1
|
||||
@ -734,9 +734,9 @@ static SDValue PerformORCombine(SDNode *N, SelectionDAG& DAG,
|
||||
DAG.getConstant(SMSize0, MVT::i32), And0.getOperand(0));
|
||||
}
|
||||
|
||||
static SDValue PerformADDCombine(SDNode *N, SelectionDAG& DAG,
|
||||
static SDValue PerformADDCombine(SDNode *N, SelectionDAG &DAG,
|
||||
TargetLowering::DAGCombinerInfo &DCI,
|
||||
const MipsSubtarget* Subtarget) {
|
||||
const MipsSubtarget *Subtarget) {
|
||||
// (add v0, (add v1, abs_lo(tjt))) => (add (add v0, v1), abs_lo(tjt))
|
||||
|
||||
if (DCI.isBeforeLegalizeOps())
|
||||
@ -776,7 +776,7 @@ SDValue MipsTargetLowering::PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI)
|
||||
case ISD::UDIVREM:
|
||||
return PerformDivRemCombine(N, DAG, DCI, Subtarget);
|
||||
case ISD::SELECT:
|
||||
return PerformSELECTCombine(N, DAG, DCI, Subtarget);
|
||||
return PerformSELECTCombine(N, DAG, DCI, Subtarget);
|
||||
case ISD::AND:
|
||||
return PerformANDCombine(N, DAG, DCI, Subtarget);
|
||||
case ISD::OR:
|
||||
@ -847,7 +847,7 @@ static Mips::FPBranchCode GetFPBranchCodeFromCond(Mips::CondCode CC) {
|
||||
/*
|
||||
static MachineBasicBlock* ExpandCondMov(MachineInstr *MI, MachineBasicBlock *BB,
|
||||
DebugLoc dl,
|
||||
const MipsSubtarget* Subtarget,
|
||||
const MipsSubtarget *Subtarget,
|
||||
const TargetInstrInfo *TII,
|
||||
bool isFPCmp, unsigned Opc) {
|
||||
// There is no need to expand CMov instructions if target has
|
||||
@ -2011,7 +2011,7 @@ LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const {
|
||||
|
||||
// TODO: set SType according to the desired memory barrier behavior.
|
||||
SDValue
|
||||
MipsTargetLowering::LowerMEMBARRIER(SDValue Op, SelectionDAG& DAG) const {
|
||||
MipsTargetLowering::LowerMEMBARRIER(SDValue Op, SelectionDAG &DAG) const {
|
||||
unsigned SType = 0;
|
||||
DebugLoc dl = Op.getDebugLoc();
|
||||
return DAG.getNode(MipsISD::Sync, dl, MVT::Other, Op.getOperand(0),
|
||||
@ -2019,7 +2019,7 @@ MipsTargetLowering::LowerMEMBARRIER(SDValue Op, SelectionDAG& DAG) const {
|
||||
}
|
||||
|
||||
SDValue MipsTargetLowering::LowerATOMIC_FENCE(SDValue Op,
|
||||
SelectionDAG& DAG) const {
|
||||
SelectionDAG &DAG) const {
|
||||
// FIXME: Need pseudo-fence for 'singlethread' fences
|
||||
// FIXME: Set SType for weaker fences where supported/appropriate.
|
||||
unsigned SType = 0;
|
||||
@ -2029,7 +2029,7 @@ SDValue MipsTargetLowering::LowerATOMIC_FENCE(SDValue Op,
|
||||
}
|
||||
|
||||
SDValue MipsTargetLowering::LowerShiftLeftParts(SDValue Op,
|
||||
SelectionDAG& DAG) const {
|
||||
SelectionDAG &DAG) const {
|
||||
DebugLoc DL = Op.getDebugLoc();
|
||||
SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1);
|
||||
SDValue Shamt = Op.getOperand(2);
|
||||
@ -2051,15 +2051,15 @@ SDValue MipsTargetLowering::LowerShiftLeftParts(SDValue Op,
|
||||
SDValue ShiftLeftLo = DAG.getNode(ISD::SHL, DL, MVT::i32, Lo, Shamt);
|
||||
SDValue Cond = DAG.getNode(ISD::AND, DL, MVT::i32, Shamt,
|
||||
DAG.getConstant(0x20, MVT::i32));
|
||||
Lo = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond, DAG.getConstant(0, MVT::i32),
|
||||
ShiftLeftLo);
|
||||
Lo = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond,
|
||||
DAG.getConstant(0, MVT::i32), ShiftLeftLo);
|
||||
Hi = DAG.getNode(ISD::SELECT, DL, MVT::i32, Cond, ShiftLeftLo, Or);
|
||||
|
||||
SDValue Ops[2] = {Lo, Hi};
|
||||
return DAG.getMergeValues(Ops, 2, DL);
|
||||
}
|
||||
|
||||
SDValue MipsTargetLowering::LowerShiftRightParts(SDValue Op, SelectionDAG& DAG,
|
||||
SDValue MipsTargetLowering::LowerShiftRightParts(SDValue Op, SelectionDAG &DAG,
|
||||
bool IsSRA) const {
|
||||
DebugLoc DL = Op.getDebugLoc();
|
||||
SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1);
|
||||
@ -2425,10 +2425,10 @@ static unsigned getNextIntArgReg(unsigned Reg) {
|
||||
// Write ByVal Arg to arg registers and stack.
|
||||
static void
|
||||
WriteByValArg(SDValue& ByValChain, SDValue Chain, DebugLoc dl,
|
||||
SmallVector<std::pair<unsigned, SDValue>, 16>& RegsToPass,
|
||||
SmallVector<SDValue, 8>& MemOpChains, int& LastFI,
|
||||
SmallVector<std::pair<unsigned, SDValue>, 16> &RegsToPass,
|
||||
SmallVector<SDValue, 8> &MemOpChains, int &LastFI,
|
||||
MachineFrameInfo *MFI, SelectionDAG &DAG, SDValue Arg,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy& Flags,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy &Flags,
|
||||
MVT PtrType, bool isLittle) {
|
||||
unsigned LocMemOffset = VA.getLocMemOffset();
|
||||
unsigned Offset = 0;
|
||||
@ -2516,10 +2516,10 @@ WriteByValArg(SDValue& ByValChain, SDValue Chain, DebugLoc dl,
|
||||
// Copy Mips64 byVal arg to registers and stack.
|
||||
void static
|
||||
PassByValArg64(SDValue& ByValChain, SDValue Chain, DebugLoc dl,
|
||||
SmallVector<std::pair<unsigned, SDValue>, 16>& RegsToPass,
|
||||
SmallVector<SDValue, 8>& MemOpChains, int& LastFI,
|
||||
SmallVector<std::pair<unsigned, SDValue>, 16> &RegsToPass,
|
||||
SmallVector<SDValue, 8> &MemOpChains, int &LastFI,
|
||||
MachineFrameInfo *MFI, SelectionDAG &DAG, SDValue Arg,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy& Flags,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy &Flags,
|
||||
EVT PtrTy, bool isLittle) {
|
||||
unsigned ByValSize = Flags.getByValSize();
|
||||
unsigned Alignment = std::min(Flags.getByValAlign(), (unsigned)8);
|
||||
@ -2913,7 +2913,7 @@ MipsTargetLowering::LowerCallResult(SDValue Chain, SDValue InFlag,
|
||||
// Assign locations to each value returned by this call.
|
||||
SmallVector<CCValAssign, 16> RVLocs;
|
||||
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(),
|
||||
getTargetMachine(), RVLocs, *DAG.getContext());
|
||||
getTargetMachine(), RVLocs, *DAG.getContext());
|
||||
|
||||
CCInfo.AnalyzeCallResult(Ins, RetCC_Mips);
|
||||
|
||||
@ -2932,9 +2932,9 @@ MipsTargetLowering::LowerCallResult(SDValue Chain, SDValue InFlag,
|
||||
// Formal Arguments Calling Convention Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
static void ReadByValArg(MachineFunction &MF, SDValue Chain, DebugLoc dl,
|
||||
std::vector<SDValue>& OutChains,
|
||||
std::vector<SDValue> &OutChains,
|
||||
SelectionDAG &DAG, unsigned NumWords, SDValue FIN,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy& Flags,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy &Flags,
|
||||
const Argument *FuncArg) {
|
||||
unsigned LocMem = VA.getLocMemOffset();
|
||||
unsigned FirstWord = LocMem / 4;
|
||||
@ -2959,8 +2959,8 @@ static void ReadByValArg(MachineFunction &MF, SDValue Chain, DebugLoc dl,
|
||||
// Create frame object on stack and copy registers used for byval passing to it.
|
||||
static unsigned
|
||||
CopyMips64ByValRegs(MachineFunction &MF, SDValue Chain, DebugLoc dl,
|
||||
std::vector<SDValue>& OutChains, SelectionDAG &DAG,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy& Flags,
|
||||
std::vector<SDValue> &OutChains, SelectionDAG &DAG,
|
||||
const CCValAssign &VA, const ISD::ArgFlagsTy &Flags,
|
||||
MachineFrameInfo *MFI, bool IsRegLoc,
|
||||
SmallVectorImpl<SDValue> &InVals, MipsFunctionInfo *MipsFI,
|
||||
EVT PtrTy, const Argument *FuncArg) {
|
||||
@ -3207,7 +3207,7 @@ MipsTargetLowering::LowerReturn(SDValue Chain,
|
||||
|
||||
// CCState - Info about the registers and stack slot.
|
||||
CCState CCInfo(CallConv, isVarArg, DAG.getMachineFunction(),
|
||||
getTargetMachine(), RVLocs, *DAG.getContext());
|
||||
getTargetMachine(), RVLocs, *DAG.getContext());
|
||||
|
||||
// Analize return values.
|
||||
CCInfo.AnalyzeReturn(Outs, RetCC_Mips);
|
||||
|
@ -146,7 +146,8 @@ namespace llvm {
|
||||
SDValue LowerMEMBARRIER(SDValue Op, SelectionDAG& DAG) const;
|
||||
SDValue LowerATOMIC_FENCE(SDValue Op, SelectionDAG& DAG) const;
|
||||
SDValue LowerShiftLeftParts(SDValue Op, SelectionDAG& DAG) const;
|
||||
SDValue LowerShiftRightParts(SDValue Op, SelectionDAG& DAG, bool IsSRA) const;
|
||||
SDValue LowerShiftRightParts(SDValue Op, SelectionDAG& DAG,
|
||||
bool IsSRA) const;
|
||||
SDValue LowerLOAD(SDValue Op, SelectionDAG &DAG) const;
|
||||
SDValue LowerSTORE(SDValue Op, SelectionDAG &DAG) const;
|
||||
|
||||
|
@ -330,9 +330,9 @@ unsigned Mips::GetOppositeBranchOpc(unsigned Opc)
|
||||
}
|
||||
}
|
||||
|
||||
static void AnalyzeCondBr(const MachineInstr* Inst, unsigned Opc,
|
||||
static void AnalyzeCondBr(const MachineInstr *Inst, unsigned Opc,
|
||||
MachineBasicBlock *&BB,
|
||||
SmallVectorImpl<MachineOperand>& Cond) {
|
||||
SmallVectorImpl<MachineOperand> &Cond) {
|
||||
assert(GetAnalyzableBrOpc(Opc) && "Not an analyzable branch");
|
||||
int NumOp = Inst->getNumExplicitOperands();
|
||||
|
||||
|
@ -154,8 +154,8 @@ TargetJITInfo::StubLayout MipsJITInfo::getStubLayout() {
|
||||
return Result;
|
||||
}
|
||||
|
||||
void *MipsJITInfo::emitFunctionStub(const Function* F, void *Fn,
|
||||
JITCodeEmitter &JCE) {
|
||||
void *MipsJITInfo::emitFunctionStub(const Function *F, void *Fn,
|
||||
JITCodeEmitter &JCE) {
|
||||
JCE.emitAlignment(4);
|
||||
void *Addr = (void*) (JCE.getCurrentPCValue());
|
||||
if (!sys::Memory::setRangeWritable(Addr, 16))
|
||||
@ -193,7 +193,7 @@ void *MipsJITInfo::emitFunctionStub(const Function* F, void *Fn,
|
||||
/// it must rewrite the code to contain the actual addresses of any
|
||||
/// referenced global symbols.
|
||||
void MipsJITInfo::relocate(void *Function, MachineRelocation *MR,
|
||||
unsigned NumRelocs, unsigned char* GOTBase) {
|
||||
unsigned NumRelocs, unsigned char *GOTBase) {
|
||||
for (unsigned i = 0; i != NumRelocs; ++i, ++MR) {
|
||||
|
||||
void *RelocPos = (char*) Function + MR->getMachineCodeOffset();
|
||||
|
@ -45,8 +45,8 @@ class MipsJITInfo : public TargetJITInfo {
|
||||
/// emitFunctionStub - Use the specified JITCodeEmitter object to emit a
|
||||
/// small native function that simply calls the function at the specified
|
||||
/// address.
|
||||
virtual void *emitFunctionStub(const Function* F, void *Fn,
|
||||
JITCodeEmitter &JCE);
|
||||
virtual void *emitFunctionStub(const Function *F, void *Fn,
|
||||
JITCodeEmitter &JCE);
|
||||
|
||||
/// getLazyResolverFunction - Expose the lazy resolver to the JIT.
|
||||
virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn);
|
||||
@ -55,7 +55,7 @@ class MipsJITInfo : public TargetJITInfo {
|
||||
/// it must rewrite the code to contain the actual addresses of any
|
||||
/// referenced global symbols.
|
||||
virtual void relocate(void *Function, MachineRelocation *MR,
|
||||
unsigned NumRelocs, unsigned char* GOTBase);
|
||||
unsigned NumRelocs, unsigned char *GOTBase);
|
||||
|
||||
/// Initialize - Initialize internal stage for the function being JITted.
|
||||
void Initialize(const MachineFunction &MF, bool isPIC) {
|
||||
|
@ -29,7 +29,7 @@ using namespace llvm;
|
||||
MipsMCInstLower::MipsMCInstLower(MipsAsmPrinter &asmprinter)
|
||||
: AsmPrinter(asmprinter) {}
|
||||
|
||||
void MipsMCInstLower::Initialize(Mangler *M, MCContext* C) {
|
||||
void MipsMCInstLower::Initialize(Mangler *M, MCContext *C) {
|
||||
Mang = M;
|
||||
Ctx = C;
|
||||
}
|
||||
@ -105,14 +105,14 @@ MCOperand MipsMCInstLower::LowerSymbolOperand(const MachineOperand &MO,
|
||||
assert(Offset > 0);
|
||||
|
||||
const MCConstantExpr *OffsetExpr = MCConstantExpr::Create(Offset, *Ctx);
|
||||
const MCBinaryExpr *AddExpr = MCBinaryExpr::CreateAdd(MCSym, OffsetExpr, *Ctx);
|
||||
return MCOperand::CreateExpr(AddExpr);
|
||||
const MCBinaryExpr *Add = MCBinaryExpr::CreateAdd(MCSym, OffsetExpr, *Ctx);
|
||||
return MCOperand::CreateExpr(Add);
|
||||
}
|
||||
|
||||
/*
|
||||
static void CreateMCInst(MCInst& Inst, unsigned Opc, const MCOperand& Opnd0,
|
||||
const MCOperand& Opnd1,
|
||||
const MCOperand& Opnd2 = MCOperand()) {
|
||||
static void CreateMCInst(MCInst& Inst, unsigned Opc, const MCOperand &Opnd0,
|
||||
const MCOperand &Opnd1,
|
||||
const MCOperand &Opnd2 = MCOperand()) {
|
||||
Inst.setOpcode(Opc);
|
||||
Inst.addOperand(Opnd0);
|
||||
Inst.addOperand(Opnd1);
|
||||
@ -121,7 +121,7 @@ static void CreateMCInst(MCInst& Inst, unsigned Opc, const MCOperand& Opnd0,
|
||||
}
|
||||
*/
|
||||
|
||||
MCOperand MipsMCInstLower::LowerOperand(const MachineOperand& MO,
|
||||
MCOperand MipsMCInstLower::LowerOperand(const MachineOperand &MO,
|
||||
unsigned offset) const {
|
||||
MachineOperandType MOTy = MO.getType();
|
||||
|
||||
|
@ -31,7 +31,7 @@ class LLVM_LIBRARY_VISIBILITY MipsMCInstLower {
|
||||
MipsAsmPrinter &AsmPrinter;
|
||||
public:
|
||||
MipsMCInstLower(MipsAsmPrinter &asmprinter);
|
||||
void Initialize(Mangler *mang, MCContext* C);
|
||||
void Initialize(Mangler *mang, MCContext *C);
|
||||
void Lower(const MachineInstr *MI, MCInst &OutMI) const;
|
||||
private:
|
||||
MCOperand LowerSymbolOperand(const MachineOperand &MO,
|
||||
|
@ -55,8 +55,7 @@ unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; }
|
||||
|
||||
/// Mips Callee Saved Registers
|
||||
const uint16_t* MipsRegisterInfo::
|
||||
getCalleeSavedRegs(const MachineFunction *MF) const
|
||||
{
|
||||
getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
if (Subtarget.isSingleFloat())
|
||||
return CSR_SingleFloatOnly_SaveList;
|
||||
else if (!Subtarget.hasMips64())
|
||||
@ -65,12 +64,11 @@ getCalleeSavedRegs(const MachineFunction *MF) const
|
||||
return CSR_N32_SaveList;
|
||||
|
||||
assert(Subtarget.isABI_N64());
|
||||
return CSR_N64_SaveList;
|
||||
return CSR_N64_SaveList;
|
||||
}
|
||||
|
||||
const uint32_t*
|
||||
MipsRegisterInfo::getCallPreservedMask(CallingConv::ID) const
|
||||
{
|
||||
MipsRegisterInfo::getCallPreservedMask(CallingConv::ID) const {
|
||||
if (Subtarget.isSingleFloat())
|
||||
return CSR_SingleFloatOnly_RegMask;
|
||||
else if (!Subtarget.hasMips64())
|
||||
@ -79,7 +77,7 @@ MipsRegisterInfo::getCallPreservedMask(CallingConv::ID) const
|
||||
return CSR_N32_RegMask;
|
||||
|
||||
assert(Subtarget.isABI_N64());
|
||||
return CSR_N64_RegMask;
|
||||
return CSR_N64_RegMask;
|
||||
}
|
||||
|
||||
BitVector MipsRegisterInfo::
|
||||
|
@ -42,7 +42,7 @@ struct MipsRegisterInfo : public MipsGenRegisterInfo {
|
||||
void adjustMipsStackFrame(MachineFunction &MF) const;
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
@ -58,8 +58,8 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
|
||||
|
||||
bool
|
||||
MipsSubtarget::enablePostRAScheduler(CodeGenOpt::Level OptLevel,
|
||||
TargetSubtargetInfo::AntiDepBreakMode& Mode,
|
||||
RegClassVector& CriticalPathRCs) const {
|
||||
TargetSubtargetInfo::AntiDepBreakMode &Mode,
|
||||
RegClassVector &CriticalPathRCs) const {
|
||||
Mode = TargetSubtargetInfo::ANTIDEP_NONE;
|
||||
CriticalPathRCs.clear();
|
||||
CriticalPathRCs.push_back(hasMips64() ?
|
||||
|
@ -69,9 +69,7 @@ namespace llvm {
|
||||
|
||||
// Pass Pipeline Configuration
|
||||
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
|
||||
virtual bool addCodeEmitter(PassManagerBase &PM,
|
||||
JITCodeEmitter &JCE);
|
||||
|
||||
virtual bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &JCE);
|
||||
};
|
||||
|
||||
/// MipsebTargetMachine - Mips32 big endian target machine.
|
||||
|
Loading…
x
Reference in New Issue
Block a user