Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Add support for all RV32I instructions
This patch supports all RV32I instructions as described in the RISC-V manual. A future patch will add support for pseudoinstructions and other instruction expansions (e.g. 0-arg fence -> fence iorw, iorw). Differential Revision: https://reviews.llvm.org/D23566 llvm-svn: 313485
- Loading branch information
Showing
8 changed files
with
575 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//===-- RISCVBaseInfo.h - Top level definitions for RISCV MC ----*- 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 small standalone enum definitions for the RISCV target | ||
// useful for the compiler back-end and the MC libraries. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#ifndef LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H | ||
#define LLVM_LIB_TARGET_RISCV_MCTARGETDESC_RISCVBASEINFO_H | ||
|
||
#include "RISCVMCTargetDesc.h" | ||
|
||
namespace llvm { | ||
|
||
// RISCVII - This namespace holds all of the target specific flags that | ||
// instruction info tracks. All definitions must match RISCVInstrFormats.td. | ||
namespace RISCVII { | ||
enum { | ||
InstFormatPseudo = 0, | ||
InstFormatR = 1, | ||
InstFormatI = 2, | ||
InstFormatS = 3, | ||
InstFormatSB = 4, | ||
InstFormatU = 5, | ||
InstFormatOther = 6, | ||
|
||
InstFormatMask = 15 | ||
}; | ||
enum { | ||
MO_None, | ||
MO_LO, | ||
MO_HI, | ||
MO_PCREL_HI, | ||
}; | ||
} // namespace RISCVII | ||
|
||
// Describes the predecessor/successor bits used in the FENCE instruction. | ||
namespace RISCVFenceField { | ||
enum FenceField { | ||
I = 8, | ||
O = 4, | ||
R = 2, | ||
W = 1 | ||
}; | ||
} | ||
} // namespace llvm | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.