Ignore:
Timestamp:
May 23, 2014, 1:52:16 PM (6 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, 5, master
Children:
5c123985
Parents:
434e7f7
git-author:
Daniel Hellstrom <daniel@…> (05/23/14 13:52:16)
git-committer:
Joel Sherrill <joel.sherrill@…> (05/23/14 14:14:15)
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sparc/syscall/syscall.S

    r434e7f7 r6a740c2  
    3030         *    l2 = npc
    3131         *    g1 = system call id
     32         *
     33         *  System Call 1 (exit):
     34         *    g2 = additional exit code 1
     35         *    g3 = additional exit code 2
    3236         */
    3337
     
    7175         ta     0
    7276
     77        PUBLIC(sparc_syscall_exit)
     78
     79SYM(sparc_syscall_exit):
     80
     81        mov     SYS_exit, %g1
     82        mov     %o0, %g2        ! Additional exit code 1
     83        mov     %o1, %g3        ! Additional exit code 2
     84        ta      0
     85
    7386/* end of file */
Note: See TracChangeset for help on using the changeset viewer.