asm/syscall: add simple fast syscall test
This commit is contained in:
parent
1f94097b8f
commit
a7aa47c752
|
@ -1,11 +1,19 @@
|
|||
#ifndef COMMON_SYSCALL_NR_H
|
||||
#define COMMON_SYSCALL_NR_H
|
||||
|
||||
#define NR_exit 1
|
||||
#define NR_write 4
|
||||
#define NR_mmap 90
|
||||
#define NR_exit 1
|
||||
#define NR_write 4
|
||||
#define NR_gettimeofday 78
|
||||
#define NR_mmap 90
|
||||
#define NR_rt_sigaction 174
|
||||
#define NR_rt_sigreturn 173
|
||||
#define NR_access_hw_stacks 254
|
||||
|
||||
#define NR_fast_sys_gettimeofday 0
|
||||
#define NR_fast_sys_clock_gettime 1
|
||||
#define NR_fast_sys_getcpu 2
|
||||
#define NR_fast_sys_siggetmask 3
|
||||
#define NR_fast_sys_getcontext 4
|
||||
#define NR_fast_sys_set_return 5
|
||||
|
||||
#endif // COMMON_SYSCALL_NR_H
|
||||
|
|
|
@ -205,6 +205,7 @@ asm_tests = {
|
|||
'invalid-nr-hi-1': {},
|
||||
'invalid-arg-1': {},
|
||||
'invalid-arg-hi-1': {},
|
||||
'fast-gettimeofday-1': {},
|
||||
},
|
||||
'f80': {
|
||||
'movif-movfi-1': {},
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=8, nfx=1
|
||||
setbn rsz=3, rbs=4, rcur=0
|
||||
}
|
||||
{
|
||||
addd,0 0, NR_fast_sys_gettimeofday, %b[0]
|
||||
sdisp %ctpr1, 0x6
|
||||
}
|
||||
{
|
||||
addd,1 0, tv, %b[1]
|
||||
addd,2 0, tz, %b[2]
|
||||
call %ctpr1, wbs=4
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
.data
|
||||
.balign 8
|
||||
tv:
|
||||
.fill 16, 1, 0
|
||||
tz:
|
||||
.fill 16, 1, 0
|
||||
|
Loading…
Reference in New Issue