Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
3bbfa296
Commit
3bbfa296
authored
Jan 19, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(set_float_handler): Set up signal catcher on first call in case a
front end has disabled it. From-SVN: r13534
parent
299b54ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
gcc/toplev.c
+24
-17
No files found.
gcc/toplev.c
View file @
3bbfa296
...
...
@@ -1870,9 +1870,27 @@ floor_log2_wide (x)
return
log
;
}
static
int
float_handler_set
;
int
float_handled
;
jmp_buf
float_handler
;
/* Signals actually come here. */
static
void
float_signal
(
signo
)
/* If this is missing, some compilers complain. */
int
signo
;
{
if
(
float_handled
==
0
)
abort
();
#if defined (USG) || defined (hpux)
signal
(
SIGFPE
,
float_signal
);
/* re-enable the signal catcher */
#endif
float_handled
=
0
;
signal
(
SIGFPE
,
float_signal
);
longjmp
(
float_handler
,
1
);
}
/* Specify where to longjmp to when a floating arithmetic error happens.
If HANDLER is 0, it means don't handle the errors any more. */
...
...
@@ -1883,6 +1901,12 @@ set_float_handler (handler)
float_handled
=
(
handler
!=
0
);
if
(
handler
)
bcopy
((
char
*
)
handler
,
(
char
*
)
float_handler
,
sizeof
(
float_handler
));
if
(
float_handled
&&
!
float_handler_set
)
{
signal
(
SIGFPE
,
float_signal
);
float_handler_set
=
1
;
}
}
/* Specify, in HANDLER, where to longjmp to when a floating arithmetic
...
...
@@ -1917,23 +1941,6 @@ pop_float_handler (handled, handler)
bcopy
((
char
*
)
handler
,
(
char
*
)
float_handler
,
sizeof
(
float_handler
));
}
/* Signals actually come here. */
static
void
float_signal
(
signo
)
/* If this is missing, some compilers complain. */
int
signo
;
{
if
(
float_handled
==
0
)
abort
();
#if defined (USG) || defined (hpux)
signal
(
SIGFPE
,
float_signal
);
/* re-enable the signal catcher */
#endif
float_handled
=
0
;
signal
(
SIGFPE
,
float_signal
);
longjmp
(
float_handler
,
1
);
}
/* Handler for SIGPIPE. */
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment