forked from Imagelibrary/rtems
SPARC: add syscall 1 (exit) function entry point
The exit SPARC system call doesn't have a function entry point like the others do. This is probably why people use TA 0x0 instruction directly for shutting down the system.
This commit is contained in:
committed by
Joel Sherrill
parent
434e7f7bee
commit
6a740c2e70
@@ -29,6 +29,10 @@
|
||||
* l1 = pc
|
||||
* l2 = npc
|
||||
* g1 = system call id
|
||||
*
|
||||
* System Call 1 (exit):
|
||||
* g2 = additional exit code 1
|
||||
* g3 = additional exit code 2
|
||||
*/
|
||||
|
||||
PUBLIC(syscall)
|
||||
@@ -70,4 +74,13 @@ SYM(sparc_enable_interrupts):
|
||||
retl
|
||||
ta 0
|
||||
|
||||
PUBLIC(sparc_syscall_exit)
|
||||
|
||||
SYM(sparc_syscall_exit):
|
||||
|
||||
mov SYS_exit, %g1
|
||||
mov %o0, %g2 ! Additional exit code 1
|
||||
mov %o1, %g3 ! Additional exit code 2
|
||||
ta 0
|
||||
|
||||
/* end of file */
|
||||
|
||||
Reference in New Issue
Block a user