diff --git a/tests/asm/meson.build b/tests/asm/meson.build index d2d13b8..32f5153 100644 --- a/tests/asm/meson.build +++ b/tests/asm/meson.build @@ -185,6 +185,10 @@ asm_tests = { 'write-ps-ex-1': {}, 'zero-wsz-1': {}, 'invalid-sdisp-1': { 'should_fail': true }, + 'invalid-nr-1': {}, + 'invalid-nr-hi-1': {}, + 'invalid-arg-1': {}, + 'invalid-arg-hi-1': {}, }, } diff --git a/tests/asm/syscall/invalid-arg-1.S b/tests/asm/syscall/invalid-arg-1.S new file mode 100644 index 0000000..c3b06ac --- /dev/null +++ b/tests/asm/syscall/invalid-arg-1.S @@ -0,0 +1,15 @@ +#include "test_start.S" + + { + setwd wsz=8, nfx=1 + sdisp %ctpr1, 0x3 + } + ldd,0,sm 0, 0, %r9 + { + addd,0 0, NR_exit, %r8 + subd,1,sm %r9, %r9, %r9 + } + call %ctpr1, wbs=4 + sys_exit 1 + +#include "test_end.S" diff --git a/tests/asm/syscall/invalid-arg-hi-1.S b/tests/asm/syscall/invalid-arg-hi-1.S new file mode 100644 index 0000000..7681960 --- /dev/null +++ b/tests/asm/syscall/invalid-arg-hi-1.S @@ -0,0 +1,14 @@ +#include "test_start.S" + + { + setwd wsz=8, nfx=1 + sdisp %ctpr1, 0x3 + } + ldd,0,sm 0, 0, %r9 + { + addd,0 0, NR_exit, %r8 + subs,1,sm %r9, %r9, %r9 + } + call %ctpr1, wbs=4 + +#include "test_end.S" diff --git a/tests/asm/syscall/invalid-nr-1.S b/tests/asm/syscall/invalid-nr-1.S new file mode 100644 index 0000000..1904982 --- /dev/null +++ b/tests/asm/syscall/invalid-nr-1.S @@ -0,0 +1,15 @@ +#include "test_start.S" + + { + setwd wsz=8, nfx=1 + sdisp %ctpr1, 0x3 + } + ldd,0,sm 0, 0, %r8 + subd,0,sm %r8, %r8, %r8 + { + addd,0,sm %r8, NR_exit, %r8 + addd,1 0, 1, %r9 + } + call %ctpr1, wbs=4 + +#include "test_end.S" diff --git a/tests/asm/syscall/invalid-nr-hi-1.S b/tests/asm/syscall/invalid-nr-hi-1.S new file mode 100644 index 0000000..a94c343 --- /dev/null +++ b/tests/asm/syscall/invalid-nr-hi-1.S @@ -0,0 +1,16 @@ +#include "test_start.S" + + { + setwd wsz=8, nfx=1 + sdisp %ctpr1, 0x3 + } + ldd,0,sm 0, 0, %r8 + subd,0,sm %r8, %r8, %r8 + { + adds,0 0, NR_exit, %r8 + addd,1 0, 0, %r9 + } + call %ctpr1, wbs=4 + sys_exit 1 + +#include "test_end.S"