From 07b95864f35f19636e2a95eaf3083a8b18ac7cda Mon Sep 17 00:00:00 2001 From: Peter Gavin Date: Sat, 9 Dec 2017 05:57:25 +0900 Subject: sim: cgen: add remainder functions (needed for OR1K lf.rem.[sd]) * sim/common/ChangeLog: 2017-12-12 Peter Gavin Stafford Horne * cgen-accfp.c (remsf, remdf): New function. (cgen_init_accurate_fpu): Add remsf and remdf. * cgen-fpu.h (cgen_fp_ops): Add remsf, remdf, remxf and remtf. * sim-fpu.c (sim_fpu_rem): New function. * sim-fpu.h (sim_fpu_status_invalid_irx): New enum. (sim_fpu_rem): New function. (sim_fpu_print_status): Add case for sim_fpu_status_invalid_irx. --- sim/common/cgen-fpu.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sim/common/cgen-fpu.h') diff --git a/sim/common/cgen-fpu.h b/sim/common/cgen-fpu.h index 134b4d0..5f9b55d 100644 --- a/sim/common/cgen-fpu.h +++ b/sim/common/cgen-fpu.h @@ -69,6 +69,7 @@ struct cgen_fp_ops { SF (*subsf) (CGEN_FPU*, SF, SF); SF (*mulsf) (CGEN_FPU*, SF, SF); SF (*divsf) (CGEN_FPU*, SF, SF); + SF (*remsf) (CGEN_FPU*, SF, SF); SF (*negsf) (CGEN_FPU*, SF); SF (*abssf) (CGEN_FPU*, SF); SF (*sqrtsf) (CGEN_FPU*, SF); @@ -93,6 +94,7 @@ struct cgen_fp_ops { DF (*subdf) (CGEN_FPU*, DF, DF); DF (*muldf) (CGEN_FPU*, DF, DF); DF (*divdf) (CGEN_FPU*, DF, DF); + DF (*remdf) (CGEN_FPU*, DF, DF); DF (*negdf) (CGEN_FPU*, DF); DF (*absdf) (CGEN_FPU*, DF); DF (*sqrtdf) (CGEN_FPU*, DF); @@ -142,6 +144,7 @@ struct cgen_fp_ops { XF (*subxf) (CGEN_FPU*, XF, XF); XF (*mulxf) (CGEN_FPU*, XF, XF); XF (*divxf) (CGEN_FPU*, XF, XF); + XF (*remxf) (CGEN_FPU*, XF, XF); XF (*negxf) (CGEN_FPU*, XF); XF (*absxf) (CGEN_FPU*, XF); XF (*sqrtxf) (CGEN_FPU*, XF); @@ -180,6 +183,7 @@ struct cgen_fp_ops { TF (*subtf) (CGEN_FPU*, TF, TF); TF (*multf) (CGEN_FPU*, TF, TF); TF (*divtf) (CGEN_FPU*, TF, TF); + TF (*remtf) (CGEN_FPU*, TF, TF); TF (*negtf) (CGEN_FPU*, TF); TF (*abstf) (CGEN_FPU*, TF); TF (*sqrttf) (CGEN_FPU*, TF); -- cgit v1.1