remove old rvc directory (#61)
authorColin Schmidt <colins@berkeley.edu>
Tue, 16 Aug 2016 18:42:16 +0000 (11:42 -0700)
committerAndrew Waterman <waterman@eecs.berkeley.edu>
Tue, 16 Aug 2016 18:42:16 +0000 (11:42 -0700)
36 files changed:
rvc/README [deleted file]
rvc/insns/c_add.h [deleted file]
rvc/insns/c_add3.h [deleted file]
rvc/insns/c_addi.h [deleted file]
rvc/insns/c_addiw.h [deleted file]
rvc/insns/c_and3.h [deleted file]
rvc/insns/c_beq.h [deleted file]
rvc/insns/c_bne.h [deleted file]
rvc/insns/c_fld.h [deleted file]
rvc/insns/c_flw.h [deleted file]
rvc/insns/c_fsd.h [deleted file]
rvc/insns/c_fsw.h [deleted file]
rvc/insns/c_j.h [deleted file]
rvc/insns/c_ld.h [deleted file]
rvc/insns/c_ld0.h [deleted file]
rvc/insns/c_ldsp.h [deleted file]
rvc/insns/c_li.h [deleted file]
rvc/insns/c_lw.h [deleted file]
rvc/insns/c_lw0.h [deleted file]
rvc/insns/c_lwsp.h [deleted file]
rvc/insns/c_move.h [deleted file]
rvc/insns/c_or3.h [deleted file]
rvc/insns/c_sd.h [deleted file]
rvc/insns/c_sdsp.h [deleted file]
rvc/insns/c_slli.h [deleted file]
rvc/insns/c_slli32.h [deleted file]
rvc/insns/c_slliw.h [deleted file]
rvc/insns/c_srai.h [deleted file]
rvc/insns/c_srai32.h [deleted file]
rvc/insns/c_srli.h [deleted file]
rvc/insns/c_srli32.h [deleted file]
rvc/insns/c_sub.h [deleted file]
rvc/insns/c_sub3.h [deleted file]
rvc/insns/c_sw.h [deleted file]
rvc/insns/c_swsp.h [deleted file]
rvc/rvc.h [deleted file]

diff --git a/rvc/README b/rvc/README
deleted file mode 100644 (file)
index feabcd3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-This directory contains work in progress on RISC-V Compressed (RVC), a 16-bit
-instruction encoding for reduced code size.  It is not currently usable.
diff --git a/rvc/insns/c_add.h b/rvc/insns/c_add.h
deleted file mode 100644 (file)
index 2170d69..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRD = CRS1 + CRS2;
diff --git a/rvc/insns/c_add3.h b/rvc/insns/c_add3.h
deleted file mode 100644 (file)
index 914c85d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRDS = CRS1S + CRS2BS;
diff --git a/rvc/insns/c_addi.h b/rvc/insns/c_addi.h
deleted file mode 100644 (file)
index 448e31a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-require_rvc;
-if(CRD_REGNUM == 0)
-{
-  reg_t temp = CRS1;
-  if(CIMM6 & 0x20)
-    RA = npc;
-  set_pc(temp);
-}
-else
-  CRD = sext_xprlen(CRS2 + CIMM6);
diff --git a/rvc/insns/c_addiw.h b/rvc/insns/c_addiw.h
deleted file mode 100644 (file)
index 6a1e0a3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRD = sext32(CRS2 + CIMM6);
diff --git a/rvc/insns/c_and3.h b/rvc/insns/c_and3.h
deleted file mode 100644 (file)
index b506d6a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRDS = CRS1S & CRS2BS;
diff --git a/rvc/insns/c_beq.h b/rvc/insns/c_beq.h
deleted file mode 100644 (file)
index 031d96d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-if(cmp_trunc(CRS1S) == cmp_trunc(CRS2S))
-  set_pc(CBRANCH_TARGET);
diff --git a/rvc/insns/c_bne.h b/rvc/insns/c_bne.h
deleted file mode 100644 (file)
index caf9229..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-if(cmp_trunc(CRS1S) != cmp_trunc(CRS2S))
-  set_pc(CBRANCH_TARGET);
diff --git a/rvc/insns/c_fld.h b/rvc/insns/c_fld.h
deleted file mode 100644 (file)
index a726039..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_fp;
-FCRDS = mmu.load_int64(CRS1S+CIMM5*8);
diff --git a/rvc/insns/c_flw.h b/rvc/insns/c_flw.h
deleted file mode 100644 (file)
index cdb7221..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_fp;
-FCRDS = mmu.load_int32(CRS1S+CIMM5*4);
diff --git a/rvc/insns/c_fsd.h b/rvc/insns/c_fsd.h
deleted file mode 100644 (file)
index 20814fd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_fp;
-mmu.store_uint64(CRS1S+CIMM5*8, FCRS2S);
diff --git a/rvc/insns/c_fsw.h b/rvc/insns/c_fsw.h
deleted file mode 100644 (file)
index 1d21629..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_fp;
-mmu.store_uint32(CRS1S+CIMM5*4, FCRS2S);
diff --git a/rvc/insns/c_j.h b/rvc/insns/c_j.h
deleted file mode 100644 (file)
index 5ba9c73..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-set_pc(CJUMP_TARGET);
diff --git a/rvc/insns/c_ld.h b/rvc/insns/c_ld.h
deleted file mode 100644 (file)
index f9c07af..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRDS = mmu.load_int64(CRS1S+CIMM5*8);
diff --git a/rvc/insns/c_ld0.h b/rvc/insns/c_ld0.h
deleted file mode 100644 (file)
index f51a966..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRD = mmu.load_int64(CRS1);
diff --git a/rvc/insns/c_ldsp.h b/rvc/insns/c_ldsp.h
deleted file mode 100644 (file)
index 1fbd9bd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRD = mmu.load_int64(XPR[30]+CIMM6*8);
diff --git a/rvc/insns/c_li.h b/rvc/insns/c_li.h
deleted file mode 100644 (file)
index e65614e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRD = CIMM6;
diff --git a/rvc/insns/c_lw.h b/rvc/insns/c_lw.h
deleted file mode 100644 (file)
index 4796ab8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRDS = mmu.load_int32(CRS1S+CIMM5*4);
diff --git a/rvc/insns/c_lw0.h b/rvc/insns/c_lw0.h
deleted file mode 100644 (file)
index d263a80..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRD = mmu.load_int32(CRS1);
diff --git a/rvc/insns/c_lwsp.h b/rvc/insns/c_lwsp.h
deleted file mode 100644 (file)
index 318342a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRD = mmu.load_int32(XPR[30]+CIMM6*4);
diff --git a/rvc/insns/c_move.h b/rvc/insns/c_move.h
deleted file mode 100644 (file)
index b0aef33..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRD = CRS1;
diff --git a/rvc/insns/c_or3.h b/rvc/insns/c_or3.h
deleted file mode 100644 (file)
index 143e2ae..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRDS = CRS1S | CRS2BS;
diff --git a/rvc/insns/c_sd.h b/rvc/insns/c_sd.h
deleted file mode 100644 (file)
index b2eb456..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-mmu.store_uint64(CRS1S+CIMM5*8, CRS2S);
diff --git a/rvc/insns/c_sdsp.h b/rvc/insns/c_sdsp.h
deleted file mode 100644 (file)
index ca97d51..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-mmu.store_uint64(XPR[30]+CIMM6*8, CRS2);
diff --git a/rvc/insns/c_slli.h b/rvc/insns/c_slli.h
deleted file mode 100644 (file)
index 5026767..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_rvc;
-if(xpr64)
-  CRDS = CRDS << CIMM5U;
-else
-  CRDS = sext32(CRDS << CIMM5U);
diff --git a/rvc/insns/c_slli32.h b/rvc/insns/c_slli32.h
deleted file mode 100644 (file)
index 1e3e958..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRDS = CRDS << (32+CIMM5U);
diff --git a/rvc/insns/c_slliw.h b/rvc/insns/c_slliw.h
deleted file mode 100644 (file)
index 9e428f5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRDS = sext32(CRDS << CIMM5U);
diff --git a/rvc/insns/c_srai.h b/rvc/insns/c_srai.h
deleted file mode 100644 (file)
index aa33424..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_rvc;
-if(xpr64)
-  CRDS = sreg_t(CRDS) >> CIMM5U;
-else
-  CRDS = sext32(int32_t(CRDS) >> CIMM5U);
diff --git a/rvc/insns/c_srai32.h b/rvc/insns/c_srai32.h
deleted file mode 100644 (file)
index ca7b024..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRDS = sreg_t(CRDS) >> (32+CIMM5U);
diff --git a/rvc/insns/c_srli.h b/rvc/insns/c_srli.h
deleted file mode 100644 (file)
index 56e0681..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require_rvc;
-if(xpr64)
-  CRDS = CRDS >> CIMM5U;
-else
-  CRDS = sext32(uint32_t(CRDS) >> CIMM5U);
diff --git a/rvc/insns/c_srli32.h b/rvc/insns/c_srli32.h
deleted file mode 100644 (file)
index 4f5b8ea..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require_rvc;
-require_xpr64;
-CRDS = CRDS >> (32+CIMM5U);
diff --git a/rvc/insns/c_sub.h b/rvc/insns/c_sub.h
deleted file mode 100644 (file)
index 9fd8932..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRD = CRS1 - CRS2;
diff --git a/rvc/insns/c_sub3.h b/rvc/insns/c_sub3.h
deleted file mode 100644 (file)
index 53afc84..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-CRDS = CRS1S - CRS2BS;
diff --git a/rvc/insns/c_sw.h b/rvc/insns/c_sw.h
deleted file mode 100644 (file)
index f604adf..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-mmu.store_uint32(CRS1S+CIMM5*4, CRS2S);
diff --git a/rvc/insns/c_swsp.h b/rvc/insns/c_swsp.h
deleted file mode 100644 (file)
index 0508f12..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require_rvc;
-mmu.store_uint32(XPR[30]+CIMM6*4, CRS2);
diff --git a/rvc/rvc.h b/rvc/rvc.h
deleted file mode 100644 (file)
index 997ffc6..0000000
--- a/rvc/rvc.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _RVC_H
-#define _RVC_H
-
-#define INSN_IS_RVC(x) (((x) & 0x3) < 0x3)
-#define insn_length(x) (INSN_IS_RVC(x) ? 2 : 4)
-#define require_rvc if(!(sr & SR_EC)) throw_illegal_instruction
-
-#define CRD_REGNUM ((insn.bits >> 5) & 0x1f)
-#define CRD XPR.write_port(CRD_REGNUM)
-#define CRS1 XPR[(insn.bits >> 10) & 0x1f]
-#define CRS2 XPR[(insn.bits >> 5) & 0x1f]
-#define CIMM6 ((int32_t)((insn.bits >> 10) & 0x3f) << 26 >> 26)
-#define CIMM5U ((insn.bits >> 5) & 0x1f)
-#define CIMM5 ((int32_t)CIMM5U << 27 >> 27)
-#define CIMM10 ((int32_t)((insn.bits >> 5) & 0x3ff) << 22 >> 22)
-#define CBRANCH_TARGET (pc + (CIMM5 << BRANCH_ALIGN_BITS))
-#define CJUMP_TARGET (pc + (CIMM10 << JUMP_ALIGN_BITS))
-
-static const int rvc_rs1_regmap[8] = { 20, 21, 2, 3, 4, 5, 6, 7 };
-#define rvc_rd_regmap rvc_rs1_regmap
-#define rvc_rs2b_regmap rvc_rs1_regmap
-static const int rvc_rs2_regmap[8] = { 20, 21, 2, 3, 4, 5, 6, 0 };
-#define CRDS XPR.write_port(rvc_rd_regmap[(insn.bits >> 13) & 0x7])
-#define FCRDS FPR.write_port(rvc_rd_regmap[(insn.bits >> 13) & 0x7])
-#define CRS1S XPR[rvc_rs1_regmap[(insn.bits >> 10) & 0x7]]
-#define CRS2S XPR[rvc_rs2_regmap[(insn.bits >> 13) & 0x7]]
-#define CRS2BS XPR[rvc_rs2b_regmap[(insn.bits >> 5) & 0x7]]
-#define FCRS2S FPR[rvc_rs2_regmap[(insn.bits >> 13) & 0x7]]
-
-#endif