diff options
author | James Lemke <jlemke@cygnus> | 1998-03-31 21:46:31 +0000 |
---|---|---|
committer | James Lemke <jlemke@cygnus> | 1998-03-31 21:46:31 +0000 |
commit | 1ff39ecb10ddeb072a4cd38bb79f42c6fd178e2a (patch) | |
tree | ae6a37f6f45501c813c56ab33a9633b2bbe26310 /sim/mips | |
parent | d4006c819ae10c5cd00abb1f7437ded794f7473b (diff) | |
download | gdb-1ff39ecb10ddeb072a4cd38bb79f42c6fd178e2a.zip gdb-1ff39ecb10ddeb072a4cd38bb79f42c6fd178e2a.tar.gz gdb-1ff39ecb10ddeb072a4cd38bb79f42c6fd178e2a.tar.bz2 |
* sky-dma.c: Clarify text in warning msg.
* interp.c: Add global option "float-type".
* sky-vu.h: Add SIM_DESC sd; to VectorUnitState for accessing
global options.
Diffstat (limited to 'sim/mips')
-rw-r--r-- | sim/mips/interp.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c index 6140938..e07488f 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -177,8 +177,13 @@ static void open_trace PARAMS((SIM_DESC sd)); static DECLARE_OPTION_HANDLER (mips_option_handler); -#define OPTION_DINERO_TRACE 200 -#define OPTION_DINERO_FILE 201 +enum { + OPTION_DINERO_TRACE = OPTION_START, + OPTION_DINERO_FILE +/* start-sanitize-sky */ + ,OPTION_FLOAT_TYPE +/* end-sanitize-sky */ +}; static SIM_RC mips_option_handler (sd, cpu, opt, arg, is_command) @@ -212,7 +217,7 @@ mips_option_handler (sd, cpu, opt, arg, is_command) STATE &= ~simTRACE; else { - fprintf (stderr, "Unreconized dinero-trace option `%s'\n", arg); + fprintf (stderr, "Unrecognized dinero-trace option `%s'\n", arg); return SIM_RC_FAIL; } } @@ -243,6 +248,20 @@ Re-compile simulator with \"-DTRACE\" to enable this option.\n"); #endif /* TRACE */ return SIM_RC_OK; +/* start-sanitize-sky */ + case OPTION_FLOAT_TYPE: + /* Use host (fast) or target (accurate) floating point implementation. */ + if (arg && strcmp (arg, "host") == 0) + STATE_FP_TYPE_OPT (sd) &= ~STATE_FP_TYPE_OPT_TARGET; + else if (arg && strcmp (arg, "target") == 0) + STATE_FP_TYPE_OPT (sd) |= STATE_FP_TYPE_OPT_TARGET; + else + { + fprintf (stderr, "Unrecognized float-type option `%s'\n", arg); + return SIM_RC_FAIL; + } + return SIM_RC_OK; +/* end-sanitize-sky */ } return SIM_RC_OK; @@ -256,6 +275,11 @@ static const OPTION mips_options[] = { {"dinero-file", required_argument, NULL, OPTION_DINERO_FILE}, '\0', "FILE", "Write dinero trace to FILE", mips_option_handler }, +/* start-sanitize-sky */ + { {"float-type", required_argument, NULL, OPTION_FLOAT_TYPE}, + '\0', "host|target", "Use host (fast) or target (accurate) floating point", + mips_option_handler }, +/* end-sanitize-sky */ { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } }; |