[PATCH V2] Practical Improvement to Double Precision Complex Divide

Joseph Myers joseph@codesourcery.com
Thu Jun 4 23:45:25 GMT 2020


On Fri, 5 Jun 2020, Patrick McGehearty wrote:

> diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c
> index e0a9fd7..2a1d3dc 100644
> --- a/libgcc/libgcc2.c
> +++ b/libgcc/libgcc2.c
> @@ -2036,26 +2036,77 @@ CONCAT3(__mul,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
>  CTYPE
>  CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
>  {
> +#define RBIG	((DBL_MAX)/2.0)
> +#define RMIN	(DBL_MIN)
> +#define RMIN2	(0x1.0p-512)
> +#define RMINSCAL (0x1.0p+510)

This code is used for many different machine modes and floating-point 
formats (the type and format corresponding to a particular machine mode 
may depend on the target for which GCC is configured).  You can't hardcode 
particular values specific to DFmode (and to DFmode being IEEE binary64) 
here.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Gcc-patches mailing list