Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tiger
nolimips
Commits
446f620b
Commit
446f620b
authored
Jul 11, 2003
by
Benoit Perrot
Browse files
* src/vm/virtual_machine.cc:
Set exit_status to exit_runtime when an exception occurs.
parent
9fd8730e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
446f620b
2003-07-11 Benot Perrot <benoit@lrde.epita.fr>
* src/vm/virtual_machine.cc:
Set exit_status to exit_runtime when an exception occurs.
2003-07-11 Benot Perrot <benoit@lrde.epita.fr>
* src/vm/virtual_machine.hh, src/vm/virtual_machine.cc:
...
...
src/vm/virtual_machine.cc
View file @
446f620b
...
...
@@ -16,6 +16,8 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
#include
"common.hh"
#include
"vm/virtual_machine.hh"
#include
"inst/all.hh"
...
...
@@ -39,7 +41,10 @@ namespace vm
// FIXME: might be accelerated by testing only the sign bit.
if
((
a
<
0
&&
b
<
0
&&
c
>
0
)
||
(
a
>
0
&&
b
>
0
&&
c
<
0
))
std
::
cerr
<<
"Runtime Exception: Overflow"
<<
std
::
endl
;
{
std
::
cerr
<<
"Runtime Exception: Overflow"
<<
std
::
endl
;
exit_set
(
exit_runtime
);
}
}
void
VirtualMachine
::
visit
(
const
inst
::
Addi
&
addi
)
...
...
@@ -53,7 +58,10 @@ namespace vm
// FIXME: might be accelerated by testing only the sign bit.
if
((
a
<
0
&&
b
<
0
&&
c
>
0
)
||
(
a
>
0
&&
b
>
0
&&
c
<
0
))
std
::
cerr
<<
"Runtime Exception: Overflow"
<<
std
::
endl
;
{
std
::
cerr
<<
"Runtime Exception: Overflow"
<<
std
::
endl
;
exit_set
(
exit_runtime
);
}
}
void
VirtualMachine
::
visit
(
const
inst
::
Addu
&
addu
)
...
...
@@ -79,7 +87,10 @@ namespace vm
cpu
.
set_register
(
sub
.
get_dest
(),
c
);
if
((
a
<
b
&&
c
>
0
)
||
(
a
>
b
&&
c
<
0
))
std
::
cerr
<<
"Runtime Exception: Overflow"
<<
std
::
endl
;
{
std
::
cerr
<<
"Runtime Exception: Overflow"
<<
std
::
endl
;
exit_set
(
exit_runtime
);
}
}
void
VirtualMachine
::
visit
(
const
inst
::
Subu
&
subu
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment