aboutsummaryrefslogtreecommitdiff
path: root/c_emulator/riscv_sim.c
diff options
context:
space:
mode:
authorIbrahim Abu Kharmeh <abukharmeh@gmail.com>2021-11-17 15:41:15 +0000
committerGitHub <noreply@github.com>2021-11-17 15:41:15 +0000
commitc5e62ea4b3d481fcd491b22b317cc319b089f05d (patch)
tree5ddc23d7d67d434cd54b59dd8e3ae207f10fb430 /c_emulator/riscv_sim.c
parent01720566318e292df12693bba1fe5f09ea0857df (diff)
downloadsail-riscv-c5e62ea4b3d481fcd491b22b317cc319b089f05d.zip
sail-riscv-c5e62ea4b3d481fcd491b22b317cc319b089f05d.tar.gz
sail-riscv-c5e62ea4b3d481fcd491b22b317cc319b089f05d.tar.bz2
Initial introduction of zfinx (#75)
* Adds Zfinx enable flag * Hardwire misa.{f,d} and mstats.FS to 0 * Moving nan boxing functions to fdext_reg * Swaps register names for floating point instructions Adds new mapping to swap register names, and use it in all assembly clauses * Disable Floating point loads, stores and moves * Add X_or_F_s and X_or_F_d functions, and use them to access all registers for floating points Changes register accessed for floating point instructions and modify nan boxing functions for zfinx * Formatting Remove couple of misplaced whitespace, unnecessary parens * Fix inconsistent indentation in insts_dext file * Fix spacing in fdext_regs * Remove redundant comparasion with true/ false * Constistant tuples spacing and removes couple of unnecessary parens. * Consistent functions declaration & calls spacing and removes couple of unnecessary parens. * Consistent spacing and removes couple of unnecessary comparasion with true/false * Make spacing consistent * Remove checks from execution stage * Add checks to encdec stage
Diffstat (limited to 'c_emulator/riscv_sim.c')
-rw-r--r--c_emulator/riscv_sim.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/c_emulator/riscv_sim.c b/c_emulator/riscv_sim.c
index a1e4075..c4a13f4 100644
--- a/c_emulator/riscv_sim.c
+++ b/c_emulator/riscv_sim.c
@@ -127,6 +127,7 @@ static struct option options[] = {
{"trace", optional_argument, 0, 'v'},
{"no-trace", optional_argument, 0, 'V'},
{"inst-limit", required_argument, 0, 'l'},
+ {"enable-zfinx", no_argument, 0, 'x'},
#ifdef SAILCOV
{"sailcov-file", required_argument, 0, 'c'},
#endif
@@ -236,6 +237,7 @@ char *process_args(int argc, char **argv)
"V::"
"v::"
"l:"
+ "x"
#ifdef SAILCOV
"c:"
#endif
@@ -325,6 +327,10 @@ char *process_args(int argc, char **argv)
case 'l':
insn_limit = atoi(optarg);
break;
+ case 'x':
+ fprintf(stderr, "enabling Zfinx support.\n");
+ rv_enable_zfinx = true;
+ break;
#ifdef SAILCOV
case 'c':
sailcov_file = strdup(optarg);