home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / quake_src / modu64pppc.s < prev    next >
Encoding:
Text File  |  2000-06-17  |  1.2 KB  |  52 lines

  1. # Copyright (C) 1996-1997 Id Software, Inc. 
  2. # This program is free software; you can redistribute it and/or 
  3. # modify it under the terms of the GNU General Public License 
  4. # as published by the Free Software Foundation; either version 2 
  5. # of the License, or (at your option) any later version. 
  6. # This program is distributed in the hope that it will be useful, 
  7. # but WITHOUT ANY WARRANTY; without even the implied warranty of 
  8. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   
  9. # See the GNU General Public License for more details. 
  10. # You should have received a copy of the GNU General Public License 
  11. # along with this program; if not, write to the Free Software 
  12. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
  13.  
  14. #
  15. # PowerUp fix which implements the missing Modu64p() function. :P
  16. #
  17.     .file    "Modu64pPPC.s"
  18.  
  19.     .extern    PPCDivu64
  20.  
  21.  
  22.     .text
  23.  
  24.     .globl    PPCModu64p
  25. PPCModu64p:
  26.     mflr    r0
  27.     stw    r0,4(r1)
  28.     stwu    r1,-16(r1)
  29.     stw    r31,12(r1)
  30.     mr    r31,r3
  31.     lwz    r5,0(r4)
  32.     lwz    r6,4(r4)
  33.     lwz    r4,4(r3)
  34.     lwz    r3,0(r3)
  35.     bl    PPCDivu64
  36.     stw    r5,0(r31)
  37.     stw    r6,4(r31)
  38.     lwz    r31,12(r1)
  39.     addi    r1,r1,16
  40.     lwz    r0,4(r1)
  41.     mtlr    r0
  42.     blr
  43.  
  44.     .type    PPCModu64p,@function
  45.     .size    PPCModu64p,$-PPCModu64p
  46.