Sourceware Bugzilla – Attachment 1511 Details for
Bug 3268
fma for all targets without hardware fma instructions is incorrect.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch to ports to add fma for PPC32 soft-fp
ports-fma-20070117.txt (text/plain), 5.26 KB, created by
Steven Munroe
on 2007-01-22 23:54:30 UTC
(
hide
)
Description:
Updated patch to ports to add fma for PPC32 soft-fp
Filename:
MIME Type:
Creator:
Steven Munroe
Created:
2007-01-22 23:54:30 UTC
Size:
5.26 KB
patch
obsolete
>2007-01-17 Steven Munroe <sjmunroe@us.ibm.com> > > [BZ #3268] > * sysdeps/powerpc/nofpu/Versions (libc): Add __fmasf4 and __fmadf4 > for version GLIBC_2.5. > * sysdeps/powerpc/nofpu/s_fma.c: New file. > * sysdeps/powerpc/nofpu/s_fmaf.c: New file. > * sysdeps/powerpc/nofpu/fenv_libc.h: New file. > >diff -urN dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/Versions libc24/ports/sysdeps/powerpc/nofpu/Versions >--- dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/Versions 2006-11-22 09:13:11.000000000 -0600 >+++ libc24/ports/sysdeps/powerpc/nofpu/Versions 2007-01-12 14:50:45.000000000 -0600 >@@ -17,4 +17,7 @@ > __gtdf2; __gtsf2; > __ltdf2; __ltsf2; > } >+ GLIBC_2.5 { >+ __fmasf4; __fmadf4; >+ } > } >diff -urN dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/fenv_libc.h libc24/ports/sysdeps/powerpc/nofpu/fenv_libc.h >--- dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/fenv_libc.h Wed Dec 31 18:00:00 1969 >+++ libc24/ports/sysdeps/powerpc/nofpu/fenv_libc.h Wed Jan 17 14:12:33 2007 >@@ -0,0 +1,29 @@ >+/* Internal libc stuff for floating point environment routines. >+ Copyright (C) 2007 Free Software Foundation, Inc. >+ This file is part of the GNU C Library. >+ >+ The GNU C Library is free software; you can redistribute it and/or >+ modify it under the terms of the GNU Lesser General Public >+ License as published by the Free Software Foundation; either >+ version 2.1 of the License, or (at your option) any later version. >+ >+ The GNU C Library is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ Lesser General Public License for more details. >+ >+ You should have received a copy of the GNU Lesser General Public >+ License along with the GNU C Library; if not, write to the Free >+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA >+ 02111-1307 USA. */ >+ >+#ifndef _FENV_LIBC_H >+#define _FENV_LIBC_H 1 >+ >+/* fenv_libc.h is used in libm implementations of ldbl-128ibm. So we >+ need this version in the soft-fp to at minimum include fenv.h to >+ get the fegetround definition. */ >+ >+#include <fenv.h> >+ >+#endif /* fenv_libc.h */ >diff -urN dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/s_fma.c libc24/ports/sysdeps/powerpc/nofpu/s_fma.c >--- dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/s_fma.c Wed Dec 31 18:00:00 1969 >+++ libc24/ports/sysdeps/powerpc/nofpu/s_fma.c Fri Jan 19 14:39:32 2007 >@@ -0,0 +1,37 @@ >+/* soft-fp x * y + z as ternary operation. >+ Copyright (C) 2007 Free Software Foundation, Inc. >+ This file is part of the GNU C Library. >+ Contributed by Steven Munroe <sjmunroe@us.ibm.com>, 2006. >+ >+ The GNU C Library is free software; you can redistribute it and/or >+ modify it under the terms of the GNU Lesser General Public >+ License as published by the Free Software Foundation; either >+ version 2.1 of the License, or (at your option) any later version. >+ >+ The GNU C Library is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ Lesser General Public License for more details. >+ >+ You should have received a copy of the GNU Lesser General Public >+ License along with the GNU C Library; if not, write to the Free >+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA >+ 02111-1307 USA. */ >+ >+#include <math.h> >+ >+extern double __fmadf4 (double, double, double); >+ >+/* Compute floating point multiply-add with higher (quad) precision. */ >+double >+__fma (double a, double b, double c) >+{ >+ return __fmadf4 (a, b, c); >+} >+weak_alias (__fma, fma) >+ >+#ifdef NO_LONG_DOUBLE >+strong_alias (__fma, __fmal) >+weak_alias (__fmal, fmal) >+#endif >+ >diff -urN dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/s_fmaf.c libc24/ports/sysdeps/powerpc/nofpu/s_fmaf.c >--- dummy-libc/ports-cvstip-20070117/sysdeps/powerpc/nofpu/s_fmaf.c Wed Dec 31 18:00:00 1969 >+++ libc24/ports/sysdeps/powerpc/nofpu/s_fmaf.c Fri Jan 19 14:39:26 2007 >@@ -0,0 +1,32 @@ >+/* soft-fp x * y + z as ternary operation. >+ Copyright (C) 2007 Free Software Foundation, Inc. >+ This file is part of the GNU C Library. >+ Contributed by Steven Munroe <sjmunroe@us.ibm.com>, 2006. >+ >+ The GNU C Library is free software; you can redistribute it and/or >+ modify it under the terms of the GNU Lesser General Public >+ License as published by the Free Software Foundation; either >+ version 2.1 of the License, or (at your option) any later version. >+ >+ The GNU C Library is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+ Lesser General Public License for more details. >+ >+ You should have received a copy of the GNU Lesser General Public >+ License along with the GNU C Library; if not, write to the Free >+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA >+ 02111-1307 USA. */ >+ >+#include <math.h> >+ >+extern float __fmasf4 (float, float, float); >+ >+/* Compute floating point multiply-add with higher (double) precision. */ >+float >+__fmaf (float a, float b, float c) >+{ >+ return __fmasf4 (a, b, c); >+} >+weak_alias (__fmaf, fmaf) >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3268
:
1326
|
1327
|
1348
|
1349
|
1350
|
1511
|
1512
|
1513
|
1514
|
1515
|
1664
|
1665
|
1666
|
4569