mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
2f935bc924
Summary: This commit enables some of the arithmetic instructions for Nios2 ISA (for both R1 and R2 revisions), implements facilities required to emit those instructions and provides LIT tests for added instructions. Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D41236 Author: belickim <mateusz.belicki@intel.com> llvm-svn: 322069
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
//===-- Nios2InstrInfo.h - Nios2 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 Nios2 implementation of the TargetInstrInfo class.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H
|
|
#define LLVM_LIB_TARGET_NIOS2_NIOS2INSTRINFO_H
|
|
|
|
#include "Nios2RegisterInfo.h"
|
|
#include "llvm/CodeGen/TargetInstrInfo.h"
|
|
|
|
#define GET_INSTRINFO_HEADER
|
|
#include "Nios2GenInstrInfo.inc"
|
|
|
|
namespace llvm {
|
|
|
|
class Nios2Subtarget;
|
|
|
|
class Nios2InstrInfo : public Nios2GenInstrInfo {
|
|
const Nios2RegisterInfo RI;
|
|
const Nios2Subtarget &Subtarget;
|
|
virtual void anchor();
|
|
|
|
public:
|
|
explicit Nios2InstrInfo(Nios2Subtarget &ST);
|
|
|
|
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
|
|
/// such, whenever a client has an instance of instruction info, it should
|
|
/// always be able to get register info as well (through this method).
|
|
///
|
|
const Nios2RegisterInfo &getRegisterInfo() const { return RI; };
|
|
|
|
bool expandPostRAPseudo(MachineInstr &MI) const override;
|
|
|
|
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
|
|
const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
|
|
bool KillSrc) const override;
|
|
};
|
|
} // namespace llvm
|
|
|
|
#endif
|