minix/lib/libc/arch/arm/sys-minix/_ipc.S

75 lines
2 KiB
ArmAsm
Raw Normal View History

2012-08-28 19:34:08 +02:00
#include <minix/ipcconst.h>
#include <machine/asm.h>
/**========================================================================* */
/* IPC assembly routines * */
/**========================================================================* */
ENTRY(_ipc_send_intr)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SEND /* _ipc_send(dest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
2012-08-28 19:34:08 +02:00
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_receive_intr)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
push {r2} /* save status ptr */
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #RECEIVE /* _ipc_receive(src, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
2012-08-28 19:34:08 +02:00
svc #0 /* trap to kernel */
pop {r2} /* restore status ptr */
str r1, [r2]
pop {fp}
bx lr
ENTRY(_ipc_sendrec_intr)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SENDREC /* _ipc_sendrec(srcdest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
2012-08-28 19:34:08 +02:00
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_notify_intr)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
mov r1, r0 /* r1 = src_dest */
mov r0, #NOTIFY /* _ipc_notify(srcdst) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
2012-08-28 19:34:08 +02:00
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_sendnb_intr)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
2012-08-28 19:34:08 +02:00
mov r1, r0 /* r1 = src_dest */
mov r0, #SENDNB /* _ipc_sendnb(dest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
2012-08-28 19:34:08 +02:00
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_ipc_senda_intr)
2012-08-28 19:34:08 +02:00
push {fp}
mov fp, sp
mov r2, r0 /* r2 = table */
/* r1 already holds count */
mov r0, #SENDA /* _ipc_senda(table, count) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
2012-08-28 19:34:08 +02:00
svc #0 /* trap to kernel */
pop {fp}
bx lr