History log of /openbsd-current/lib/libc/arch/sparc64/fpu/fpu_explode.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.12 29-Mar-2024 miod

Do not include <machine/frame.h> in libc sparc64 fpu routines, they don't
need any of its contents.
ok claudio@ kettenis@


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.11 17-Sep-2021 deraadt

sys/param.h is not needed in these files


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 21-Jun-2019 jca

Fix conversions to long double on sparc64

Bug exposed by erratic sqlite3 behavior used in ports/devel/proj,
as pointed out by landry@. Richard Hipps (SQLite) pointed at the
culprit (_Qp_div), many thanks.

Adapted from FreeBSD revision 146673 by Stephen Paskaluk and
stefanf@FreeBSD. FreeBSD commit message:

"""
Fix long (and long long) to long double, unsigned to long double and
unsigned long (and unsigned long long) to long double conversions.
- Add a parameter that specifies the position of the sign bit to the _QP_TTOQ
macro, previously it always looked at bit 31. Pass a negative number to
disable sign inspection for unsigned types. This fixes _Qp_xtoq(),
_Qp_uitoq() and _Qp_uxtoq().
- In the functions __fpu_itof() and __fpu_xtof(), look at the sign
bit to decide whether we're doing a conversion from an unsigned type. If so, don't
negate the mantissa if the integer exceeds the biggest signed number.
"""

ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.9 15-Mar-2019 kevlo

Remove FBSDID.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.8 08-May-2016 guenther

Hide __fpu_* and make internal _Qp_* calls go direct.

ok kettenis@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.7 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.6 23-Dec-2006 deraadt

please gcc


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.5 28-Sep-2004 otto

Fix unsigned {int, long, long long} to long double conversions for
values with the high bit set. ok kettenis@ jason@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.4 24-Mar-2004 jason

From the how many ways can you screw up replacing one line of code
department: cast 'i' to u_int64_t so the sign comparison actually
makes sense. Any other bugs in here just ship in the release, I'm done.


# 1.3 23-Mar-2004 jason

use absolute value like rev 1.1 did; pointed out by tom and ok deraadt.


# 1.2 23-Mar-2004 jason

gcc3 doesn't align things the same as gcc2. Casting upwards is dangerous
to a program's health, avoid it. ok deraadt


Revision tags: OPENBSD_3_4_BASE
# 1.1 21-Jul-2003 jason

quad float emulation stuff. Mostly based on freebsd (which is based on
NetBSD's kernel emulation stuff). Not enabled yet.


# 1.11 17-Sep-2021 deraadt

sys/param.h is not needed in these files


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.10 21-Jun-2019 jca

Fix conversions to long double on sparc64

Bug exposed by erratic sqlite3 behavior used in ports/devel/proj,
as pointed out by landry@. Richard Hipps (SQLite) pointed at the
culprit (_Qp_div), many thanks.

Adapted from FreeBSD revision 146673 by Stephen Paskaluk and
stefanf@FreeBSD. FreeBSD commit message:

"""
Fix long (and long long) to long double, unsigned to long double and
unsigned long (and unsigned long long) to long double conversions.
- Add a parameter that specifies the position of the sign bit to the _QP_TTOQ
macro, previously it always looked at bit 31. Pass a negative number to
disable sign inspection for unsigned types. This fixes _Qp_xtoq(),
_Qp_uitoq() and _Qp_uxtoq().
- In the functions __fpu_itof() and __fpu_xtof(), look at the sign
bit to decide whether we're doing a conversion from an unsigned type. If so, don't
negate the mantissa if the integer exceeds the biggest signed number.
"""

ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.9 15-Mar-2019 kevlo

Remove FBSDID.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.8 08-May-2016 guenther

Hide __fpu_* and make internal _Qp_* calls go direct.

ok kettenis@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.7 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.6 23-Dec-2006 deraadt

please gcc


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.5 28-Sep-2004 otto

Fix unsigned {int, long, long long} to long double conversions for
values with the high bit set. ok kettenis@ jason@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.4 24-Mar-2004 jason

From the how many ways can you screw up replacing one line of code
department: cast 'i' to u_int64_t so the sign comparison actually
makes sense. Any other bugs in here just ship in the release, I'm done.


# 1.3 23-Mar-2004 jason

use absolute value like rev 1.1 did; pointed out by tom and ok deraadt.


# 1.2 23-Mar-2004 jason

gcc3 doesn't align things the same as gcc2. Casting upwards is dangerous
to a program's health, avoid it. ok deraadt


Revision tags: OPENBSD_3_4_BASE
# 1.1 21-Jul-2003 jason

quad float emulation stuff. Mostly based on freebsd (which is based on
NetBSD's kernel emulation stuff). Not enabled yet.


# 1.10 21-Jun-2019 jca

Fix conversions to long double on sparc64

Bug exposed by erratic sqlite3 behavior used in ports/devel/proj,
as pointed out by landry@. Richard Hipps (SQLite) pointed at the
culprit (_Qp_div), many thanks.

Adapted from FreeBSD revision 146673 by Stephen Paskaluk and
stefanf@FreeBSD. FreeBSD commit message:

"""
Fix long (and long long) to long double, unsigned to long double and
unsigned long (and unsigned long long) to long double conversions.
- Add a parameter that specifies the position of the sign bit to the _QP_TTOQ
macro, previously it always looked at bit 31. Pass a negative number to
disable sign inspection for unsigned types. This fixes _Qp_xtoq(),
_Qp_uitoq() and _Qp_uxtoq().
- In the functions __fpu_itof() and __fpu_xtof(), look at the sign
bit to decide whether we're doing a conversion from an unsigned type. If so, don't
negate the mantissa if the integer exceeds the biggest signed number.
"""

ok deraadt@


Revision tags: OPENBSD_6_5_BASE
# 1.9 15-Mar-2019 kevlo

Remove FBSDID.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.8 08-May-2016 guenther

Hide __fpu_* and make internal _Qp_* calls go direct.

ok kettenis@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.7 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.6 23-Dec-2006 deraadt

please gcc


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.5 28-Sep-2004 otto

Fix unsigned {int, long, long long} to long double conversions for
values with the high bit set. ok kettenis@ jason@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.4 24-Mar-2004 jason

From the how many ways can you screw up replacing one line of code
department: cast 'i' to u_int64_t so the sign comparison actually
makes sense. Any other bugs in here just ship in the release, I'm done.


# 1.3 23-Mar-2004 jason

use absolute value like rev 1.1 did; pointed out by tom and ok deraadt.


# 1.2 23-Mar-2004 jason

gcc3 doesn't align things the same as gcc2. Casting upwards is dangerous
to a program's health, avoid it. ok deraadt


Revision tags: OPENBSD_3_4_BASE
# 1.1 21-Jul-2003 jason

quad float emulation stuff. Mostly based on freebsd (which is based on
NetBSD's kernel emulation stuff). Not enabled yet.


# 1.9 15-Mar-2019 kevlo

Remove FBSDID.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE
# 1.8 08-May-2016 guenther

Hide __fpu_* and make internal _Qp_* calls go direct.

ok kettenis@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.7 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.6 23-Dec-2006 deraadt

please gcc


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.5 28-Sep-2004 otto

Fix unsigned {int, long, long long} to long double conversions for
values with the high bit set. ok kettenis@ jason@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.4 24-Mar-2004 jason

From the how many ways can you screw up replacing one line of code
department: cast 'i' to u_int64_t so the sign comparison actually
makes sense. Any other bugs in here just ship in the release, I'm done.


# 1.3 23-Mar-2004 jason

use absolute value like rev 1.1 did; pointed out by tom and ok deraadt.


# 1.2 23-Mar-2004 jason

gcc3 doesn't align things the same as gcc2. Casting upwards is dangerous
to a program's health, avoid it. ok deraadt


Revision tags: OPENBSD_3_4_BASE
# 1.1 21-Jul-2003 jason

quad float emulation stuff. Mostly based on freebsd (which is based on
NetBSD's kernel emulation stuff). Not enabled yet.


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.8 08-May-2016 guenther

Hide __fpu_* and make internal _Qp_* calls go direct.

ok kettenis@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.7 05-Dec-2012 deraadt

Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.6 23-Dec-2006 deraadt

please gcc


Revision tags: OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.5 28-Sep-2004 otto

Fix unsigned {int, long, long long} to long double conversions for
values with the high bit set. ok kettenis@ jason@


Revision tags: OPENBSD_3_5_BASE OPENBSD_3_6_BASE
# 1.4 24-Mar-2004 jason

From the how many ways can you screw up replacing one line of code
department: cast 'i' to u_int64_t so the sign comparison actually
makes sense. Any other bugs in here just ship in the release, I'm done.


# 1.3 23-Mar-2004 jason

use absolute value like rev 1.1 did; pointed out by tom and ok deraadt.


# 1.2 23-Mar-2004 jason

gcc3 doesn't align things the same as gcc2. Casting upwards is dangerous
to a program's health, avoid it. ok deraadt


Revision tags: OPENBSD_3_4_BASE
# 1.1 21-Jul-2003 jason

quad float emulation stuff. Mostly based on freebsd (which is based on
NetBSD's kernel emulation stuff). Not enabled yet.