Interest in On-System Assembler?

Author Message

Joined: 11/12/2012
Location: United Kingdom
Posts: 8674
Posted: 09:35am 07 Dec 2020      

This is a seriously non-trivial exercise. Below one bit of the magic behind the speed of the CMM2 for you to enjoy.

08081680 <_Z10copy_wordsPKmPmm>:
8081680: ed2d 8a10 vpush {s16-s31}
8081684: 0852       lsrs r2, r2, #1
8081686: bf24       itt cs
8081688: ecb0 0a01 vldm ia cs r0!, {s0}
808168c: eca1 0a01 vstm ia cs r1!, {s0}
8081690: 0852       lsrs r2, r2, #1
8081692: bf24       itt cs
8081694: ecb0 0a02 vldm ia cs r0!, {s0-s1}
8081698: eca1 0a02 vstm ia cs r1!, {s0-s1}
808169c: 0852       lsrs r2, r2, #1
808169e: bf24       itt cs
80816a0: ecb0 0a04 vldm ia cs r0!, {s0-s3}
80816a4: eca1 0a04 vstm ia cs r1!, {s0-s3}
80816a8: 0852       lsrs r2, r2, #1
80816aa: bf24       itt cs
80816ac: ecb0 0a08 vldm ia cs r0!, {s0-s7}
80816b0: eca1 0a08 vstm ia cs r1!, {s0-s7}
80816b4: 0852       lsrs r2, r2, #1
80816b6: bf24       itt cs
80816b8: ecb0 0a10 vldm ia cs r0!, {s0-s15}
80816bc: eca1 0a10 vstm ia cs r1!, {s0-s15}
80816c0: f000 8006 beq.w 80816d0 <_Z10copy_wordsPKmPmm+0x50>
80816c4: ecb0 0a20 vldm ia r0!, {s0-s31}
80816c8: eca1 0a20 vstm ia r1!, {s0-s31}
80816cc: 3a01       subs r2, #1
80816ce: d1f9       bne.n 80816c4 <_Z10copy_wordsPKmPmm+0x44>
80816d0: ecbd 8a10 vpop {s16-s31}
80816d4: 4770       bx lr