Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
13bd32f6
Commit
13bd32f6
authored
10 years ago
by
Raymond Toy
Browse files
Options
Downloads
Patches
Plain Diff
Remove the NetBSD setexception changes on the master branch. This is
only for the upcoming release.
parent
ee7c488f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/lisp/GNUmakefile
+1
-1
1 addition, 1 deletion
src/lisp/GNUmakefile
src/lisp/double-values.c
+0
-40
0 additions, 40 deletions
src/lisp/double-values.c
src/lisp/setexception.c
+3
-40
3 additions, 40 deletions
src/lisp/setexception.c
with
4 additions
and
81 deletions
src/lisp/GNUmakefile
+
1
−
1
View file @
13bd32f6
...
@@ -12,7 +12,7 @@ FDLIBM = k_sin.c k_cos.c k_tan.c s_sin.c s_cos.c s_tan.c sincos.c \
...
@@ -12,7 +12,7 @@ FDLIBM = k_sin.c k_cos.c k_tan.c s_sin.c s_cos.c s_tan.c sincos.c \
e_acosh.c s_asinh.c e_atanh.c
\
e_acosh.c s_asinh.c e_atanh.c
\
e_atan2.c
\
e_atan2.c
\
e_rem_pio2.c k_rem_pio2.c
\
e_rem_pio2.c k_rem_pio2.c
\
setexception.c
double-values.c
setexception.c
SRCS
=
lisp.c coreparse.c alloc.c monitor.c print.c interr.c
\
SRCS
=
lisp.c coreparse.c alloc.c monitor.c print.c interr.c
\
vars.c parse.c interrupt.c search.c validate.c globals.c
\
vars.c parse.c interrupt.c search.c validate.c globals.c
\
...
...
This diff is collapsed.
Click to expand it.
src/lisp/double-values.c
deleted
100644 → 0
+
0
−
40
View file @
ee7c488f
/*
* Some helper functions to return specific double values for use by
* fdlibm_setexceptions on NetBSD. Currently, NetBSD doesn't have
* feraiseexcept so we have to do something special. See
* fdlibm_setexceptions.
*/
#include
"fdlibm.h"
double
double_zero
()
{
return
0
.
0
;
}
/*
* Return most-positive-double-float
*/
double
double_huge
()
{
union
{
int
i
[
2
];
double
d
;
}
ux
;
ux
.
i
[
HIWORD
]
=
0x7fefffff
;
ux
.
i
[
LOWORD
]
=
0xffffffff
;
return
ux
.
d
;
}
/*
* Return least-positive-double-float
*/
double
double_tiny
()
{
union
{
int
i
[
2
];
double
d
;
}
ux
;
ux
.
i
[
HIWORD
]
=
0
;
ux
.
i
[
LOWORD
]
=
1
;
return
ux
.
d
;
}
This diff is collapsed.
Click to expand it.
src/lisp/setexception.c
+
3
−
40
View file @
13bd32f6
#if defined(__NetBSD__)
/*
* NetBSD doesn't have fenv.h. At least the version currently being
* used to build cmucl doesn't. Assume this also means we don't have
* feraiseexcept. So, to generate the desired exceptions, we have to
* create the appropriate operations to generate the desired
* exceptions.
*/
#undef HAVE_FERAISEEXCEPT
extern
double
double_zero
();
extern
double
double_huge
();
extern
double
double_tiny
();
#else
#define HAVE_FERAISEEXCEPT
#endif
#ifdef HAVE_FERAISEEXCEPT
#include
<fenv.h>
#include
<fenv.h>
#endif
#include
<math.h>
#include
<math.h>
#include
<stdio.h>
#include
<stdio.h>
...
@@ -71,48 +50,32 @@ fdlibm_setexception(double x, enum FDLIBM_EXCEPTION type)
...
@@ -71,48 +50,32 @@ fdlibm_setexception(double x, enum FDLIBM_EXCEPTION type)
/* Division by zero. Use the sign of x to get the correct
/* Division by zero. Use the sign of x to get the correct
* signed infinity
* signed infinity
*/
*/
#ifdef HAVE_FERAISEEXCEPT
feraiseexcept
(
FE_DIVBYZERO
);
feraiseexcept
(
FE_DIVBYZERO
);
ret
=
copysign
(
INFINITY
,
x
);
#else
ret
=
copysign
(
1
,
x
)
/
double_zero
();
#endif
ret
=
copysign
(
INFINITY
,
x
);
break
;
break
;
case
1
:
case
1
:
/* Underflow. Use the sign of x to get a signed zero. */
/* Underflow. Use the sign of x to get a signed zero. */
#ifdef HAVE_FERAISEEXCEPT
feraiseexcept
(
FE_UNDERFLOW
);
feraiseexcept
(
FE_UNDERFLOW
);
ret
=
copysign
(
0
.
0
,
x
);
ret
=
copysign
(
0
.
0
,
x
);
#else
ret
=
double_tiny
()
*
double_tiny
();;
#endif
break
;
break
;
case
2
:
case
2
:
/* overflow */
/* overflow */
#ifdef HAVE_FERAISEEXCEPT
feraiseexcept
(
FE_OVERFLOW
);
feraiseexcept
(
FE_OVERFLOW
);
ret
=
copysign
(
INFINITY
,
x
);
ret
=
copysign
(
INFINITY
,
x
);
#else
ret
=
double_huge
()
*
copysign
(
double_huge
(),
x
);
#endif
break
;
break
;
case
3
:
case
3
:
{
{
/* i
f
*/
/* i
nvalid
*/
if
(
!
isQNaN
(
x
))
{
if
(
!
isQNaN
(
x
))
{
/*
/*
* If it's not a quiet NaN, we want to signal an invalid
* If it's not a quiet NaN, we want to signal an invalid
* operation. Otherwise, we silently return a NaN.
* operation. Otherwise, we silently return a NaN.
*/
*/
#ifdef HAVE_FERAISEEXCEPT
feraiseexcept
(
FE_INVALID
);
feraiseexcept
(
FE_INVALID
);
#else
ret
=
double_zero
()
/
double_zero
();
return
ret
;
#endif
}
}
/*
/*
* FIXME: Of the many NaN values that we have, what NaN
* FIXME: Of the many NaN values that we have, what NaN
* should we return?
* should we return?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment