diff options
author | Dave Brolley <brolley@redhat.com> | 2000-03-30 20:21:37 +0000 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2000-03-30 20:21:37 +0000 |
commit | f8603f2f73616545002753298677e5639227a000 (patch) | |
tree | 347a0b49b3ce9e2b6ddfc3f27a611390b7c9e319 /sim/common | |
parent | 8310b29b55fa6a6d33400670331d3e6506773293 (diff) | |
download | gdb-f8603f2f73616545002753298677e5639227a000.zip gdb-f8603f2f73616545002753298677e5639227a000.tar.gz gdb-f8603f2f73616545002753298677e5639227a000.tar.bz2 |
2000-03-23 Dave Brolley <brolley@redhat.com>
* cgen-fpu.h: Rename extsfdf to fextsfdf. Rename truncdfsf to
ftruncdfsf.
* cgen-accfp.c (fextsfdf): New function.
(ftruncdfsf): New function.
(cgen_init_accurate_fpu): Initialize fextsfdf and ftruncdfsf.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 8 | ||||
-rw-r--r-- | sim/common/cgen-accfp.c | 26 | ||||
-rw-r--r-- | sim/common/cgen-fpu.h | 4 |
3 files changed, 36 insertions, 2 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 47e80ea..04ab3ae 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,11 @@ +2000-03-23 Dave Brolley <brolley@redhat.com> + + * cgen-fpu.h: Rename extsfdf to fextsfdf. Rename truncdfsf to + ftruncdfsf. + * cgen-accfp.c (fextsfdf): New function. + (ftruncdfsf): New function. + (cgen_init_accurate_fpu): Initialize fextsfdf and ftruncdfsf. + 2000-03-13 Jeff Johnston <jjohnstn@cygnus.com> * cgen-ops.h: Added TRUNCSISI. diff --git a/sim/common/cgen-accfp.c b/sim/common/cgen-accfp.c index e917522..929dd22 100644 --- a/sim/common/cgen-accfp.c +++ b/sim/common/cgen-accfp.c @@ -284,6 +284,30 @@ gesf (CGEN_FPU* fpu, SF x, SF y) return sim_fpu_is_ge (&op1, &op2); } +static DF +fextsfdf (CGEN_FPU* fpu, SF x) +{ + sim_fpu op1; + unsigned64 res; + + sim_fpu_32to (&op1, x); + sim_fpu_to64 (&res, &op1); + + return res; +} + +static SF +ftruncdfsf (CGEN_FPU* fpu, DF x) +{ + sim_fpu op1; + unsigned32 res; + + sim_fpu_64to (&op1, x); + sim_fpu_to32 (&res, &op1); + + return res; +} + static SF floatsisf (CGEN_FPU* fpu, SI x) { @@ -671,6 +695,8 @@ cgen_init_accurate_fpu (SIM_CPU* cpu, CGEN_FPU* fpu, CGEN_FPU_ERROR_FN* error) o->ledf = ledf; o->gtdf = gtdf; o->gedf = gedf; + o->fextsfdf = fextsfdf; + o->ftruncdfsf = ftruncdfsf; o->floatsisf = floatsisf; o->floatsidf = floatsidf; o->ufloatsisf = ufloatsisf; diff --git a/sim/common/cgen-fpu.h b/sim/common/cgen-fpu.h index bb82a8c..bc3364e 100644 --- a/sim/common/cgen-fpu.h +++ b/sim/common/cgen-fpu.h @@ -100,8 +100,8 @@ struct cgen_fp_ops { /* SF/DF conversion ops */ - DF (*extsfdf) (CGEN_FPU*, SF); - SF (*truncdfsf) (CGEN_FPU*, DF); + DF (*fextsfdf) (CGEN_FPU*, SF); + SF (*ftruncdfsf) (CGEN_FPU*, DF); SF (*floatsisf) (CGEN_FPU*, SI); SF (*floatdisf) (CGEN_FPU*, DI); |