aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/opcode/riscv.h69
2 files changed, 4 insertions, 69 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 6c3a835..0f4936e 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+2021-02-18 Nelson Chu <nelson.chu@sifive.com>
+
+ * opcode/riscv.h: Moved stuff and make the file tidy.
+
2021-02-15 Andreas Krebbel <krebbel@linux.ibm.com>
* opcode/s390.h (enum s390_opcode_cpu_val): Add
diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h
index 5432e6c..9372852 100644
--- a/include/opcode/riscv.h
+++ b/include/opcode/riscv.h
@@ -349,71 +349,6 @@ struct riscv_opcode
unsigned long pinfo;
};
-/* The current supported ISA spec versions. */
-enum riscv_isa_spec_class
-{
- ISA_SPEC_CLASS_NONE,
-
- ISA_SPEC_CLASS_2P2,
- ISA_SPEC_CLASS_20190608,
- ISA_SPEC_CLASS_20191213,
- ISA_SPEC_CLASS_DRAFT
-};
-
-#define RISCV_UNKNOWN_VERSION -1
-
-/* This structure holds version information for specific ISA. */
-struct riscv_ext_version
-{
- const char *name;
- enum riscv_isa_spec_class isa_spec_class;
- int major_version;
- int minor_version;
-};
-
-/* All RISC-V CSR belong to one of these classes. */
-enum riscv_csr_class
-{
- CSR_CLASS_NONE,
-
- CSR_CLASS_I,
- CSR_CLASS_I_32, /* RV32 only. */
- CSR_CLASS_F, /* F extension only. */
- CSR_CLASS_DEBUG /* Debug CSR. */
-};
-
-/* The current supported privilege spec versions. */
-enum riscv_priv_spec_class
-{
- PRIV_SPEC_CLASS_NONE,
-
- PRIV_SPEC_CLASS_1P9P1,
- PRIV_SPEC_CLASS_1P10,
- PRIV_SPEC_CLASS_1P11,
- PRIV_SPEC_CLASS_DRAFT
-};
-
-/* This structure holds all restricted conditions for a CSR. */
-struct riscv_csr_extra
-{
- /* Class to which this CSR belongs. Used to decide whether or
- not this CSR is legal in the current -march context. */
- enum riscv_csr_class csr_class;
-
- /* CSR may have differnet numbers in the previous priv spec. */
- unsigned address;
-
- /* Record the CSR is defined/valid in which versions. */
- enum riscv_priv_spec_class define_version;
-
- /* Record the CSR is aborted/invalid from which versions. If it isn't
- aborted in the current version, then it should be CSR_CLASS_VDRAFT. */
- enum riscv_priv_spec_class abort_version;
-
- /* The CSR may have more than one setting. */
- struct riscv_csr_extra *next;
-};
-
/* Instruction is a simple alias (e.g. "mv" for "addi"). */
#define INSN_ALIAS 0x00000001
@@ -488,9 +423,5 @@ extern const char * const riscv_fpr_names_abi[NFPR];
extern const struct riscv_opcode riscv_opcodes[];
extern const struct riscv_opcode riscv_insn_types[];
-extern const struct riscv_ext_version riscv_ext_version_table[];
-
-extern int
-riscv_get_isa_spec_class (const char *, enum riscv_isa_spec_class *);
#endif /* _RISCV_H_ */