-@c Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+@c Copyright (C) 2003-2020 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@quesejoda.com>
and @var{b}.
@end deftypefn
-@deftypefn {Runtime Function} {unsigned long} __udivmoddi3 (unsigned long @var{a}, unsigned long @var{b}, unsigned long *@var{c})
-@deftypefnx {Runtime Function} {unsigned long long} __udivti3 (unsigned long long @var{a}, unsigned long long @var{b}, unsigned long long *@var{c})
+@deftypefn {Runtime Function} {unsigned long} __udivmoddi4 (unsigned long @var{a}, unsigned long @var{b}, unsigned long *@var{c})
+@deftypefnx {Runtime Function} {unsigned long long} __udivmodti4 (unsigned long long @var{a}, unsigned long long @var{b}, unsigned long long *@var{c})
These functions calculate both the quotient and remainder of the unsigned
division of @var{a} and @var{b}. The return value is the quotient, and
the remainder is placed in variable pointed to by @var{c}.
@subsection Bit operations
-@deftypefn {Runtime Function} int __clzsi2 (int @var{a})
-@deftypefnx {Runtime Function} int __clzdi2 (long @var{a})
-@deftypefnx {Runtime Function} int __clzti2 (long long @var{a})
+@deftypefn {Runtime Function} int __clzsi2 (unsigned int @var{a})
+@deftypefnx {Runtime Function} int __clzdi2 (unsigned long @var{a})
+@deftypefnx {Runtime Function} int __clzti2 (unsigned long long @var{a})
These functions return the number of leading 0-bits in @var{a}, starting
at the most significant bit position. If @var{a} is zero, the result is
undefined.
@end deftypefn
-@deftypefn {Runtime Function} int __ctzsi2 (int @var{a})
-@deftypefnx {Runtime Function} int __ctzdi2 (long @var{a})
-@deftypefnx {Runtime Function} int __ctzti2 (long long @var{a})
+@deftypefn {Runtime Function} int __ctzsi2 (unsigned int @var{a})
+@deftypefnx {Runtime Function} int __ctzdi2 (unsigned long @var{a})
+@deftypefnx {Runtime Function} int __ctzti2 (unsigned long long @var{a})
These functions return the number of trailing 0-bits in @var{a}, starting
at the least significant bit position. If @var{a} is zero, the result is
undefined.
@end deftypefn
-@deftypefn {Runtime Function} int __ffsdi2 (long @var{a})
-@deftypefnx {Runtime Function} int __ffsti2 (long long @var{a})
+@deftypefn {Runtime Function} int __ffsdi2 (unsigned long @var{a})
+@deftypefnx {Runtime Function} int __ffsti2 (unsigned long long @var{a})
These functions return the index of the least significant 1-bit in @var{a},
or the value zero if @var{a} is zero. The least significant bit is index
one.
@end deftypefn
-@deftypefn {Runtime Function} int __paritysi2 (int @var{a})
-@deftypefnx {Runtime Function} int __paritydi2 (long @var{a})
-@deftypefnx {Runtime Function} int __parityti2 (long long @var{a})
+@deftypefn {Runtime Function} int __paritysi2 (unsigned int @var{a})
+@deftypefnx {Runtime Function} int __paritydi2 (unsigned long @var{a})
+@deftypefnx {Runtime Function} int __parityti2 (unsigned long long @var{a})
These functions return the value zero if the number of bits set in
@var{a} is even, and the value one otherwise.
@end deftypefn
-@deftypefn {Runtime Function} int __popcountsi2 (int @var{a})
-@deftypefnx {Runtime Function} int __popcountdi2 (long @var{a})
-@deftypefnx {Runtime Function} int __popcountti2 (long long @var{a})
+@deftypefn {Runtime Function} int __popcountsi2 (unsigned int @var{a})
+@deftypefnx {Runtime Function} int __popcountdi2 (unsigned long @var{a})
+@deftypefnx {Runtime Function} int __popcountti2 (unsigned long long @var{a})
These functions return the number of bits set in @var{a}.
@end deftypefn
@node Decimal float library routines
@section Routines for decimal floating point emulation
@cindex decimal float library
-@cindex IEEE-754R
+@cindex IEEE 754-2008
-The software decimal floating point library implements IEEE 754R
+The software decimal floating point library implements IEEE 754-2008
decimal floating point arithmetic and is only activated on selected
targets.
-The software decimal floating point library supports either DPD
-(Densely Packed Decimal) or BID (Binary Integer Decimal) encoding
+The software decimal floating point library supports either DPD
+(Densely Packed Decimal) or BID (Binary Integer Decimal) encoding
as selected at configure time.
@deftypefn {Runtime Function} void __clear_cache (char *@var{beg}, char *@var{end})
This function clears the instruction cache between @var{beg} and @var{end}.
@end deftypefn
+
+@subsection Split stack functions and variables
+@deftypefn {Runtime Function} {void *} __splitstack_find (void *@var{segment_arg}, @
+void *@var{sp}, size_t @var{len}, void **@var{next_segment}, @
+void **@var{next_sp}, void **@var{initial_sp})
+When using @option{-fsplit-stack}, this call may be used to iterate
+over the stack segments. It may be called like this:
+@smallexample
+ void *next_segment = NULL;
+ void *next_sp = NULL;
+ void *initial_sp = NULL;
+ void *stack;
+ size_t stack_size;
+ while ((stack = __splitstack_find (next_segment, next_sp,
+ &stack_size, &next_segment,
+ &next_sp, &initial_sp))
+ != NULL)
+ @{
+ /* Stack segment starts at stack and is
+ stack_size bytes long. */
+ @}
+@end smallexample
+
+There is no way to iterate over the stack segments of a different
+thread. However, what is permitted is for one thread to call this
+with the @var{segment_arg} and @var{sp} arguments NULL, to pass
+@var{next_segment}, @var{next_sp}, and @var{initial_sp} to a different
+thread, and then to suspend one way or another. A different thread
+may run the subsequent @code{__splitstack_find} iterations. Of
+course, this will only work if the first thread is suspended while the
+second thread is calling @code{__splitstack_find}. If not, the second
+thread could be looking at the stack while it is changing, and
+anything could happen.
+@end deftypefn
+
+@defvar __morestack_segments
+@defvarx __morestack_current_segment
+@defvarx __morestack_initial_sp
+Internal variables used by the @option{-fsplit-stack} implementation.
+@end defvar