[Scummvm-cvs-logs] SF.net SVN: scummvm: [30759] scummvm/trunk/engines/scumm/gfxARM.s

Anotherguest at users.sourceforge.net Anotherguest at users.sourceforge.net
Sun Feb 3 13:32:20 CET 2008


Revision: 30759
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30759&view=rev
Author:   Anotherguest
Date:     2008-02-03 04:32:19 -0800 (Sun, 03 Feb 2008)

Log Message:
-----------
Added asmCopy8Col from DS implementation. Changed names to match GFX.cpp (and DS names)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/gfxARM.s

Modified: scummvm/trunk/engines/scumm/gfxARM.s
===================================================================
--- scummvm/trunk/engines/scumm/gfxARM.s	2008-02-03 12:30:11 UTC (rev 30758)
+++ scummvm/trunk/engines/scumm/gfxARM.s	2008-02-03 12:32:19 UTC (rev 30759)
@@ -23,7 +23,8 @@
 	.text
 
 	.global	asmDrawStripToScreen
-
+	.global	asmCopy8Col
+	
 	@ ARM implementation of asmDrawStripToScreen.
 	@
 	@ C prototype would be:
@@ -118,3 +119,41 @@
 	BGT	yLoop
 end:
 	LDMFD	r13!,{r4-r7,r9-r11,PC}
+	
+	@ ARM implementation of asmCopy8Col
+	@
+	@ C prototype would be:
+	@
+	@ extern "C" void asmCopy8Col(byte       *dst,
+	@                             int         dstPitch,
+	@                             const byte *src,
+	@                             int         height);
+	@
+	@ In addition, we assume that src and dst are both word (4 byte)
+	@ aligned. This is the same assumption that the old 'inline' version
+	@ made.
+asmCopy8Col:
+	@ r0 = dst
+	@ r1 = dstPitch
+	@ r2 = src
+	@ r3 = height
+	STMFD	r13!,{r14}
+	SUB	r1,r1,#4
+
+	TST	r3,#1
+	ADDNE   r3,r3,#1
+	BNE	roll2
+yLoop2:
+	LDR	r12,[r2],#4
+	LDR	r14,[r2],r1
+	STR	r12,[r0],#4
+	STR	r14,[r0],r1
+roll2:
+	LDR	r12,[r2],#4
+	LDR	r14,[r2],r1
+	SUBS	r3,r3,#2
+	STR	r12,[r0],#4
+	STR	r14,[r0],r1
+	BNE	yLoop2
+
+	LDMFD	r13!,{PC}	


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list