diff options
author | Ben Elliston <bje@gnu.org> | 2006-12-11 00:04:00 +0000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2006-12-11 00:04:00 +0000 |
commit | 931e17a3caa8b4dbc422cf6051bc07986938a563 (patch) | |
tree | 2521980b7dccede7121cddbd68d070bda52c0297 /libgloss/spu | |
parent | 1ad5a4066d06da999dc32b6d28822722bc0d2cd0 (diff) | |
download | cygnal-931e17a3caa8b4dbc422cf6051bc07986938a563.tar.gz cygnal-931e17a3caa8b4dbc422cf6051bc07986938a563.tar.bz2 cygnal-931e17a3caa8b4dbc422cf6051bc07986938a563.zip |
* spu/exit.c (libgloss_exit): Rename from this ..
(_exit): .. to this. Overhaul.
(exit): Remove.
Diffstat (limited to 'libgloss/spu')
-rw-r--r-- | libgloss/spu/exit.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libgloss/spu/exit.c b/libgloss/spu/exit.c index 669338822..1b639b50e 100644 --- a/libgloss/spu/exit.c +++ b/libgloss/spu/exit.c @@ -27,18 +27,19 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Author: Andreas Neukoetter (ti95neuk@de.ibm.com) */ -void __attribute__ (( destructor )) libgloss_exit( void ) +void _exit(int rc) { - /* we don't need any cleanup on the SPE ... yet */ - /* DEBUG HERE */ + /* Some self modifying code to return 'rc' in the 'stop' insn. */ + asm volatile ( + " ori $3, %0,0\n" + " lqr $4, 1f\n" + " cbd $5, 1f+3($sp)\n" + " shufb $0, %0, $4, $5\n" + " stqr $0, 1f\n" + " sync\n" + "1:\n" + " stop 0x2000\n" + : : "r" (rc) ); } - -void exit( int status ) -{ - /* handle atexit, etc here */ - _exit( status ); -} - |