home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / commercialdemos / warpup-warpos2 / warprace / modsrc / memory / copy / turbocopy.p < prev    next >
Text File  |  1997-09-24  |  2KB  |  88 lines

  1.                 incdir  include:
  2.                 incdir  lvo:
  3.                 incdir  powerasm:source/powerpc_lib/warprace/
  4.  
  5. **      '(C) Copyright 1997 Haage & Partner Computer GmbH'
  6. **           All Rights Reserved
  7.  
  8.                 include exec/memory.i
  9.                 include powerpc/ppcmacros.i
  10.                 include powerpc/powerpc.i
  11.                 include warprace.i
  12.  
  13.                 include powerpc_lib.i
  14.  
  15.                 xref    _PowerPCBase
  16.                 xref    ErrParams
  17.  
  18.                 xdef    PPCCopy
  19.  
  20.                 smalldata
  21.                 escapestr
  22.  
  23.                 section code
  24.  
  25. LOOPCOUNT       =       1000
  26.  
  27. MEMSIZE         =       256*1024
  28. MEMLOOP         =       256
  29.  
  30. PPCCopy
  31.                 prolog
  32.                 pushgpr r29-r31
  33.                 mr      r31,r5
  34.                 liw     r4,MEMSIZE*2
  35.                 liw     r5,MEMF_PUBLIC
  36.                 li      r6,0
  37.                 CALLPOWERPC     AllocVecPPC
  38.                 mr.     r30,r3
  39.                 beq     .error
  40.                 liw     r0,MEMSIZE
  41.                 add     r29,r30,r0
  42.                 mr      r3,r30
  43.                 mr      r4,r29
  44.                 bl      TurboCopyPPC
  45.                 lwz     r3,WRI_STARTTIMER_PPC(r31)
  46.                 mtlr    r3
  47.                 lwz     r3,WRI_LINKERDB(r31)
  48.                 blrl
  49.                 li      r3,MEMLOOP
  50.                 mtctr   r3
  51. .loop
  52.                 mr      r3,r30
  53.                 mr      r4,r29
  54.                 bl      TurboCopyPPC
  55.                 bdnz    .loop
  56.                 lwz     r3,WRI_STOPTIMER_PPC(r31)
  57.                 mtlr    r3
  58.                 lwz     r3,WRI_LINKERDB(r31)
  59.                 blrl
  60.                 mr      r31,r3
  61.                 mr      r4,r30
  62.                 CALLPOWERPC     FreeVecPPC
  63.                 mr      r3,r31
  64.                 b       .end
  65. .error
  66.                 liw     r4,MEMSIZE*2
  67.                 sw      r4,ErrParams
  68.                 li      r3,0
  69. .end
  70.                 popgpr
  71.                 epilog
  72.  
  73. TurboCopyPPC
  74.                 mfctr   r6
  75.                 li      r5,MEMSIZE>>7
  76.                 mtctr   r5
  77.                 subi    r3,r3,8
  78.                 subi    r4,r4,8
  79. .copy
  80.                 rept    16
  81.                 lfdu    f0,8(r3)
  82.                 stfdu   f0,8(r4)
  83.                 endr
  84.                 bdnz    .copy
  85.                 mtctr   r6
  86.                 blr
  87.  
  88.