equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Graphics Extension Library source file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 @ |
|
20 @ ClearAsm - Clear a contiguous block of memory Fast! |
|
21 @ |
|
22 @ This function writes a contiguous block of memory very fast with a single |
|
23 @ color. The size of the block must be a multiple of 16 pixels (32 bytes). |
|
24 @ |
|
25 @ r0 = Pointer to this class (not used). |
|
26 @ r1 = Address of memory block to clear. |
|
27 @ r2 = Color. |
|
28 @ r3 = Size of block to clear (in 16 pixel increments). |
|
29 |
|
30 .align 2 |
|
31 .globl ClearAsm__8CGfx2dGcPiii |
|
32 @ .thumb_func |
|
33 @ .code 16 |
|
34 |
|
35 ClearAsm__8CGfx2dGcPiii: |
|
36 stmfd sp!, {r4-r9} |
|
37 mov r0,r1 @ Save address and size. |
|
38 mov r9,r3 |
|
39 orr r2,r2,r2,lsl #16 @ Replicate color pattern. |
|
40 mov r1,r2 |
|
41 mov r3,r2 |
|
42 mov r4,r2 |
|
43 mov r5,r2 |
|
44 mov r6,r2 |
|
45 mov r7,r2 |
|
46 mov r8,r2 |
|
47 loop: stmia r0!,{r1-r8} |
|
48 subs r9,r9,#1 |
|
49 bne loop |
|
50 |
|
51 ldmfd sp!, {r4-r9} |
|
52 bx lr |
|
53 |