This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch: docs for soft float routines


I think the description should follow the function names. That's
generally the way the rest of our documentation is laid out. We should
probably also have subheadings (or suitable indentation) and index entries.



Sigh, y'all just want to worsen my rsi today ;-).


How about this?

2003-03-11 Aldy Hernandez <aldyh at redhat dot com>

* Makefile.in (TEXI_GCCINT_FILES): Add softfloat.texi.

* doc/softfloat.texi: New file.

	* doc/interface.texi (Interface): Add menu for soft float routines.
	(Interface): Include softfloat.texi.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1009
diff -c -p -r1.1009 Makefile.in
*** Makefile.in	5 Mar 2003 22:19:30 -0000	1.1009
--- Makefile.in	12 Mar 2003 01:19:43 -0000
*************** TEXI_GCCINT_FILES = $(docdir)/gccint.tex
*** 2589,2595 ****
  	 $(docdir)/gnu.texi $(docdir)/include/gpl.texi \
  	 $(docdir)/include/fdl.texi $(docdir)/contrib.texi \
  	 $(docdir)/languages.texi $(docdir)/sourcebuild.texi \
! 	 $(docdir)/gty.texi

TEXI_GCCINSTALL_FILES = $(docdir)/install.texi $(docdir)/install-old.texi \
$(docdir)/include/fdl.texi
--- 2589,2595 ----
$(docdir)/gnu.texi $(docdir)/include/gpl.texi \
$(docdir)/include/fdl.texi $(docdir)/contrib.texi \
$(docdir)/languages.texi $(docdir)/sourcebuild.texi \
! $(docdir)/gty.texi $(docdir)/softfloat.texi


TEXI_GCCINSTALL_FILES = $(docdir)/install.texi $(docdir)/install-old.texi \
$(docdir)/include/fdl.texi
Index: doc/softfloat.texi
===================================================================
RCS file: doc/softfloat.texi
diff -N doc/softfloat.texi
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- doc/softfloat.texi 12 Mar 2003 01:19:43 -0000
***************
*** 0 ****
--- 1,224 ----
+ @c Copyright (C) 2003 Free Software Foundation, Inc.
+ @c This is part of the GCC manual.
+ @c For copying conditions, see the file gcc.texi.
+ @c Contributed by Aldy Hernandez <aldy at quesejoda dot com>
+
+ @node Soft float library routines
+ @section Supporting soft floating point library routines
+ @cindex soft library
+ @opindex msoft-float
+
+ Code compiled with GCC may call certain library routines. Most of
+ them handle arithmetic for which there are no machine instructions.
+ This includes floating point operations for which floating point
+ support is disabled with @option{-msoft-float}. This section
+ documents the floating point subset of these routines.
+
+ This section documents these functions using their default library
+ names. These names can be renamed by defining the macro
+ @code{DECLARE_LIBARRY_RENAMES} in @file{libgcc2.c}.
+
+ This document assumes @code{float} is a floating point of
+ @code{SF} mode, @code{double} is a floating point of @code{DF}
+ mode, @code{long double} is a floating point of @code{TF} mode,
+ and @code{int} is an integer of @code{SI} mode.
+
+ @cindex @code{__addsf3} library call
+ @cindex @code{__adddf3} library call
+ @cindex @code{__addtf3} library call
+ @table @samp
+ @item @samp{double __adddf3 (double, double);}
+ @itemx @samp{float __addsf3 (float, float);}
+ @itemx @samp{long double __addtf3 (long double, long double);}
+ These functions return the sum of their two arguments.
+ @end table
+
+ @cindex @code{__cmpsf2} library call
+ @cindex @code{__cmpdf2} library call
+ @cindex @code{__cmptf2} library call
+ @table @samp
+ @item @samp{int __cmpdf2 (double, double);}
+ @itemx @samp{int __cmpsf2 (float, float);}
+ @itemx @samp{int __cmptf2 (long double, long double);}
+ Given two arguments (a and b), these functions compare the two
+ arguments. If @code{a} is less than @code{b}, the function returns
+ -1. If @code{a} is greater than @code{b}, the function returns 1. If
+ @code{a} is equal to @code{b}, the function returns 0. If either
+ argument is a NAN, the function returns 1.
+ @end table
+
+ @cindex @code{__divsf3} library call
+ @cindex @code{__divdf3} library call
+ @cindex @code{__divtf3} library call
+ @table @samp
+ @item @samp{double __divdf3 (double, double);}
+ @itemx @samp{float __divsf3 (float, float);}
+ @itemx @samp{long double __divtf3 (long double, long double);}
+ These function return the result of dividing the first argument by
+ the second argument.
+ @end table
+
+ @cindex @code{__eqsf2} library call
+ @cindex @code{__eqdf2} library call
+ @cindex @code{__eqtf2} library call
+ @table @samp
+ @item @samp{int __eqdf2 (double, double);}
+ @itemx @samp{int __eqsf2 (float, float);}
+ @itemx @samp{int __eqtf2 (long double, long double);}
+ Thes following functions return 0 if their arguments are equal to each
+ other, otherwise a non-zero is returned. If either argument is a NAN,
+ 1 is return.
+ @end table
+
+ @cindex @code{__extendsfdf2} library call
+ @cindex @code{__extendsftf2} library call
+ @table @samp
+ @item @samp{double __extendsfdf2 (float);}
+ @itemx @samp{long double __extendsftf2 (float);}
+ These functions extend their argument to @code{double} and
+ @code{long double} respectively.
+ @end table
+
+ @cindex @code{__fixdfsi} library call
+ @cindex @code{__fixsfsi} library call
+ @cindex @code{__fixtfsi} library call
+ @table @samp
+ @item @samp{int __fixdfsi (double);}
+ @itemx @samp{int __fixsfsi (float);}
+ @itemx @samp{int __fixtfsi (long double);}
+ These functions return the result of converting its floating
+ point argument to an integer. Any rounding done is rounding towards
+ zero.
+ @end table
+
+ @cindex @code{__floatsidf} library call
+ @cindex @code{__floatsisf} library call
+ @table @samp
+ @item @samp{double __floatsidf (int);}
+ @itemx @samp{float __floatsisf (int);}
+ @itemx @samp{long double __floatsitf (int);}
+ These functions represent the result of converting its fixed
+ point argument, regarded as signed, to a floating point value.
+ @end table
+
+ @cindex @code{__floatunsidf} library call
+ @cindex @code{__floatunsisf} library call
+ @table @samp
+ @item @samp{double __floatunsidf (unsigned int);}
+ @itemx @samp{float __floatunsisf (unsigned int);}
+ @itemx @samp{long double __floatunsitf (unsigned int);}
+ The same as above, but the argument is regarded as unsigned.
+ @end table
+
+ @cindex @code{__gedf2} library call
+ @cindex @code{__gesf2} library call
+ @cindex @code{__getf2} library call
+ @table @samp
+ @item @samp{int __gedf2 (double, double);}
+ @itemx @samp{int __gesf2 (float, float);}
+ @itemx @samp{int __getf2 (long double, long double);}
+ Thes following functions return 1 if the first argument is greater or
+ equal than the second argument, and -1 for a NAN. Otherwise, 0 is
+ returned.
+ @end table
+
+ @cindex @code{__ledf2} library call
+ @cindex @code{__lesf2} library call
+ @cindex @code{__letf2} library call
+ @table @samp
+ @item @samp{int __ledf2 (double, double);}
+ @itemx @samp{int __lesf2 (float, float);}
+ @itemx @samp{int __letf2 (long double, long double);}
+ These functions return 1 if the first argument is less than or
+ equal to the second argument, or if either argument is a NAN.
+ Otherwise, 0 is returned.
+ @end table
+
+ @cindex @code{__ltdf2} library call
+ @cindex @code{__ltsf2} library call
+ @cindex @code{__lttf2} library call
+ @table @samp
+ @item @samp{int __ltdf2 (double, double);}
+ @itemx @samp{int __ltsf2 (float, float);}
+ @itemx @samp{int __lttf2 (long double, long double);}
+ Thes following functions return 1 if the first argument is less than
+ the second argument, or if either argument is a NAN. Otherwise, 0 is
+ returned.
+ @end table
+
+ @cindex @code{__muldf3} library call
+ @cindex @code{__mulsf3} library call
+ @cindex @code{__multf3} library call
+ @table @samp
+ @item @samp{double __muldf3 (double, double);}
+ @itemx @samp{float __mulsf3 (float, float);}
+ @itemx @samp{long double __multf3 (long double, long double);}
+ These functions return the result of multiplying their arguments.
+ @end table
+
+ @cindex @code{__nedf2} library call
+ @cindex @code{__nesf2} library call
+ @cindex @code{__netf2} library call
+ @table @samp
+ @item @samp{int __nedf2 (double, double);}
+ @itemx @samp{int __nesf2 (float, float);}
+ @itemx @samp{int __netf2 (long double, long double);}
+ These functions return 1 if the first argument is not equal to
+ the second argument, or if either argument is a NAN. Otherwise, 0 is
+ returned.
+ @end table
+
+ @cindex @code{__negtf2} library call
+ @cindex @code{__negdf2} library call
+ @cindex @code{__negsf2} library call
+ @table @samp
+ @item @samp{long double __negtf2 (long double);}
+ @itemx @samp{double __negdf2 (double);}
+ @itemx @samp{float __negsf2 (float);}
+ These functions return the result of negating its argument.
+ @end table
+
+ @cindex @code{__subsf3} library call
+ @cindex @code{__subdf3} library call
+ @cindex @code{__subtf3} library call
+ @table @samp
+ @item @samp{double __subdf3 (double, double);}
+ @itemx @samp{float __subsf3 (float, float);}
+ @itemx @samp{long double __subtf3 (long double, long double);}
+ These functions return the result of subtracting the second
+ argument from the first.
+ @end table
+
+ @cindex @code{__truncdfsf2} library call
+ @cindex @code{__trunctfdf2} library call
+ @cindex @code{__trunctfsf2} library call
+ @table @samp
+ @item @samp{float __truncdfsf2 (double);}
+ @itemx @samp{double __trunctfdf2 (long double);}
+ @itemx @samp{float __trunctfsf2 (long double);}
+ These functions return the result of truncating the floating
+ argument to the mode indicated by its return type.
+ @end table
+
+ @cindex @code{__unorddf2} library call
+ @cindex @code{__unordsf2} library call
+ @cindex @code{__unordtf2} library call
+ @table @samp
+ @item @samp{int __unorddf2 (double, double);}
+ @itemx @samp{int __unordsf2 (float, float);}
+ @itemx @samp{int __unordtf2 (long double, long double);}
+ These functions return 1 if either argument is a NAN,
+ otherwise 0 is returned.
+ @end table
+
+ @cindex @code{__fixunsdfsi} library call
+ @cindex @code{__fixunssfsi} library call
+ @cindex @code{__fixunstfsi} library call
+ @table @samp
+ @item @samp{unsigned int __fixunsdfsi (double);}
+ @itemx @samp{unsigned int __fixunssfsi (float);}
+ @itemx @samp{unsigned int __fixunstfsi (long double);}
+ These functions represent the result of converting its
+ floating point argument ot a fixed point value, regarded as unsigned.
+ Rounding is done by cropping to zero.
+ @end table
Index: doc/interface.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/interface.texi,v
retrieving revision 1.2
diff -c -p -r1.2 interface.texi
*** doc/interface.texi 15 Sep 2002 22:48:04 -0000 1.2
--- doc/interface.texi 12 Mar 2003 01:19:44 -0000
*************** they appear in @file{libgcc2.c}. Others
*** 100,102 ****
--- 100,108 ----
assembly language for each processor. Wherever they are defined, they
are compiled into the support library, @file{libgcc.a}, which is
automatically searched when you link programs with GCC at dot +
+ @menu
+ * Soft float library routines:: Supporting floating point routines.
+ @end menu
+
+ @include softfloat.texi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]