* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
/* Software floating-point emulation: unsigned integer to float conversion.
|
2023-01-06 21:08:04 +00:00
|
|
|
Copyright (C) 1997-2023 Free Software Foundation, Inc.
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
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
|
2012-03-09 23:56:38 +00:00
|
|
|
License along with the GNU C Library. If not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
|
|
|
|
#include "local-soft-fp.h"
|
|
|
|
|
|
|
|
/* Should never actually be used, since we've more bits of precision
|
2023-05-30 23:02:29 +00:00
|
|
|
than the incoming long, but needed for linkage. */
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
#undef FP_ROUNDMODE
|
|
|
|
#define FP_ROUNDMODE FP_RND_ZERO
|
|
|
|
|
|
|
|
void
|
|
|
|
_OtsCvtQUX (unsigned long a)
|
|
|
|
{
|
|
|
|
FP_DECL_EX;
|
|
|
|
FP_DECL_Q(C);
|
2014-11-17 17:20:02 +00:00
|
|
|
AXP_DECL_RETURN_Q(c);
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
|
2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
* soft-fp/single.h (SFtype): Define.
(union _FP_UNION_S): Use it.
* soft-fp/double.h (DFtype): Define.
(union _FP_UNION_D): Use it.
* soft-fp/extended.h (XFtype): Define.
(union _FP_UNION_E): Use it.
* soft-fp/quad.h (TFtype): Define.
(union _FP_UNION_Q): Use it.
* soft-fp/soft-fp.h: Add _LIBC conditionals.
(SI_BITS, DI_BITS): Define.
* soft-fp/op-common.h (_FP_DECL): Add __attribute__((unused)) for
X##_c.
(_FP_CMP_EQ): Use parentheses for && inside ||.
(_FP_TO_INT): Use statement expressions in conditional controlling
constant shift.
(_FP_FROM_INT): Likewise. Take unsigned type as argument.
* soft-fp/op-2.h (_FP_FRAC_SLL_2, _FP_FRAC_SRL_2, _FP_FRAC_SRST_2,
_FP_FRAC_SRS_2, _FP_FRAC_ASSEMBLE_2): Use statement expressions in
conditional controlling possibly constant shift.
(_FP_FRAC_SRST_2, _FP_FRAC_SRS_2): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
(_FP_FRAC_GT_2, _FP_FRAC_GE_2): Use parentheses for && inside ||.
* soft-fp/op-4.h (_FP_FRAC_SRST_4): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
(__FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3,
__FP_FRAC_SUB_4): Use _FP_W_TYPE for carry flags.
* soft-fp/op-8.h (_FP_FRAC_SRS_8): Avoid left shift by exactly
_FP_W_TYPE_SIZE.
* soft-fp/floatdidf.c: Pass unsigned type and macro for type size.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/fixdfdi.c: Pass macro for type size.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* sysdeps/alpha/soft-fp/ots_cvtqux.c: Pass unsigned type.
* sysdeps/alpha/soft-fp/ots_cvtqx.c: Likewise.
* sysdeps/powerpc/soft-fp/q_itoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_lltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/powerpc/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_itoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: Likewise.
* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_itoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uitoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_uxtoq.c: Likewise.
* sysdeps/sparc/sparc64/soft-fp/qp_xtoq.c: Likewise.
* soft-fp/adddf3.c: Use typedefs for argument and return types.
* soft-fp/addsf3.c: Likewise.
* soft-fp/addtf3.c: Likewise.
* soft-fp/divdf3.c: Likewise.
* soft-fp/divsf3.c: Likewise.
* soft-fp/divtf3.c: Likewise.
* soft-fp/eqdf2.c: Likewise.
* soft-fp/eqsf2.c: Likewise.
* soft-fp/eqtf2.c: Likewise.
* soft-fp/extenddftf2.c: Likewise.
* soft-fp/extendsfdf2.c: Likewise.
* soft-fp/extendsftf2.c: Likewise.
* soft-fp/fixdfdi.c: Likewise.
* soft-fp/fixdfsi.c: Likewise.
* soft-fp/fixsfdi.c: Likewise.
* soft-fp/fixsfsi.c: Likewise.
* soft-fp/fixtfdi.c: Likewise.
* soft-fp/fixtfsi.c: Likewise.
* soft-fp/fixunsdfdi.c: Likewise.
* soft-fp/fixunsdfsi.c: Likewise.
* soft-fp/fixunssfdi.c: Likewise.
* soft-fp/fixunssfsi.c: Likewise.
* soft-fp/fixunstfdi.c: Likewise.
* soft-fp/fixunstfsi.c: Likewise.
* soft-fp/floatdidf.c: Likewise.
* soft-fp/floatdisf.c: Likewise.
* soft-fp/floatditf.c: Likewise.
* soft-fp/floatsidf.c: Likewise.
* soft-fp/floatsisf.c: Likewise.
* soft-fp/floatsitf.c: Likewise.
* soft-fp/floatundidf.c: Likewise.
* soft-fp/floatundisf.c: Likewise.
* soft-fp/floatunditf.c: Likewise.
* soft-fp/floatunsidf.c: Likewise.
* soft-fp/floatunsisf.c: Likewise.
* soft-fp/floatunsitf.c: Likewise.
* soft-fp/gedf2.c: Likewise.
* soft-fp/gesf2.c: Likewise.
* soft-fp/getf2.c: Likewise.
* soft-fp/ledf2.c: Likewise.
* soft-fp/lesf2.c: Likewise.
* soft-fp/letf2.c: Likewise.
* soft-fp/muldf3.c: Likewise.
* soft-fp/mulsf3.c: Likewise.
* soft-fp/multf3.c: Likewise.
* soft-fp/negdf2.c: Likewise.
* soft-fp/negsf2.c: Likewise.
* soft-fp/negtf2.c: Likewise.
* soft-fp/sqrtdf2.c: Likewise.
* soft-fp/sqrtsf2.c: Likewise.
* soft-fp/sqrttf2.c: Likewise.
* soft-fp/subdf3.c: Likewise.
* soft-fp/subsf3.c: Likewise.
* soft-fp/subtf3.c: Likewise.
* soft-fp/truncdfsf2.c: Likewise.
* soft-fp/trunctfdf2.c: Likewise.
* soft-fp/trunctfsf2.c: Likewise.
* soft-fp/unorddf2.c: Likewise.
* soft-fp/unordsf2.c: Likewise.
* soft-fp/unordtf2.c: Likewise.
2006-02-25 01:26:22 +00:00
|
|
|
FP_FROM_INT_Q(C, a, 64, unsigned long);
|
2014-11-17 17:20:02 +00:00
|
|
|
AXP_PACK_RAW_Q(c, C);
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
|
2014-11-17 17:20:02 +00:00
|
|
|
AXP_RETURN_Q(c);
|
* soft-fp/quad.h (union _FP_UNION_Q): Add longs structure.
* sysdeps/alpha/Implies: Add alpha/soft-fp.
* sysdeps/alpha/soft-fp/sfp-machine.h: Rewrite for GEM interface.
* sysdeps/alpha/Subdirs, sysdeps/alpha/soft-fp/Makefile,
sysdeps/alpha/soft-fp/Versions, sysdeps/alpha/soft-fp/local-soft-fp.h,
sysdeps/alpha/soft-fp/ots_add.c, sysdeps/alpha/soft-fp/ots_cmp.c,
sysdeps/alpha/soft-fp/ots_cmpe.c, sysdeps/alpha/soft-fp/ots_cvtqux.c,
sysdeps/alpha/soft-fp/ots_cvtqx.c, sysdeps/alpha/soft-fp/ots_cvttx.c,
sysdeps/alpha/soft-fp/ots_cvtxq.c, sysdeps/alpha/soft-fp/ots_cvtxt.c,
sysdeps/alpha/soft-fp/ots_div.c, sysdeps/alpha/soft-fp/ots_mul.c,
sysdeps/alpha/soft-fp/ots_nintxq.c, sysdeps/alpha/soft-fp/ots_sub.c:
New files.
2004-03-06 20:46:23 +00:00
|
|
|
}
|