Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

umodsi3.c

Go to the documentation of this file.
00001 /*
00002  *  umodsi3.c
00003  *
00004  *  32-bit unsigned modulo: r0r1 %= r2r3
00005  *
00006  *  Calls the ROM version of udivsi3, which leaves the remainder in r3r4.
00007  *
00008  *  The contents of this file are subject to the Mozilla Public License
00009  *  Version 1.0 (the "License"); you may not use this file except in
00010  *  compliance with the License. You may obtain a copy of the License at
00011  *  http://www.mozilla.org/MPL/
00012  *
00013  *  Software distributed under the License is distributed on an "AS IS"
00014  *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
00015  *  License for the specific language governing rights and limitations
00016  *  under the License.
00017  *
00018  *  The Original Code is Librcx code, released February 9, 1999.
00019  *
00020  *  The Initial Developer of the Original Code is Kekoa Proudfoot.
00021  *  Portions created by Kekoa Proudfoot are Copyright (C) 1999
00022  *  Kekoa Proudfoot. All Rights Reserved.
00023  *
00024  *  Contributor(s): Kekoa Proudfoot <kekoa@graphics.stanford.edu>
00025  */
00026 
00027 __asm__ (
00028     ".section .text\n\t"
00029     ".global ___umodsi3\n"
00030     "___umodsi3:\n\t"
00031     "push r4\n\t"
00032     "push r5\n\t"
00033     "push r6\n\t"
00034     "mov.w r1,r6\n\t"
00035     "mov.w r0,r5\n\t"
00036     "mov.w r3,r4\n\t"
00037     "mov.w r2,r3\n\t"
00038     "jsr @@86\n\t"
00039     "mov.w r4,r1\n\t"
00040     "mov.w r3,r0\n\t"
00041     "pop r6\n\t"
00042     "pop r5\n\t"
00043     "pop r4\n\t"
00044     "rts"
00045 );

Generated on Fri Feb 25 08:02:39 2005 for brickos by  doxygen 1.3.9.1