2017-10-20 05:37:38 +08:00
|
|
|
//===-- RISCVInstrInfo.h - RISCV Instruction Information --------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the RISCV implementation of the TargetInstrInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_RISCV_RISCVINSTRINFO_H
|
|
|
|
#define LLVM_LIB_TARGET_RISCV_RISCVINSTRINFO_H
|
|
|
|
|
|
|
|
#include "RISCVRegisterInfo.h"
|
2017-11-08 09:01:31 +08:00
|
|
|
#include "llvm/CodeGen/TargetInstrInfo.h"
|
2017-10-20 05:37:38 +08:00
|
|
|
|
|
|
|
#define GET_INSTRINFO_HEADER
|
|
|
|
#include "RISCVGenInstrInfo.inc"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class RISCVInstrInfo : public RISCVGenInstrInfo {
|
|
|
|
|
|
|
|
public:
|
|
|
|
RISCVInstrInfo();
|
2017-11-08 20:20:01 +08:00
|
|
|
|
|
|
|
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
|
|
|
|
const DebugLoc &DL, unsigned DstReg, unsigned SrcReg,
|
|
|
|
bool KillSrc) const override;
|
2017-11-08 21:31:40 +08:00
|
|
|
|
|
|
|
void storeRegToStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MBBI, unsigned SrcReg,
|
|
|
|
bool IsKill, int FrameIndex,
|
|
|
|
const TargetRegisterClass *RC,
|
|
|
|
const TargetRegisterInfo *TRI) const override;
|
|
|
|
|
|
|
|
void loadRegFromStackSlot(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MBBI, unsigned DstReg,
|
|
|
|
int FrameIndex, const TargetRegisterClass *RC,
|
|
|
|
const TargetRegisterInfo *TRI) const override;
|
2018-01-11 03:53:46 +08:00
|
|
|
|
|
|
|
// Materializes the given int32 Val into DstReg.
|
|
|
|
void movImm32(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
|
|
|
|
const DebugLoc &DL, unsigned DstReg, uint64_t Val,
|
|
|
|
MachineInstr::MIFlag Flag = MachineInstr::NoFlags) const;
|
2017-10-20 05:37:38 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|