change PAD_ScanPads()s behaviour. the return value now contains a bitmask of the...
[libogc.git] / libogc / video_asm.S
blobb8cd37329e1c34e53dd3eb0198d0bc05be9651d8
1 /*-------------------------------------------------------------
3 video_asm.S -- VIDEO subsystem assembler support
5 Copyright (C) 2004
6 Michael Wiedenbauer (shagkur)
7 Dave Murphy (WinterMute)
9 This software is provided 'as-is', without any express or implied
10 warranty.  In no event will the authors be held liable for any
11 damages arising from the use of this software.
13 Permission is granted to anyone to use this software for any
14 purpose, including commercial applications, and to alter it and
15 redistribute it freely, subject to the following restrictions:
17 1.      The origin of this software must not be misrepresented; you
18 must not claim that you wrote the original software. If you use
19 this software in a product, an acknowledgment in the product
20 documentation would be appreciated but is not required.
22 2.      Altered source versions must be plainly marked as such, and
23 must not be misrepresented as being the original software.
25 3.      This notice may not be removed or altered from any source
26 distribution.
28 -------------------------------------------------------------*/
31 #include <asm.h>
33         .globl __VIClearFramebuffer
34         //r3 = dst, r4 = length(bytes),r5 = color
35 __VIClearFramebuffer:
36         srwi.   r0,r4,8
37         beq             2f
38         mtctr   r0
39         subi    r3,r3,4
40 1:      stwu    r5,4(r3)
41         stwu    r5,4(r3)
42         stwu    r5,4(r3)
43         stwu    r5,4(r3)
44         stwu    r5,4(r3)
45         stwu    r5,4(r3)
46         stwu    r5,4(r3)
47         stwu    r5,4(r3)
48         stwu    r5,4(r3)
49         stwu    r5,4(r3)
50         stwu    r5,4(r3)
51         stwu    r5,4(r3)
52         stwu    r5,4(r3)
53         stwu    r5,4(r3)
54         stwu    r5,4(r3)
55         stwu    r5,4(r3)
56         stwu    r5,4(r3)
57         stwu    r5,4(r3)
58         stwu    r5,4(r3)
59         stwu    r5,4(r3)
60         stwu    r5,4(r3)
61         stwu    r5,4(r3)
62         stwu    r5,4(r3)
63         stwu    r5,4(r3)
64         stwu    r5,4(r3)
65         stwu    r5,4(r3)
66         stwu    r5,4(r3)
67         stwu    r5,4(r3)
68         stwu    r5,4(r3)
69         stwu    r5,4(r3)
70         stwu    r5,4(r3)
71         stwu    r5,4(r3)
73         stwu    r5,4(r3)
74         stwu    r5,4(r3)
75         stwu    r5,4(r3)
76         stwu    r5,4(r3)
77         stwu    r5,4(r3)
78         stwu    r5,4(r3)
79         stwu    r5,4(r3)
80         stwu    r5,4(r3)
81         stwu    r5,4(r3)
82         stwu    r5,4(r3)
83         stwu    r5,4(r3)
84         stwu    r5,4(r3)
85         stwu    r5,4(r3)
86         stwu    r5,4(r3)
87         stwu    r5,4(r3)
88         stwu    r5,4(r3)
89         stwu    r5,4(r3)
90         stwu    r5,4(r3)
91         stwu    r5,4(r3)
92         stwu    r5,4(r3)
93         stwu    r5,4(r3)
94         stwu    r5,4(r3)
95         stwu    r5,4(r3)
96         stwu    r5,4(r3)
97         stwu    r5,4(r3)
98         stwu    r5,4(r3)
99         stwu    r5,4(r3)
100         stwu    r5,4(r3)
101         stwu    r5,4(r3)
102         stwu    r5,4(r3)
103         stwu    r5,4(r3)
104         stwu    r5,4(r3)
105         bdnz    1b
106 2:      blr