#include "Mips16ISelLowering.h"
#include "MCTargetDesc/MipsBaseInfo.h"
#include "Mips16HardFloatInfo.h"
#include "MipsMachineFunction.h"
#include "MipsRegisterInfo.h"
#include "MipsTargetMachine.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/Support/CommandLine.h"
usingnamespacellvm;
#define DEBUG_TYPE …
static cl::opt<bool> DontExpandCondPseudos16(
"mips16-dont-expand-cond-pseudo",
cl::init(false),
cl::desc("Don't expand conditional move related "
"pseudos for Mips 16"),
cl::Hidden);
namespace {
struct Mips16Libcall { … };
struct Mips16IntrinsicHelperType{ … };
}
static const Mips16Libcall HardFloatLibCalls[] = …;
static const Mips16IntrinsicHelperType Mips16IntrinsicHelper[] = …;
Mips16TargetLowering::Mips16TargetLowering(const MipsTargetMachine &TM,
const MipsSubtarget &STI)
: … { … }
const MipsTargetLowering *
llvm::createMips16TargetLowering(const MipsTargetMachine &TM,
const MipsSubtarget &STI) { … }
bool Mips16TargetLowering::allowsMisalignedMemoryAccesses(
EVT VT, unsigned, Align, MachineMemOperand::Flags, unsigned *Fast) const { … }
MachineBasicBlock *
Mips16TargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
MachineBasicBlock *BB) const { … }
bool Mips16TargetLowering::isEligibleForTailCallOptimization(
const CCState &CCInfo, unsigned NextStackOffset,
const MipsFunctionInfo &FI) const { … }
void Mips16TargetLowering::setMips16HardFloatLibCalls() { … }
unsigned int Mips16TargetLowering::getMips16HelperFunctionStubNumber
(ArgListTy &Args) const { … }
#define P_ …
#define MAX_STUB_NUMBER …
#define T1 …
#define T …
#define P …
static char const * vMips16Helper[MAX_STUB_NUMBER+1] = …;
#undef P
#define P …
static char const * sfMips16Helper[MAX_STUB_NUMBER+1] = …;
#undef P
#define P …
static char const * dfMips16Helper[MAX_STUB_NUMBER+1] = …;
#undef P
#define P …
static char const * scMips16Helper[MAX_STUB_NUMBER+1] = …;
#undef P
#define P …
static char const * dcMips16Helper[MAX_STUB_NUMBER+1] = …;
#undef P
#undef P_
const char* Mips16TargetLowering::
getMips16HelperFunction
(Type* RetTy, ArgListTy &Args, bool &needHelper) const { … }
void Mips16TargetLowering::
getOpndList(SmallVectorImpl<SDValue> &Ops,
std::deque< std::pair<unsigned, SDValue> > &RegsToPass,
bool IsPICCall, bool GlobalOrExternal, bool InternalLinkage,
bool IsCallReloc, CallLoweringInfo &CLI, SDValue Callee,
SDValue Chain) const { … }
MachineBasicBlock *
Mips16TargetLowering::emitSel16(unsigned Opc, MachineInstr &MI,
MachineBasicBlock *BB) const { … }
MachineBasicBlock *
Mips16TargetLowering::emitSelT16(unsigned Opc1, unsigned Opc2, MachineInstr &MI,
MachineBasicBlock *BB) const { … }
MachineBasicBlock *
Mips16TargetLowering::emitSeliT16(unsigned Opc1, unsigned Opc2,
MachineInstr &MI,
MachineBasicBlock *BB) const { … }
MachineBasicBlock *
Mips16TargetLowering::emitFEXT_T8I816_ins(unsigned BtOpc, unsigned CmpOpc,
MachineInstr &MI,
MachineBasicBlock *BB) const { … }
MachineBasicBlock *Mips16TargetLowering::emitFEXT_T8I8I16_ins(
unsigned BtOpc, unsigned CmpiOpc, unsigned CmpiXOpc, bool ImmSigned,
MachineInstr &MI, MachineBasicBlock *BB) const { … }
static unsigned Mips16WhichOp8uOr16simm
(unsigned shortOp, unsigned longOp, int64_t Imm) { … }
MachineBasicBlock *
Mips16TargetLowering::emitFEXT_CCRX16_ins(unsigned SltOpc, MachineInstr &MI,
MachineBasicBlock *BB) const { … }
MachineBasicBlock *
Mips16TargetLowering::emitFEXT_CCRXI16_ins(unsigned SltiOpc, unsigned SltiXOpc,
MachineInstr &MI,
MachineBasicBlock *BB) const { … }