Commit c61c5454 authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Look for $a0 as argument of exit syscall.

parent 89f70ab6
2003-08-13 Benot Perrot <benoit@lrde.epita.fr>
* src/vm/virtual_machine.cc (syscall): Look for $a0 as argument of
exit syscall.
* tests/good/add-sub.s,
* tests/good/and-or-nor-xor.s,
* tests/good/exit.s,
* tests/good/extended-euclide.s,
* tests/good/gtcd.s,
* tests/good/modular-exponent.s,
* tests/good/neg.s,
* tests/good/not.s,
* tests/good/print.s,
* tests/good/print_int.s,
* tests/good/read_int.s,
* tests/good/seq-sne.s,
* tests/good/shift.s,
* tests/runtime/neg.s,
* tests/runtime/no-main.s,
* tests/solve/undefined-labels.s,
* tests/syntax/asciiz-wrong-param.s,
* tests/syntax/too-many-operands.s,
* tests/unlimited/simple-exp.s:
Use exit(0).
2003-08-11 Benot Perrot <benoit@lrde.epita.fr>
* tests/Makefile.am: Distribute tests machinery.
......
-*- text -*-
New in 0.4:
* Look for $a0 as argument of exit syscall.
* Distribute testsuite.
* --fill-delay-slot: fill delay slot of native branch instructions with NOP.
New in 0.3, 2003-07-29:
......
......@@ -2,15 +2,16 @@
(Created-By-Prcs-Version 1 3 2)
(Project-Description "")
(Project-Version mipsy 0 47)
(Parent-Version mipsy 0 46)
(Project-Version mipsy 0 48)
(Parent-Version mipsy 0 47)
(Version-Log
"More Ignores.")
"Look for $a0 as argument of exit syscall.
")
(New-Version-Log
"")
(Checkin-Time "Tue, 12 Aug 2003 21:21:22 +0200")
(Checkin-Time "Wed, 13 Aug 2003 15:20:52 +0200")
(Checkin-Login benoit)
(Files
......@@ -18,9 +19,9 @@
;; ./
(AUTHORS (mipsy/0_AUTHORS 1.1 644))
(COPYING (mipsy/1_COPYING 1.1 644))
(ChangeLog (mipsy/2_ChangeLog 1.41 644))
(ChangeLog (mipsy/2_ChangeLog 1.42 644))
(Makefile.am (mipsy/3_Makefile.a 1.4 644))
(NEWS (mipsy/b/25_NEWS 1.3 644))
(NEWS (mipsy/b/25_NEWS 1.4 644))
(README (mipsy/4_README 1.2 644))
(TODO (mipsy/5_TODO 1.2 644))
(bootstrap (mipsy/b/14_bootstrap 1.1 755))
......@@ -98,7 +99,7 @@
(src/vm/memory.hh (mipsy/b/2_memory.hh 1.6 644))
(src/vm/segment.hh (mipsy/b/3_segment.hh 1.2 644))
(src/vm/table.hh (mipsy/b/4_table.hh 1.2 644))
(src/vm/virtual_machine.cc (mipsy/b/5_virtual_ma 1.14 604))
(src/vm/virtual_machine.cc (mipsy/b/5_virtual_ma 1.15 604))
(src/vm/virtual_machine.hh (mipsy/b/6_virtual_ma 1.10 604))
(src/vm/vm-tasks.cc (mipsy/b/7_vm-tasks.c 1.4 604))
(src/vm/vm-tasks.hh (mipsy/b/8_vm-tasks.h 1.3 604))
......@@ -111,20 +112,20 @@
;; ./tests/good/
(tests/good/Makefile.am (mipsy/b/30_Makefile.a 1.1 644))
(tests/good/add-sub.s (mipsy/b/31_add-sub.s 1.1 644))
(tests/good/and-or-nor-xor.s (mipsy/b/32_and-or-nor 1.1 644))
(tests/good/exit.s (mipsy/b/33_exit.s 1.1 644))
(tests/good/extended-euclide.s (mipsy/b/34_extended-e 1.1 644))
(tests/good/gtcd.s (mipsy/b/35_gtcd.s 1.1 644))
(tests/good/modular-exponent.s (mipsy/b/36_modular-ex 1.1 644))
(tests/good/neg.s (mipsy/b/37_neg.s 1.1 644))
(tests/good/not.s (mipsy/b/38_not.s 1.1 644))
(tests/good/print.s (mipsy/b/39_print.s 1.1 644))
(tests/good/print_int.s (mipsy/b/40_print_int. 1.1 644))
(tests/good/add-sub.s (mipsy/b/31_add-sub.s 1.2 644))
(tests/good/and-or-nor-xor.s (mipsy/b/32_and-or-nor 1.2 644))
(tests/good/exit.s (mipsy/b/33_exit.s 1.2 644))
(tests/good/extended-euclide.s (mipsy/b/34_extended-e 1.2 644))
(tests/good/gtcd.s (mipsy/b/35_gtcd.s 1.2 644))
(tests/good/modular-exponent.s (mipsy/b/36_modular-ex 1.2 644))
(tests/good/neg.s (mipsy/b/37_neg.s 1.2 644))
(tests/good/not.s (mipsy/b/38_not.s 1.2 644))
(tests/good/print.s (mipsy/b/39_print.s 1.2 644))
(tests/good/print_int.s (mipsy/b/40_print_int. 1.2 644))
(tests/good/read_int.in (mipsy/b/41_read_int.i 1.1 644))
(tests/good/read_int.s (mipsy/b/42_read_int.s 1.1 644))
(tests/good/seq-sne.s (mipsy/b/43_seq-sne.s 1.1 644))
(tests/good/shift.s (mipsy/b/44_shift.s 1.1 644))
(tests/good/read_int.s (mipsy/b/42_read_int.s 1.2 644))
(tests/good/seq-sne.s (mipsy/b/43_seq-sne.s 1.2 644))
(tests/good/shift.s (mipsy/b/44_shift.s 1.2 644))
;; ./tests/lexical/
(tests/lexical/Makefile.am (mipsy/b/45_Makefile.a 1.1 644))
......@@ -136,21 +137,21 @@
;; ./tests/runtime/
(tests/runtime/Makefile.am (mipsy/b/51_Makefile.a 1.1 644))
(tests/runtime/neg.s (mipsy/c/0_neg.s 1.1 644))
(tests/runtime/no-main.s (mipsy/c/1_no-main.s 1.1 644))
(tests/runtime/neg.s (mipsy/c/0_neg.s 1.2 644))
(tests/runtime/no-main.s (mipsy/c/1_no-main.s 1.2 644))
;; ./tests/solve/
(tests/solve/Makefile.am (mipsy/c/2_Makefile.a 1.1 644))
(tests/solve/undefined-labels.s (mipsy/c/3_undefined- 1.1 644))
(tests/solve/undefined-labels.s (mipsy/c/3_undefined- 1.2 644))
;; ./tests/syntax/
(tests/syntax/Makefile.am (mipsy/c/4_Makefile.a 1.1 644))
(tests/syntax/asciiz-wrong-param.s (mipsy/c/5_asciiz-wro 1.1 604))
(tests/syntax/too-many-operands.s (mipsy/c/6_too-many-o 1.1 644))
(tests/syntax/asciiz-wrong-param.s (mipsy/c/5_asciiz-wro 1.2 604))
(tests/syntax/too-many-operands.s (mipsy/c/6_too-many-o 1.2 644))
;; ./tests/unlimited/
(tests/unlimited/Makefile.am (mipsy/c/7_Makefile.a 1.1 644))
(tests/unlimited/simple-exp.s (mipsy/c/8_simple-exp 1.1 644))
(tests/unlimited/simple-exp.s (mipsy/c/8_simple-exp 1.2 644))
(prj (mipsy.prj) :symlink)
)
......
......@@ -542,9 +542,11 @@ namespace vm
cpu.set_v0(memory.sbrk(cpu.get_a0()));
break;
// exit
// exit (status : $a0)
case 10:
halt = true;
if (!exit_status)
exit_status = (exit_t) cpu.get_a0();
break;
default:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### test exit syscall
.text
main:
li $a0, 0
li $v0, 10
syscall
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
......@@ -7,5 +7,6 @@ main:
li $a0, msg
li $v0, 4
syscall
li $a0, 0
li $v0, 10
syscall
......@@ -4,5 +4,6 @@ main:
li $a0, 2097
li $v0, 1
syscall
li $a0, 0
li $v0, 10
syscall
......@@ -62,5 +62,6 @@ main:
li $v0, 4
syscall
li $a0, 0
li $v0, 10
syscall
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
### runtime library
.text
exit:
li $a0, 0
li $v0, 10
syscall
print:
......
.text
foo:
li $a0, 0
li $v0, 10
syscall
\ No newline at end of file
......@@ -5,5 +5,6 @@ main:
la $a0, baz
li $v0, 4
syscall
li $a0, 0
li $v0, 10
syscall
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment